Commit 2fd8d84c authored by Mykola Kostenok's avatar Mykola Kostenok Committed by David S. Miller

mlxsw: core: Set thermal zone polling delay argument to real value at init

Thermal polling delay argument for modules and gearboxes thermal zones
used to be initialized with zero value, while actual delay was used to
be set by mlxsw_thermal_set_mode() by thermal operation callback
set_mode(). After operations set_mode()/get_mode() have been removed by
cited commits, modules and gearboxes thermal zones always have polling
time set to zero and do not perform temperature monitoring.

Set non-zero "polling_delay" in thermal_zone_device_register() routine,
thus, the relevant thermal zones will perform thermal monitoring.

Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Fixes: 5d7bd8aa ("thermal: Simplify or eliminate unnecessary set_mode() methods")
Fixes: 1ee14820 ("thermal: remove get_mode() operation of drivers")
Signed-off-by: default avatarMykola Kostenok <c_mykolak@nvidia.com>
Acked-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d566ed04
...@@ -693,7 +693,8 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz) ...@@ -693,7 +693,8 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)
MLXSW_THERMAL_TRIP_MASK, MLXSW_THERMAL_TRIP_MASK,
module_tz, module_tz,
&mlxsw_thermal_module_ops, &mlxsw_thermal_module_ops,
NULL, 0, 0); NULL, 0,
module_tz->parent->polling_delay);
if (IS_ERR(module_tz->tzdev)) { if (IS_ERR(module_tz->tzdev)) {
err = PTR_ERR(module_tz->tzdev); err = PTR_ERR(module_tz->tzdev);
return err; return err;
...@@ -815,7 +816,8 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz) ...@@ -815,7 +816,8 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)
MLXSW_THERMAL_TRIP_MASK, MLXSW_THERMAL_TRIP_MASK,
gearbox_tz, gearbox_tz,
&mlxsw_thermal_gearbox_ops, &mlxsw_thermal_gearbox_ops,
NULL, 0, 0); NULL, 0,
gearbox_tz->parent->polling_delay);
if (IS_ERR(gearbox_tz->tzdev)) if (IS_ERR(gearbox_tz->tzdev))
return PTR_ERR(gearbox_tz->tzdev); return PTR_ERR(gearbox_tz->tzdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment