<div dir="ltr">Hi Matt:<div>    Thank for your response that's really helpful. I check the link and it seems allow a gpio set to high before/after reading a correspond sensor. Is it possible change 2 gpio to high/low for reading a correspond sensor?</div><div><br></div><div>Regards,</div><div>Tyler</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Matt Spinler <<a href="mailto:mspinler@linux.ibm.com">mspinler@linux.ibm.com</a>> 於 2019年12月9日 週一 下午10:58寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 12/9/2019 6:15 AM, Deng Tyler wrote:<br>
> Hi all:<br>
>     Does phosphor-hwmon support changing gpio pin before read <br>
> /sys/class/hwmon/hwmon0/fan*_input while monitoring fan sensor? In my <br>
> platform, fans gpio are connect to pin-mux and I need control gpio <br>
> before get fan tach rpm.<br>
<br>
It does have the ability to modify a GPIO before/after a reading:<br>
<a href="https://github.com/openbmc/phosphor-hwmon/blob/master/mainloop.cpp#L447" rel="noreferrer" target="_blank">https://github.com/openbmc/phosphor-hwmon/blob/master/mainloop.cpp#L447</a><br>
<br>
configured by some lines in the conf file, like:<br>
<a href="https://github.com/openbmc/meta-ibm/blob/master/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf#L4" rel="noreferrer" target="_blank">https://github.com/openbmc/meta-ibm/blob/master/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf#L4</a><br>
<br>
><br>
> Regards,<br>
> Tyler<br>
<br>
</blockquote></div>