phosphor-hwmon funcitonal interface

Patrick Venture venture at google.com
Thu Jan 17 07:18:52 AEDT 2019


On Tue, Jan 15, 2019 at 5:51 PM Lei YU <mine260309 at gmail.com> wrote:
>
> > Actually, phosphor-fan-presence/control is using the functional property
> > that's currently being created where the 'fault' file exists in sysfs
> > for the OCCs.
>
> Good to know. Thanks for the info.
>
> > > So we could re-use this property to indicate if a sensor is functional or not,
> > > especially useful for fans that will get reading error when it's turned off,
> > > e.g. the fans using Aspeed fan/pwm driver.
> > >
> > This case seems to not follow whether a fan is functional or not when
> > its turned off. The fan is still functional, just not powered.

There's also the notion in phosphor-hwmon where it'll remove a sensor
from dbus on some failures... - just throwing that out there.

>
> Yeah, but there is no way to tell the difference between power off and
> non-functional for Aspeed pwm fans, that the driver gives errors on reading
> fan speed.
> So the current solution is to use NEGATIVE_ERRNO_ON_FAIL config to tell
> phosphor-hwmon to return the -errno instead of throwing.
> That way, the reading of the sensor becomes a negative value.
>
> I think a "functional" property is more appropriate for such case than a
> negative reading of sensor value.

Yes. that's something I'm hoping to resolve.

> The code to check this property is free to check the power status as well, so
> it knows if a fan is *really* non-functional or not based on the power status.

Agreed.


More information about the openbmc mailing list