<div dir="ltr">Hi Kun<div> Thank for your response and that's highly appreciated.</div><div>I patch the async read support but it still not working, following is my configuration. Anything I missing?</div><div>LABEL_fan0=fan1A<br>LABEL_fan1=fan1B<br>LABEL_fan2=fan2A<br>LABEL_fan3=fan2B<br>LABEL_fan4=fan3A<br>LABEL_fan5=fan3B<br>LABEL_fan6=fan4A<br>LABEL_fan7=fan4B<br>LABEL_fan8=fan5A<br>LABEL_fan9=fan5B<br>LABEL_fan10=fan6A<br>LABEL_fan11=fan6B<br>ASYNC_READ_TIMEOUT_fan0 = "3000"<br>ASYNC_READ_TIMEOUT_fan1 = "3000"<br>ASYNC_READ_TIMEOUT_fan2 = "3000"<br>ASYNC_READ_TIMEOUT_fan3 = "3000"<br>ASYNC_READ_TIMEOUT_fan4 = "3000"<br>ASYNC_READ_TIMEOUT_fan5 = "3000"<br>ASYNC_READ_TIMEOUT_fan6 = "3000"<br>ASYNC_READ_TIMEOUT_fan7 = "3000"<br>ASYNC_READ_TIMEOUT_fan8 = "3000"<br>ASYNC_READ_TIMEOUT_fan9 = "3000"<br>ASYNC_READ_TIMEOUT_fan10 = "3000"<br>ASYNC_READ_TIMEOUT_fan11 = "3000"<br></div><div>INTERVAL=10000000<br></div><div><br></div><div>Tyler</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Kun Yi <<a href="mailto:kunyi@google.com">kunyi@google.com</a>> 於 2019年12月13日 週五 上午5:15寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 12, 2019 at 12:34 PM Matt Spinler <<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a>> wrote:<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/11/2019 12:40 AM, Deng Tyler wrote:<br>
> I added gpio control in my fan driver but I still met some problem. <br>
> While phosphor-hwmon reading fan0_input, the fan tach driver change 2 <br>
> gpio pin and sleep 2 seconds to return rpm value for stable. There are <br>
> 12 fan sensors in my platform so the phosphor-hwmon need wait 24 <br>
> senconds at least to get rpm. The waiting time cause dbus hang while <br>
> issuing ipmi sensor command. Do you have any suggestions?<br>
<br>
I vaguely remember someone else had this problem before, and it turned <br>
out to be a device driver<br>
problem as the reason it was so slow.<br></blockquote><div><br></div><div>Yea the best test is to read from the kernel sysfs interface and post how long it takes. If the device is misbehaving or the physical bus (i2c/fantach) is not working properly, the delay could easily be O(seconds)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Otherwise, the reads could probably be changed to be asynchronous, but <br>
that could be a pretty big<br>
change to the application.</blockquote><div><br></div><div>There is some work-in-progress patch to add async read support. The patch works, although the code change is not clean enough.</div><div><a href="https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/24337" target="_blank">https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/24337</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
><br>
> Tyler<br>
><br>
> Matt Spinler <<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a> <mailto:<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a>>> <br>
> 於 2019年12月11日 週三 上午12:29寫道:<br>
><br>
><br>
><br>
> On 12/9/2019 11:08 PM, Deng Tyler wrote:<br>
> > Hi Matt:<br>
> > Thank for your response that's really helpful. I check the link<br>
> > and it seems allow a gpio set to high before/after reading a<br>
> > correspond sensor. Is it possible change 2 gpio to high/low for<br>
> > reading a correspond sensor?<br>
><br>
> That isn't possible in the current code, but I don't see why someone<br>
> couldn't add that feature.<br>
><br>
> ><br>
> > Regards,<br>
> > Tyler<br>
> ><br>
> > Matt Spinler <<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a><br>
> <mailto:<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a>> <mailto:<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a><br>
> <mailto:<a href="mailto:mspinler@linux.ibm.com" target="_blank">mspinler@linux.ibm.com</a>>>><br>
> > 於 2019年12月9日 週一 下午10:58寫道:<br>
> ><br>
> ><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<br>
> sensor?<br>
> > In my<br>
> > > platform, fans gpio are connect to pin-mux and I need<br>
> control gpio<br>
> > > before get fan tach rpm.<br>
> ><br>
> > It does have the ability to modify a GPIO before/after a<br>
> reading:<br>
> ><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>
> ><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>
><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr">Regards,<div>Kun</div></div></div></div>
</blockquote></div>