phosphor-hwmon funcitonal interface
Lei YU
mine260309 at gmail.com
Wed Jan 16 12:51:40 AEDT 2019
> 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.
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.
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.
More information about the openbmc
mailing list