]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core_hwmon: Extend hwmon interface with critical and emergency alarms
authorAmit Cohen <amitc@mellanox.com>
Thu, 3 Sep 2020 13:41:46 +0000 (16:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 19:12:05 +0000 (12:12 -0700)
commitb1ad364036b381631681ba3754c2eeebdd35ed06
tree7f7acb33c231bf7d73c8def0d4d025727ea3a595
parent06a2fa136710213ab917bfd0ccb15fde1a6fc803
mlxsw: core_hwmon: Extend hwmon interface with critical and emergency alarms

Add new attributes to hwmon object for exposing critical and emergency
alarms.

In case that current temperature is higher than emergency threshold,
EMERGENCY alarm will be reported in sensors utility:

$ sensors
...
front panel 025:  +55.0°C  (crit = +35.0°C, emerg = +40.0°C) ALARM(EMERGENCY)

In case that current temperature is higher than critical threshold,
CRIT alarm will be reported in sensors utility:

$ sensors
...
front panel 025:  +54.0°C  (crit = +35.0°C, emerg = +80.0°C) ALARM(CRIT)

Signed-off-by: Amit Cohen <amitc@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c