Add phosphor-fan configuration for the fan which added by dbus-sensor
Thu Nguyen OS
thu at os.amperecomputing.com
Fri May 7 01:59:18 AEST 2021
On 06/05/2021, 20:09, "Matthew Barth" <msbarth at linux.ibm.com> wrote:
On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
> Hi,
>
> I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
That is a sensor interface, not an interface that's added to inventory objects
> https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
[Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
Look at the example of the fan control configuration file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>
> But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
[Thu Nguyen]
The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>
> Do you have any solution to make phosphor-fan work with dbus-sensor?
>
> I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>
> Regards.
> Thu Nguyen.
More information about the openbmc
mailing list