Lines Matching refs:tzdev

105 	struct thermal_zone_device *tzdev;
124 struct thermal_zone_device *tzdev;
162 static int mlxsw_thermal_bind(struct thermal_zone_device *tzdev,
165 struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
176 err = thermal_zone_bind_cooling_device(tzdev, i, cdev,
188 static int mlxsw_thermal_unbind(struct thermal_zone_device *tzdev,
191 struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
201 err = thermal_zone_unbind_cooling_device(tzdev, i, cdev);
210 static int mlxsw_thermal_get_temp(struct thermal_zone_device *tzdev,
213 struct mlxsw_thermal *thermal = thermal_zone_device_priv(tzdev);
242 static int mlxsw_thermal_module_bind(struct thermal_zone_device *tzdev,
245 struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
256 err = thermal_zone_bind_cooling_device(tzdev, i, cdev,
267 thermal_zone_unbind_cooling_device(tzdev, j, cdev);
271 static int mlxsw_thermal_module_unbind(struct thermal_zone_device *tzdev,
274 struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
284 err = thermal_zone_unbind_cooling_device(tzdev, i, cdev);
290 static int mlxsw_thermal_module_temp_get(struct thermal_zone_device *tzdev,
293 struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
315 static int mlxsw_thermal_gearbox_temp_get(struct thermal_zone_device *tzdev,
318 struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
423 module_tz->tzdev = thermal_zone_device_register_with_trips(tz_name,
431 if (IS_ERR(module_tz->tzdev)) {
432 err = PTR_ERR(module_tz->tzdev);
436 err = thermal_zone_device_enable(module_tz->tzdev);
438 thermal_zone_device_unregister(module_tz->tzdev);
443 static void mlxsw_thermal_module_tz_fini(struct thermal_zone_device *tzdev)
445 thermal_zone_device_unregister(tzdev);
472 if (module_tz && module_tz->tzdev) {
473 mlxsw_thermal_module_tz_fini(module_tz->tzdev);
474 module_tz->tzdev = NULL;
550 gearbox_tz->tzdev = thermal_zone_device_register_with_trips(tz_name,
557 if (IS_ERR(gearbox_tz->tzdev))
558 return PTR_ERR(gearbox_tz->tzdev);
560 ret = thermal_zone_device_enable(gearbox_tz->tzdev);
562 thermal_zone_device_unregister(gearbox_tz->tzdev);
570 thermal_zone_device_unregister(gearbox_tz->tzdev);
774 thermal->tzdev = thermal_zone_device_register_with_trips("mlxsw",
781 if (IS_ERR(thermal->tzdev)) {
782 err = PTR_ERR(thermal->tzdev);
803 err = thermal_zone_device_enable(thermal->tzdev);
820 if (thermal->tzdev) {
821 thermal_zone_device_unregister(thermal->tzdev);
822 thermal->tzdev = NULL;
845 if (thermal->tzdev) {
846 thermal_zone_device_unregister(thermal->tzdev);
847 thermal->tzdev = NULL;