Enable/Disable some sensors when Host On/Off

Thu Ba Nguyen tbnguyen1985 at gmail.com
Wed Oct 21 10:39:35 AEDT 2020


I am also concerned about phosphor-hwmon keep reading sensors in Dbus.
Even those sensors are off or not available when the host is off.

The other thing is the value of sensors which are using the same power
domain with the host in the time host changing status.
It can be invalid value and should be ignored.
These sensors should be removed from Dbus when the host starts off/on.


On Tue, Oct 20, 2020 at 9:18 PM Patrick Williams <patrick at stwcx.xyz> wrote:

> On Tue, Oct 20, 2020 at 08:46:30AM -0500, Matt Spinler wrote:
> >
> >
> > On 10/19/2020 10:23 AM, Thu Ba Nguyen wrote:
> > >
> > > I also thought about the solution for that features:
> > > In the current hwmon we support GPIOCHIP + GPIO option which used to
> > > enable sensors to read. In the hwmon code, we just set that pin and
> wait
> > > before reading.
> > > I think we can support a similar option named GPIOENABLE + GPIOV. When
> > > the status of Gpio pin defind in GPIOEANBLE match with GPIOV.
> > > That sensors will be read and update to Dbus.
> > > If not it will be removed from DBus until the GPIO pin math GPIOV.
> > > Maybe we can have many different solutions.
> ...
> > >
> > > If you don't mind, can you tell me how IBM supports that features?
> >
> > We lucked out out in that the driver was only loaded when power was on.
> >
>
> Hi Thu,
>
> Is this something you could do similarly?  Rather than have the driver
> understand the GPIO directly you can trigger a phosphor-gpio-monitor
> service that does a 'bind' / 'unbind' to dynamically enable and disable
> the hwmon driver?
>
> Matt, is that how you have the driver configured to load / unload (I
> assume your case is for the OCC).
>
> --
> Patrick Williams
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20201021/d49a065d/attachment.htm>


More information about the openbmc mailing list