linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix swapped coeffs for LM5066 and LM5066i iin
@ 2019-01-28 17:00 Matt Wilbur
  2019-01-28 17:00 ` [PATCH 1/1] " Matt Wilbur
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Wilbur @ 2019-01-28 17:00 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Matt Wilbur

For the LM5066,

For CL=GND,  50 mV threshold && DEVICE_SETUP[4] == 0
For CL=VDD, 26 mV threshold && DEVICE_SETUP[4] == 1

(from Section 8.3.1 and Table 31 of current datasheet)

And from Table 43 (I have reversed the rows of the datasheet to stay
consistent with your ordering):

CL = GND: m = 5405, b =-600, R - 2
CL = VDD:  m = 10753, b = -1200, R = -2

Combining the two statements:
DEVICE_SETUP[4] == 0: m = 5405, b =-600, R - 2
DEVICE_SETUP[4] == 1: m = 10753, b = -1200, R = -2

According to current code (again reversing the order to be consistent
with the above):

DEVICE_SETUP[4] == 0: use coeff[PSC_CURRENT_IN]
DEVICE_SETUP[4] == 1: use coeff[PSC_CURRENT_IN_L]

And for the lm5066 coefficient:

        [PSC_CURRENT_IN] = {
            .m = 10753,
            .R = -2,
        },
        [PSC_CURRENT_IN_L] = {
            .m = 5405,
            .R = -2,
        },

Again, combing the two:

DEVICE_SETUP[4] == 0: m = 10753, b = 0, R = -2
DEVICE_SETUP[4] == 1: m = 5405, b = 0, R = -2

which which is the opposite of the device datasheet (which I copy and
paste here):

DEVICE_SETUP[4] == 0: m = 5405, b =-600, R - 2
DEVICE_SETUP[4] == 1: m = 10753, b = -1200, R = -2


Matt Wilbur (1):
  Fix swapped coeffs for LM5066 and LM5066i iin

 drivers/hwmon/pmbus/lm25066.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-01 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28 17:00 [PATCH 0/1] Fix swapped coeffs for LM5066 and LM5066i iin Matt Wilbur
2019-01-28 17:00 ` [PATCH 1/1] " Matt Wilbur
2019-01-31 18:11   ` Guenter Roeck
2019-02-01 11:41     ` Matt Wilbur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).