From: Guenter Roeck <linux@roeck-us.net>
To: Matt Wilbur <wilburm@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: LM5066 low- and high-current limit scaling
Date: Fri, 25 Jan 2019 14:04:03 -0800 [thread overview]
Message-ID: <20190125220403.GA23935@roeck-us.net> (raw)
In-Reply-To: <CAGQJtpOG7m3J9=nbUFi9xhhOKh2T9spSDW4mYfkPeJrSVANdXQ@mail.gmail.com>
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
prev parent reply other threads:[~2019-01-25 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 20:13 LM5066 low- and high-current limit scaling Matt Wilbur
2019-01-25 22:04 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190125220403.GA23935@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-hwmon@vger.kernel.org \
--cc=wilburm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.