On Fri, Jan 25, 2019 at 03:13:39PM -0500, Matt Wilbur wrote: > Hi > > First off, this is the first time I've ever tried something like this, > so I fully anticipate I will make some etiquette / process mistakes. > > In a project I am working on, we make use of the LM5066 hot-swap > controller. I believe the kernel module for this chip > (drivers/hwmon/pmbus/lm25066.c) has an error where the scaling > parameters for the low- and high-current limits are swapped. > > What's the best way for me to make my case? Just create a patch and > try to submit it? A free-form discussion on the mailing list? > Normally you would send a patch and make your case in the description. However, be careful. PSC_CURRENT_IN_L is used if DEVICE_SETUP[4]=1, which (hopefully) translates to CL=VDD. Per LM25066 datasheet, table 41: CL=GND: M=13661, B=–5200, R=-2 CL=VDD: M=6854, B=-3100, R=-2 Current code: DEVICE_SETUP[4]=0: M=13661, B=0, R=-2 DEVICE_SETUP[4]=1: M=6852, B=0, R=-2 This looks mostly correct to me, except for the offset and the slight difference if CL=VDD. Looks like that was changed at some point in later datasheet versions. Overall, the problem (or confusion) is that the logic for DEVICE_SETUP[4] in the datasheets for the various chips changes. 5066i: 0 = high setting (50 mV) 1 = low setting (26 mV) 25066, 25066i: 0 = low setting (25 mV) 1 = high setting (46 mV) ... so of course it may well be that the data for some of the chips is wrong, since we use PSC_CURRENT_IN_L for DEVICE_SETUP[4]=1 throughout (in other words, it is likely that either the data for LM5066 is wrong, or that the data for LM25066 is wrong - the only question is which one). It may also be that the datasheets are wrong or misleading, and that CL=VDD is not (or not always) equivalent to DEVICE_SETUP[4]=1. Guenter