Configuring shunt_resistor in hwmon
Alex Qiu
xqiu at google.com
Wed Jan 8 04:11:07 AEDT 2020
Hi Lei,
I'm not sure if we're using phosphor-hwmon, but I'll take a look. Thank you!
- Alex Qiu
On Mon, Jan 6, 2020 at 7:20 PM Lei YU <mine260309 at gmail.com> wrote:
> On Tue, Jan 7, 2020 at 5:38 AM James Feist <james.feist at linux.intel.com>
> wrote:
> >
> > On 1/6/20 1:29 PM, Alex Qiu wrote:
> > > Hi James,
> > >
> > > Thanks for your quick reply and reviewing my code in the morning!
> > >
> > > That looks interesting, so this ScaleFactor will be used to multiply
> the
> > > voltage value from hwmon without setting the shunt_resistor explicitly?
> > > I do have a little concern on the resolution, because it's only
> > > reporting 0.165V with default shunt_resistor setting, but we'll try and
> > > see if this will work for our case. In the meantime, do you know any
> > > other method that will work?
> >
> > That's all I'm aware of in dbus-sensors. We have a voltage divider
> > in-front of our ADC channels, so we use this scale factor to calculate
> > the actual voltage. Anything else I think you'd need to add as a new
> > change if you're using dbus-sensors. I'm not sure if phosphor-hwmon
> > offers anything you could use or not.
>
> With phosphor-hwmon, you could define GAIN, OFFSET in the config file
> to adjust the reading.
> See details in
>
> https://github.com/openbmc/docs/blob/master/architecture/sensor-architecture.md#my-sensors-are-not-defined-in-an-mrw
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200107/6e73f270/attachment.htm>
More information about the openbmc
mailing list