]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: thermal: Add function for reading module temperature and thresholds
authorMykola Kostenok <c_mykolak@nvidia.com>
Tue, 8 Jun 2021 12:44:13 +0000 (15:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jun 2021 21:39:07 +0000 (14:39 -0700)
commitecc162c4caaa5ff57d74fef99845675e95cc1ef4
tree19307bc5921858cc19c0315f98e89c728398ee09
parent8da227264be28e08b302830437201305979608fb
mlxsw: thermal: Add function for reading module temperature and thresholds

Provide new function mlxsw_thermal_module_temp_and_thresholds_get() for
reading temperature and temperature thresholds by a single operation.
The motivation is to reduce the number of transactions with the device
which is important when operating over a slow bus such as I2C.

Currently, the sole caller of the function is only using it to read the
module's temperature. The next patch will also use it to query the
module's temperature thresholds.

Signed-off-by: Mykola Kostenok <c_mykolak@nvidia.com>
Acked-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c