Skip to content

PSUSensorMain Creates PWM Sensors with paths to RPM hwmon File #22

Open
@kaehnd

Description

@kaehnd

PSUSensorMain tries to create a PWM Sensor for PSU fans if it can find a corresponding fan*_target file to a fan*_input sysfs file.
https://github.com/openbmc/dbus-sensors/blob/master/src/PSUSensorMain.cpp#L256

However, the kernel documentation indicates that the _target file is for fan speed in RPM.
https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

Posting this issue here rather than just submitting a Gerrit PR since it appears that some EntityManger configurations do exist for PSUs that appear to be using phosphor-pid-control to control the PSU fans. Would changing the behavior of PSUSensorMain to search for pwm* instead of fan*_target break any existing platforms / configurations (a.e. do those PSUs have non-standard interfaces / drivers which require sending fan speed in PWM while in RPM mode?)

If this is indeed a bug, would we want to try to instantiate the PWMSensor using the pwm* file if it exists? I ask this because it seems the only driver in the mainline or openbmc linux kernel which provides pwm control over pmbus is the max31785 fancontroller driver -- all pmbus PSU drivers appear to only support configuring the fan speed in RPM. Would we want to add support for the xyz.openbmc_project.Control.FanSpeed interface to TachSensor, and use that instead for PSU fans?

A separate but related issue is that this PwmSensor is instantiated at the fan*_target regardless of if this file is readonly -- which is the case when pmbus_core determines that the pmbus device is write protected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions