Home
last modified time | relevance | path

Searched refs:tzd (Results 1 – 25 of 34) sorted by relevance

12

/linux-6.12.1/drivers/thermal/
Dloongson2_thermal.c98 struct thermal_zone_device *tzd = dev; in loongson2_thermal_irq_thread() local
99 struct loongson2_thermal_data *data = thermal_zone_device_priv(tzd); in loongson2_thermal_irq_thread()
103 thermal_zone_device_update(tzd, THERMAL_EVENT_UNSPECIFIED); in loongson2_thermal_irq_thread()
124 struct thermal_zone_device *tzd; in loongson2_thermal_probe() local
155 tzd = devm_thermal_of_zone_register(dev, i, data, in loongson2_thermal_probe()
158 if (!IS_ERR(tzd)) in loongson2_thermal_probe()
161 if (PTR_ERR(tzd) != -ENODEV) in loongson2_thermal_probe()
164 return dev_err_probe(dev, PTR_ERR(tzd), "failed to register"); in loongson2_thermal_probe()
168 IRQF_ONESHOT, "loongson2_thermal", tzd); in loongson2_thermal_probe()
172 devm_thermal_add_hwmon_sysfs(dev, tzd); in loongson2_thermal_probe()
Dimx_sc_thermal.c22 struct thermal_zone_device *tzd; member
94 sensor->tzd = devm_thermal_of_zone_register(&pdev->dev, sensor->resource_id, in imx_sc_thermal_probe()
96 if (IS_ERR(sensor->tzd)) { in imx_sc_thermal_probe()
102 ret = PTR_ERR(sensor->tzd); in imx_sc_thermal_probe()
117 devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd); in imx_sc_thermal_probe()
Dhisi_thermal.c61 struct thermal_zone_device *tzd; member
456 thermal_zone_device_update(sensor->tzd, in hisi_thermal_alarm_irq_thread()
485 sensor->tzd = devm_thermal_of_zone_register(&pdev->dev, in hisi_thermal_register_sensor()
488 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor()
489 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor()
490 sensor->tzd = NULL; in hisi_thermal_register_sensor()
496 thermal_zone_for_each_trip(sensor->tzd, hisi_trip_walk_cb, sensor); in hisi_thermal_register_sensor()
533 struct thermal_zone_device *tzd = sensor->tzd; in hisi_thermal_toggle_sensor() local
536 thermal_zone_device_enable(tzd); in hisi_thermal_toggle_sensor()
538 thermal_zone_device_disable(tzd); in hisi_thermal_toggle_sensor()
Dsprd_thermal.c76 struct thermal_zone_device *tzd; member
323 struct thermal_zone_device *tzd = sen->tzd; in sprd_thm_toggle_sensor() local
326 thermal_zone_device_enable(tzd); in sprd_thm_toggle_sensor()
328 thermal_zone_device_disable(tzd); in sprd_thm_toggle_sensor()
407 sen->tzd = devm_thermal_of_zone_register(sen->dev, in sprd_thm_probe()
411 if (IS_ERR(sen->tzd)) { in sprd_thm_probe()
414 ret = PTR_ERR(sen->tzd); in sprd_thm_probe()
521 thm->sensor[i]->tzd); in sprd_thm_remove()
Dk3_bandgap.c85 struct thermal_zone_device *tzd; member
214 data[id].tzd = in k3_bandgap_probe()
218 if (IS_ERR(data[id].tzd)) { in k3_bandgap_probe()
220 ret = PTR_ERR(data[id].tzd); in k3_bandgap_probe()
224 devm_thermal_add_hwmon_sysfs(dev, data[id].tzd); in k3_bandgap_probe()
Damlogic_thermal.c101 struct thermal_zone_device *tzd; member
281 pdata->tzd = devm_thermal_of_zone_register(&pdev->dev, in amlogic_thermal_probe()
285 if (IS_ERR(pdata->tzd)) { in amlogic_thermal_probe()
286 ret = PTR_ERR(pdata->tzd); in amlogic_thermal_probe()
291 devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd); in amlogic_thermal_probe()
Dthermal_of.c482 struct thermal_zone_device **ptr, *tzd; in devm_thermal_of_zone_register() local
489 tzd = thermal_of_zone_register(dev->of_node, sensor_id, data, ops); in devm_thermal_of_zone_register()
490 if (IS_ERR(tzd)) { in devm_thermal_of_zone_register()
492 return tzd; in devm_thermal_of_zone_register()
495 *ptr = tzd; in devm_thermal_of_zone_register()
498 return tzd; in devm_thermal_of_zone_register()
Dsun8i_thermal.c63 struct thermal_zone_device *tzd; member
199 if (IS_ERR(tmdev->sensor[i].tzd)) in sun8i_irq_thread()
201 thermal_zone_device_update(tmdev->sensor[i].tzd, in sun8i_irq_thread()
532 tmdev->sensor[i].tzd = in sun8i_ths_register()
543 if (IS_ERR(tmdev->sensor[i].tzd)) { in sun8i_ths_register()
544 if (PTR_ERR(tmdev->sensor[i].tzd) == -EPROBE_DEFER) in sun8i_ths_register()
545 return PTR_ERR(tmdev->sensor[i].tzd); in sun8i_ths_register()
549 devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd); in sun8i_ths_register()
Dimx8mm_thermal.c87 struct thermal_zone_device *tzd; member
330 tmu->sensors[i].tzd = in imx8mm_tmu_probe()
334 if (IS_ERR(tmu->sensors[i].tzd)) { in imx8mm_tmu_probe()
335 ret = PTR_ERR(tmu->sensors[i].tzd); in imx8mm_tmu_probe()
343 devm_thermal_add_hwmon_sysfs(&pdev->dev, tmu->sensors[i].tzd); in imx8mm_tmu_probe()
Dqoriq_thermal.c148 struct thermal_zone_device *tzd; in qoriq_tmu_register_tmu_zone() local
154 tzd = devm_thermal_of_zone_register(dev, id, in qoriq_tmu_register_tmu_zone()
157 ret = PTR_ERR_OR_ZERO(tzd); in qoriq_tmu_register_tmu_zone()
170 devm_thermal_add_hwmon_sysfs(dev, tzd); in qoriq_tmu_register_tmu_zone()
Drockchip_thermal.c121 struct thermal_zone_device *tzd; member
1355 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local
1358 thermal_zone_device_enable(tzd); in rockchip_thermal_toggle_sensor()
1360 thermal_zone_device_disable(tzd); in rockchip_thermal_toggle_sensor()
1373 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread()
1491 sensor->tzd = devm_thermal_of_zone_register(&pdev->dev, id, sensor, in rockchip_thermal_register_sensor()
1493 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor()
1494 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor()
1592 error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); in rockchip_thermal_probe()
1612 thermal_remove_hwmon_sysfs(sensor->tzd); in rockchip_thermal_remove()
/linux-6.12.1/drivers/thermal/tegra/
Dtegra30-tsensor.c77 struct thermal_zone_device *tzd; member
263 thermal_zone_device_update(tsc->tzd, THERMAL_EVENT_UNSPECIFIED); in tegra_tsensor_handle_channel_interrupt()
284 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_disable_hw_channel() local
288 if (!tzd) in tegra_tsensor_disable_hw_channel()
291 err = thermal_zone_device_disable(tzd); in tegra_tsensor_disable_hw_channel()
323 static void tegra_tsensor_get_hw_channel_trips(struct thermal_zone_device *tzd, in tegra_tsensor_get_hw_channel_trips() argument
333 thermal_zone_for_each_trip(tzd, tegra_tsensor_get_trips_cb, temps); in tegra_tsensor_get_hw_channel_trips()
352 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_enable_hw_channel() local
357 if (!tzd) { in tegra_tsensor_enable_hw_channel()
365 tegra_tsensor_get_hw_channel_trips(tzd, &temps); in tegra_tsensor_enable_hw_channel()
[all …]
Dtegra-bpmp-thermal.c21 struct thermal_zone_device *tzd; member
107 thermal_zone_device_update(zone->tzd, THERMAL_TRIP_VIOLATED); in tz_device_update_work_fn()
217 struct thermal_zone_device *tzd; in tegra_bpmp_thermal_probe() local
274 tzd = devm_thermal_of_zone_register( in tegra_bpmp_thermal_probe()
276 if (IS_ERR(tzd)) { in tegra_bpmp_thermal_probe()
277 if (PTR_ERR(tzd) == -EPROBE_DEFER) in tegra_bpmp_thermal_probe()
283 zone->tzd = tzd; in tegra_bpmp_thermal_probe()
/linux-6.12.1/drivers/thermal/intel/
Dintel_pch_thermal.c86 struct thermal_zone_device *tzd; member
121 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument
123 struct pch_thermal_device *ptd = thermal_zone_device_priv(tzd); in pch_thermal_get_temp()
129 static void pch_critical(struct thermal_zone_device *tzd) in pch_critical() argument
131 dev_dbg(thermal_zone_device(tzd), "%s: critical temperature reached\n", in pch_critical()
132 thermal_zone_device_type(tzd)); in pch_critical()
238 ptd->tzd = thermal_zone_device_register_with_trips(board_names[board_id], in intel_pch_thermal_probe()
242 if (IS_ERR(ptd->tzd)) { in intel_pch_thermal_probe()
245 err = PTR_ERR(ptd->tzd); in intel_pch_thermal_probe()
248 err = thermal_zone_device_enable(ptd->tzd); in intel_pch_thermal_probe()
[all …]
Dintel_quark_dts_thermal.c115 static int soc_dts_enable(struct thermal_zone_device *tzd) in soc_dts_enable() argument
118 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_enable()
143 static int soc_dts_disable(struct thermal_zone_device *tzd) in soc_dts_disable() argument
146 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_disable()
245 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument
264 return update_trip_temp(thermal_zone_device_priv(tzd), trip_index, temp); in sys_set_trip_temp()
267 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument
292 static int sys_change_mode(struct thermal_zone_device *tzd, in sys_change_mode() argument
299 ret = soc_dts_enable(tzd); in sys_change_mode()
301 ret = soc_dts_disable(tzd); in sys_change_mode()
Dintel_bxt_pmic_thermal.c156 struct thermal_zone_device *tzd; in pmic_thermal_irq_handler() local
195 tzd = thermal_zone_get_zone_by_name(td->maps[i].handle); in pmic_thermal_irq_handler()
196 if (!IS_ERR(tzd)) in pmic_thermal_irq_handler()
197 thermal_zone_device_update(tzd, in pmic_thermal_irq_handler()
Dx86_pkg_temp_thermal.c107 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument
109 struct zone_device *zonedev = thermal_zone_device_priv(tzd); in sys_get_curr_temp()
122 sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument
125 struct zone_device *zonedev = thermal_zone_device_priv(tzd); in sys_set_trip_temp()
Dintel_soc_dts_iosf.c132 static int sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument
136 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_set_trip_temp()
151 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument
156 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_get_curr_temp()
/linux-6.12.1/include/linux/
Dthermal.h241 void *thermal_zone_device_priv(struct thermal_zone_device *tzd);
242 const char *thermal_zone_device_type(struct thermal_zone_device *tzd);
243 int thermal_zone_device_id(struct thermal_zone_device *tzd);
244 struct device *thermal_zone_device(struct thermal_zone_device *tzd);
330 static inline const char *thermal_zone_device_type(struct thermal_zone_device *tzd) in thermal_zone_device_type() argument
335 static inline int thermal_zone_device_id(struct thermal_zone_device *tzd) in thermal_zone_device_id() argument
/linux-6.12.1/drivers/hwmon/
Dscmi-hwmon.c197 struct thermal_zone_device *tzd; in scmi_thermal_sensor_register() local
211 tzd = devm_thermal_of_zone_register(dev, th_sensor->info->id, th_sensor, in scmi_thermal_sensor_register()
213 if (IS_ERR(tzd)) { in scmi_thermal_sensor_register()
216 if (PTR_ERR(tzd) != -ENODEV) in scmi_thermal_sensor_register()
217 return PTR_ERR(tzd); in scmi_thermal_sensor_register()
223 sensor->name, thermal_zone_device_id(tzd)); in scmi_thermal_sensor_register()
Dhwmon.c68 struct thermal_zone_device *tzd;/* thermal zone device */ member
221 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local
231 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor()
233 if (IS_ERR(tzd)) { in hwmon_thermal_add_sensor()
234 if (PTR_ERR(tzd) != -ENODEV) in hwmon_thermal_add_sensor()
235 return PTR_ERR(tzd); in hwmon_thermal_add_sensor()
246 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
290 thermal_zone_device_update(tzdata->tzd, in hwmon_thermal_notify()
/linux-6.12.1/drivers/thermal/qcom/
Dqcom-spmi-adc-tm5.c208 struct thermal_zone_device *tzd; member
279 if (!chip->channels[i].tzd) in adc_tm5_isr()
298 thermal_zone_device_update(chip->channels[i].tzd, in adc_tm5_isr()
340 if (!chip->channels[i].tzd) in adc_tm5_gen2_isr()
353 thermal_zone_device_update(chip->channels[i].tzd, in adc_tm5_gen2_isr()
671 struct thermal_zone_device *tzd; in adc_tm5_register_tzd() local
675 tzd = devm_thermal_of_zone_register(adc_tm->dev, in adc_tm5_register_tzd()
679 if (IS_ERR(tzd)) { in adc_tm5_register_tzd()
680 if (PTR_ERR(tzd) == -ENODEV) { in adc_tm5_register_tzd()
687 adc_tm->channels[i].channel, PTR_ERR(tzd)); in adc_tm5_register_tzd()
[all …]
/linux-6.12.1/drivers/iio/adc/
Dsun4i-gpadc-iio.c104 struct thermal_zone_device *tzd; member
639 info->tzd = devm_thermal_of_zone_register(info->sensor_device, in sun4i_gpadc_probe()
646 if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { in sun4i_gpadc_probe()
649 PTR_ERR(info->tzd)); in sun4i_gpadc_probe()
650 return PTR_ERR(info->tzd); in sun4i_gpadc_probe()
/linux-6.12.1/drivers/power/supply/
Dpower_supply_core.c1275 static int power_supply_read_temp(struct thermal_zone_device *tzd, in power_supply_read_temp() argument
1282 WARN_ON(tzd == NULL); in power_supply_read_temp()
1283 psy = thermal_zone_device_priv(tzd); in power_supply_read_temp()
1311 psy->tzd = thermal_tripless_zone_device_register(psy->desc->name, in psy_register_thermal()
1313 if (IS_ERR(psy->tzd)) in psy_register_thermal()
1314 return PTR_ERR(psy->tzd); in psy_register_thermal()
1315 ret = thermal_zone_device_enable(psy->tzd); in psy_register_thermal()
1317 thermal_zone_device_unregister(psy->tzd); in psy_register_thermal()
1326 if (IS_ERR_OR_NULL(psy->tzd)) in psy_unregister_thermal()
1328 thermal_zone_device_unregister(psy->tzd); in psy_unregister_thermal()
/linux-6.12.1/drivers/thermal/samsung/
Dexynos_tmu.c187 struct thermal_zone_device *tzd; member
283 struct thermal_zone_device *tzd = data->tzd; in exynos_thermal_zone_configure() local
286 ret = thermal_zone_get_crit_temp(tzd, &temp); in exynos_thermal_zone_configure()
763 thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED); in exynos_tmu_threaded_irq()
1087 data->tzd = devm_thermal_of_zone_register(dev, 0, data, in exynos_tmu_probe()
1089 if (IS_ERR(data->tzd)) { in exynos_tmu_probe()
1090 ret = dev_err_probe(dev, PTR_ERR(data->tzd), "Failed to register sensor\n"); in exynos_tmu_probe()

12