pinctrl in phosphor-hwmon
Kun Yi
kunyi at google.com
Fri Dec 13 08:15:16 AEDT 2019
On Thu, Dec 12, 2019 at 12:34 PM Matt Spinler <mspinler at linux.ibm.com>
wrote:
>
>
> On 12/11/2019 12:40 AM, Deng Tyler wrote:
> > I added gpio control in my fan driver but I still met some problem.
> > While phosphor-hwmon reading fan0_input, the fan tach driver change 2
> > gpio pin and sleep 2 seconds to return rpm value for stable. There are
> > 12 fan sensors in my platform so the phosphor-hwmon need wait 24
> > senconds at least to get rpm. The waiting time cause dbus hang while
> > issuing ipmi sensor command. Do you have any suggestions?
>
> I vaguely remember someone else had this problem before, and it turned
> out to be a device driver
> problem as the reason it was so slow.
>
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)
>
> Otherwise, the reads could probably be changed to be asynchronous, but
> that could be a pretty big
> change to the application.
There is some work-in-progress patch to add async read support. The patch
works, although the code change is not clean enough.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/24337
>
> >
> > Tyler
> >
> > Matt Spinler <mspinler at linux.ibm.com <mailto:mspinler at linux.ibm.com>>
> > 於 2019年12月11日 週三 上午12:29寫道:
> >
> >
> >
> > On 12/9/2019 11:08 PM, Deng Tyler wrote:
> > > Hi Matt:
> > > 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?
> >
> > That isn't possible in the current code, but I don't see why someone
> > couldn't add that feature.
> >
> > >
> > > Regards,
> > > Tyler
> > >
> > > Matt Spinler <mspinler at linux.ibm.com
> > <mailto:mspinler at linux.ibm.com> <mailto:mspinler at linux.ibm.com
> > <mailto:mspinler at linux.ibm.com>>>
> > > 於 2019年12月9日 週一 下午10:58寫道:
> > >
> > >
> > >
> > > On 12/9/2019 6:15 AM, Deng Tyler wrote:
> > > > Hi all:
> > > > Does phosphor-hwmon support changing gpio pin before read
> > > > /sys/class/hwmon/hwmon0/fan*_input while monitoring fan
> > sensor?
> > > In my
> > > > platform, fans gpio are connect to pin-mux and I need
> > control gpio
> > > > before get fan tach rpm.
> > >
> > > It does have the ability to modify a GPIO before/after a
> > reading:
> > >
> >
> https://github.com/openbmc/phosphor-hwmon/blob/master/mainloop.cpp#L447
> > >
> > > configured by some lines in the conf file, like:
> > >
> >
> https://github.com/openbmc/meta-ibm/blob/master/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon-battery.conf#L4
> > >
> > > >
> > > > Regards,
> > > > Tyler
> > >
> >
>
>
--
Regards,
Kun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191212/d30435b2/attachment.htm>
More information about the openbmc
mailing list