OSDN Git Service

mlxsw: core: Add QSFP module temperature label attribute to hwmon
authorVadim Pasternak <vadimp@mellanox.com>
Wed, 13 Feb 2019 11:28:55 +0000 (11:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 06:33:02 +0000 (22:33 -0800)
commita53779de6a0ea6f25d3d5b60567ffc3671f1da7b
tree8adeac375c1357f4eee9d9f955c4a88c0e2759b5
parent5c42eaa07bd040d965b7a41b9596be5741016d1a
mlxsw: core: Add QSFP module temperature label attribute to hwmon

Add label attribute to hwmon object for exposing QSFP module's
temperature sensor name. Modules are labeled as "front panel xxx". The
label is used by utilities such as "sensors":

front panel 001:   +0.0C  (crit =  +0.0C, emerg =  +0.0C)
..
front panel 020:  +31.0C  (crit = +70.0C, emerg = +80.0C)
..
front panel 056:  +41.0C  (crit = +70.0C, emerg = +80.0C)

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c