Configuring shunt_resistor in hwmon

Alex Qiu xqiu at google.com
Tue Jan 7 08:44:41 AEDT 2020


Hi James,

Got it. Thank you for the answer!

- Alex Qiu


On Mon, Jan 6, 2020 at 1:37 PM 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.
>
> >
> > Thank you!
> >
> > - Alex Qiu
> >
> >
> > On Mon, Jan 6, 2020 at 1:21 PM James Feist <james.feist at linux.intel.com
> > <mailto:james.feist at linux.intel.com>> wrote:
> >
> >     On 1/6/20 1:16 PM, Alex Qiu wrote:
> >      > Hi OpenBMC folks,
> >      >
> >      > Is there a way to configure the shunt_resistor value for a hwmon
> >     with
> >      > entity-manager or other modules?
> >
> >     Have you seen this?
> >
> https://github.com/openbmc/entity-manager/blob/0cbe6bf34101bab7544b40011868efc5145c0804/configurations/WFT%20Baseboard.json#L7
> >
> >     For Entity-Manager + dbus-sensors.
> >
> >      > We need to configure this value to make
> >      > the INA230 report correct voltage, but for now I don't find
> >     anything in
> >      > the code for it. Shall this be a feature to implement? Thanks!
> >      >
> >      > - Alex Qiu
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200106/0d7a4990/attachment.htm>


More information about the openbmc mailing list