All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Qiu <xqiu@google.com>
To: James Feist <james.feist@linux.intel.com>
Cc: openbmc@lists.ozlabs.org, Josh Lehan <krellan@google.com>,
	 Kais Belgaied <belgaied@google.com>,
	Devjit Gopalpur <devjitg@google.com>,
	 Peter Lundgren <peterlundgren@google.com>
Subject: Re: Configuring shunt_resistor in hwmon
Date: Mon, 6 Jan 2020 13:44:41 -0800	[thread overview]
Message-ID: <CAA_a9xLCmVAjrJhvz5KLx_bWLmvUucx_GAZO1+GEdPXdSFSwjg@mail.gmail.com> (raw)
In-Reply-To: <e585c0d1-81a8-fd09-cb43-84ac878568ad@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

Hi James,

Got it. Thank you for the answer!

- Alex Qiu


On Mon, Jan 6, 2020 at 1:37 PM James Feist <james.feist@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@linux.intel.com
> > <mailto:james.feist@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
> >
>

[-- Attachment #2: Type: text/html, Size: 3005 bytes --]

  reply	other threads:[~2020-01-06 21:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 21:16 Configuring shunt_resistor in hwmon Alex Qiu
2020-01-06 21:21 ` James Feist
2020-01-06 21:29   ` Alex Qiu
2020-01-06 21:37     ` James Feist
2020-01-06 21:44       ` Alex Qiu [this message]
2020-01-07  3:20       ` Lei YU
2020-01-07 17:11         ` Alex Qiu
2020-01-06 23:37 ` Vijay Khemka
2020-01-06 23:40   ` Alex Qiu

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=CAA_a9xLCmVAjrJhvz5KLx_bWLmvUucx_GAZO1+GEdPXdSFSwjg@mail.gmail.com \
    --to=xqiu@google.com \
    --cc=belgaied@google.com \
    --cc=devjitg@google.com \
    --cc=james.feist@linux.intel.com \
    --cc=krellan@google.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=peterlundgren@google.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.