The common solution to support bind/unbind the hwmon driver base on the host state.

Thu Nguyen OS thu at os.amperecomputing.com
Fri Apr 2 18:52:45 AEDT 2021


I thought that OpenBmc community have to have the solution for this.
I can propose my solution but I don't think it is common enough.

Regards,
Thu Nguyen.

On 31/03/2021, 23:14, "Joseph Reynolds" <jrey at linux.ibm.com> wrote:

    On 3/30/21 9:14 PM, Thu Nguyen OS wrote:
    > Hi All, Currently, In Mtjade platform of Ampere, we have SMPro mdf 
    > drivers (SMPro hwmon, SMPro errmon, SMPro misc driver). The drivers 
    > will be loaded by kernel when the BMC boot up. But they are only 
    > binded when the host is already On. ‍ ‍ ‍ ‍ 
    >
    > Hi All,
    >
    > Currently, In Mtjade platform of Ampere, we have SMPro mdf drivers 
    > (SMPro hwmon, SMPro errmon, SMPro misc driver).
    >
    > The drivers will be loaded by kernel when the BMC boot up. But they 
    > are only binded when the host is already On.
    >
    > They are also unbinded when the host is Off.
    >
    > To support binding/unbinding the SMPro drivesr, we have one service 
    > name driver-binder.
    >
    >  1. When the Dbus property CurrentHostState of service
    >     xyz.openbmc_project.State.Host changes to “not Off”, we will bind
    >     the drivers.
    >  2. When the Dbus property RequestedHostTransition of service
    >     xyz.openbmc_project.State.Host OR Dbus property
    >     RequestedPowerTransition of xyz.openbmc_project.State.Chassis
    >
    > change to Off, we will unbind the drivers.
    >
    > The driver-binder is working as expected, it have the configuration 
    > file to configure which drivers will be binded/unbinded.
    >
    > But that is our solution.
    >
    > Do we have any common solution to do that job?
    >

    Thu,

    I don't have a solution.  But I do want to be able to bind and unbind 
    drivers for the BMC-attached USB ports (as the underlying mechanism when 
    the BMC admin disables the ports), so I think it would be good to have a 
    common solution or understand the best practices.

    Joseph

    > Regards.
    >
    > Thu Nguyen.
    >




More information about the openbmc mailing list