<div dir="ltr"><div dir="ltr"><br></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></blockquote><div>The load/unload OCC will only affect on host sensors which are provided by OCC.</div><div>For sensors which use the same power domain with the host, they still are read and updated to the value to Dbus.</div><div>  </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">
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></div>