mlxsw: reg: Add high and low temperature thresholds
authorIdo Schimmel <idosch@mellanox.com>
Mon, 30 Oct 2017 09:51:18 +0000 (10:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Nov 2017 03:25:43 +0000 (12:25 +0900)
commit62b0e9243fca257217ef72f383bd38ed5a542b5e
tree5949a4914c0c6ec3a323b733415cd425d390bb08
parent1cf098b782f4d1ac0292e596a9677c8ee9f0ed0a
mlxsw: reg: Add high and low temperature thresholds

The ASIC has the ability to generate events whenever a sensor indicates
the temperature goes above or below its high or low thresholds,
respectively.

In new firmware versions the firmware enforces a minimum of 5
degrees Celsius difference between both thresholds. Make the driver
conform to this requirement.

Note that this is required even when the events are disabled, as in
certain systems interrupts are generated via GPIO based on these
thresholds.

Fixes: 85926f877040 ("mlxsw: reg: Add definition of temperature management registers")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h