From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: INA219 and INA226 support
Date: Tue, 22 May 2012 13:47:57 +0000 [thread overview]
Message-ID: <20120522134757.GA30060@ericsson.com> (raw)
In-Reply-To: <28DAD847AEFDD344B2D3802E7670BEE116AD804E@DNCE04.ent.ti.com>
On Tue, May 22, 2012 at 03:13:35AM -0400, Felten, Lothar wrote:
> Hi Guenter,
>
> > Hi Lothar,
> >
> > > Hello,
> > >
> > > This patch brings support for the Texas Instruments INA219 and INA226
> > power monitors.
> > >
> > I have a couple of observations.
> >
> > [ ... ]
> > > +
> > > +/* settings - depend on use case */
> > > +#define INA219_CONFIG_DEFAULT 0x219F /* PGA=1 */
> > > +#define INA226_CONFIG_DEFAULT 0x4527 /* averages\x16 */
> > > +
> >
> > With this configuration (PGA=1), the dynamic range for the shunt
> > resistor voltage is 40 mV. Since we report the value in mV, it does not
> > provide much value to do that. It might be better to use PGA=8 instead,
> > for a dynamic range of 320 mV.
> >
> > Did you have a special reason for selecting PGA=1 ? Otherwise, I think
> > we should change it to PGA=8.
>
> No there was no special reason, the default setting after reset is PGA=8, this
> Is probably the best selection. So that should be:
> #define INA219_CONFIG_DEFAULT 0x399F /* default values */
>
> INA2XX_SHUNT_VOLTAGE will then go from -320mV to +320mV, that should be ok.
>
Ok, I updated that in the pending patch.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2012-05-22 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 17:43 [lm-sensors] [PATCH] hwmon: INA219 and INA226 support Felten, Lothar
2012-05-08 17:49 ` Guenter Roeck
2012-05-08 17:57 ` Guenter Roeck
2012-05-12 19:50 ` Guenter Roeck
2012-05-21 16:44 ` Guenter Roeck
2012-05-22 7:13 ` Felten, Lothar
2012-05-22 13:47 ` 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=20120522134757.GA30060@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@vger.kernel.org \
/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.