OSDN Git Service

mlxsw: core: Extend thermal module with per QSFP module thermal zones
authorVadim Pasternak <vadimp@mellanox.com>
Thu, 14 Feb 2019 20:22:55 +0000 (20:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Feb 2019 18:57:49 +0000 (10:57 -0800)
commit6a79507cfe94c7729207659501ff88914b3eb198
tree970d8074694c394bf57044e85eee842f4a54caf0
parent3c136c542ab93b0d90fc79e4e7bf348eebc7bb82
mlxsw: core: Extend thermal module with per QSFP module thermal zones

Add a dedicated thermal zone for each QSFP/SFP module. The current
temperature is obtained from the module's temperature sensor and the
trip points are set based on the warning and critical thresholds
read from the module.

A cooling device (fan) is bound to all the thermal zones. The
thermal zone governor is set to user space in order to avoid
collisions between thermal zones.
For example, one thermal zone might want to increase the speed of
the fan, whereas another one would like to decrease it.

Deferring this decision to user space allows the user to the take
the most suitable decision.

Signed-off-by: Vadim Pasternak <vadimp@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_thermal.c