<div dir="ltr">I am also concerned about phosphor-hwmon keep reading sensors in Dbus.<div>Even those sensors are off or not available when the host is off.</div><div><br></div><div>The other thing is the value of sensors which are using the same power domain with the host in the time host changing status.</div><div>It can be invalid value and should be ignored. </div><div>These sensors should be removed from Dbus when the host starts off/on.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 9:18 PM Patrick Williams <<a href="mailto:patrick@stwcx.xyz">patrick@stwcx.xyz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Tue, Oct 20, 2020 at 08:46:30AM -0500, Matt Spinler wrote:<br>
> <br>
> <br>
> On 10/19/2020 10:23 AM, Thu Ba Nguyen wrote:<br>
> > <br>
> > I also thought about the solution for that features:<br>
> > In the current hwmon we support GPIOCHIP + GPIO option which used to<br>
> > enable sensors to read. In the hwmon code, we just set that pin and wait<br>
> > before reading.<br>
> > I think we can support a similar option named GPIOENABLE + GPIOV. When<br>
> > the status of Gpio pin defind in GPIOEANBLE match with GPIOV.<br>
> > That sensors will be read and update to Dbus.<br>
> > If not it will be removed from DBus until the GPIO pin math GPIOV.<br>
> > Maybe we can have many different solutions.<br>
...<br>
> > <br>
> > If you don't mind, can you tell me how IBM supports that features?<br>
> <br>
> We lucked out out in that the driver was only loaded when power was on.<br>
> <br>
<br>
Hi Thu,<br>
<br>
Is this something you could do similarly? Rather than have the driver<br>
understand the GPIO directly you can trigger a phosphor-gpio-monitor<br>
service that does a 'bind' / 'unbind' to dynamically enable and disable<br>
the hwmon driver?<br>
<br>
Matt, is that how you have the driver configured to load / unload (I<br>
assume your case is for the OCC).<br>
<br>
-- <br>
Patrick Williams<br>
</blockquote></div>