/Linux-v6.6/drivers/thermal/ |
D | loongson2_thermal.c | 74 struct thermal_zone_device *tzd = dev; in loongson2_thermal_irq_thread() local 75 struct loongson2_thermal_data *data = thermal_zone_device_priv(tzd); in loongson2_thermal_irq_thread() 80 thermal_zone_device_update(tzd, THERMAL_EVENT_UNSPECIFIED); in loongson2_thermal_irq_thread() 101 struct thermal_zone_device *tzd; in loongson2_thermal_probe() local 124 tzd = devm_thermal_of_zone_register(dev, i, data, in loongson2_thermal_probe() 127 if (!IS_ERR(tzd)) in loongson2_thermal_probe() 130 if (PTR_ERR(tzd) != ENODEV) in loongson2_thermal_probe() 133 return dev_err_probe(dev, PTR_ERR(tzd), "failed to register"); in loongson2_thermal_probe() 137 IRQF_ONESHOT, "loongson2_thermal", tzd); in loongson2_thermal_probe() 141 devm_thermal_add_hwmon_sysfs(dev, tzd); in loongson2_thermal_probe()
|
D | imx_sc_thermal.c | 22 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() 118 devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd); in imx_sc_thermal_probe()
|
D | hisi_thermal.c | 61 struct thermal_zone_device *tzd; member 461 thermal_zone_device_update(sensor->tzd, in hisi_thermal_alarm_irq_thread() 479 sensor->tzd = devm_thermal_of_zone_register(&pdev->dev, in hisi_thermal_register_sensor() 482 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor() 483 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor() 484 sensor->tzd = NULL; in hisi_thermal_register_sensor() 490 for (i = 0; i < thermal_zone_get_num_trips(sensor->tzd); i++) { in hisi_thermal_register_sensor() 492 thermal_zone_get_trip(sensor->tzd, i, &trip); in hisi_thermal_register_sensor() 535 struct thermal_zone_device *tzd = sensor->tzd; in hisi_thermal_toggle_sensor() local 538 thermal_zone_device_enable(tzd); in hisi_thermal_toggle_sensor() [all …]
|
D | k3_bandgap.c | 86 struct thermal_zone_device *tzd; member 215 data[id].tzd = in k3_bandgap_probe() 219 if (IS_ERR(data[id].tzd)) { in k3_bandgap_probe() 221 ret = PTR_ERR(data[id].tzd); in k3_bandgap_probe() 225 devm_thermal_add_hwmon_sysfs(dev, data[id].tzd); in k3_bandgap_probe()
|
D | sprd_thermal.c | 76 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() 411 sen->tzd = devm_thermal_of_zone_register(sen->dev, in sprd_thm_probe() 415 if (IS_ERR(sen->tzd)) { in sprd_thm_probe() 418 ret = PTR_ERR(sen->tzd); in sprd_thm_probe() 527 thm->sensor[i]->tzd); in sprd_thm_remove()
|
D | amlogic_thermal.c | 101 struct thermal_zone_device *tzd; member 273 pdata->tzd = devm_thermal_of_zone_register(&pdev->dev, in amlogic_thermal_probe() 277 if (IS_ERR(pdata->tzd)) { in amlogic_thermal_probe() 278 ret = PTR_ERR(pdata->tzd); in amlogic_thermal_probe() 283 devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd); in amlogic_thermal_probe()
|
D | thermal_of.c | 570 struct thermal_zone_device **ptr, *tzd; in devm_thermal_of_zone_register() local 577 tzd = thermal_of_zone_register(dev->of_node, sensor_id, data, ops); in devm_thermal_of_zone_register() 578 if (IS_ERR(tzd)) { in devm_thermal_of_zone_register() 580 return tzd; in devm_thermal_of_zone_register() 583 *ptr = tzd; in devm_thermal_of_zone_register() 586 return tzd; in devm_thermal_of_zone_register()
|
D | imx8mm_thermal.c | 87 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()
|
D | sun8i_thermal.c | 61 struct thermal_zone_device *tzd; member 191 thermal_zone_device_update(tmdev->sensor[i].tzd, in sun8i_irq_thread() 463 tmdev->sensor[i].tzd = in sun8i_ths_register() 468 if (IS_ERR(tmdev->sensor[i].tzd)) in sun8i_ths_register() 469 return PTR_ERR(tmdev->sensor[i].tzd); in sun8i_ths_register() 471 devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd); in sun8i_ths_register()
|
D | qoriq_thermal.c | 144 struct thermal_zone_device *tzd; in qoriq_tmu_register_tmu_zone() local 150 tzd = devm_thermal_of_zone_register(dev, id, in qoriq_tmu_register_tmu_zone() 153 ret = PTR_ERR_OR_ZERO(tzd); in qoriq_tmu_register_tmu_zone() 166 devm_thermal_add_hwmon_sysfs(dev, tzd); in qoriq_tmu_register_tmu_zone()
|
D | rockchip_thermal.c | 121 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-v6.6/drivers/thermal/tegra/ |
D | tegra30-tsensor.c | 77 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() 306 static void tegra_tsensor_get_hw_channel_trips(struct thermal_zone_device *tzd, in tegra_tsensor_get_hw_channel_trips() argument 318 for (i = 0; i < thermal_zone_get_num_trips(tzd); i++) { in tegra_tsensor_get_hw_channel_trips() 322 thermal_zone_get_trip(tzd, i, &trip); in tegra_tsensor_get_hw_channel_trips() 348 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_enable_hw_channel() local 352 if (!tzd) { in tegra_tsensor_enable_hw_channel() [all …]
|
D | tegra-bpmp-thermal.c | 21 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-v6.6/drivers/thermal/intel/ |
D | intel_quark_dts_thermal.c | 120 static int soc_dts_enable(struct thermal_zone_device *tzd) in soc_dts_enable() argument 123 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_enable() 148 static int soc_dts_disable(struct thermal_zone_device *tzd) in soc_dts_disable() argument 151 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_disable() 250 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 253 return update_trip_temp(thermal_zone_device_priv(tzd), trip, temp); in sys_set_trip_temp() 256 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 281 static int sys_change_mode(struct thermal_zone_device *tzd, in sys_change_mode() argument 288 ret = soc_dts_enable(tzd); in sys_change_mode() 290 ret = soc_dts_disable(tzd); in sys_change_mode()
|
D | intel_pch_thermal.c | 86 struct thermal_zone_device *tzd; member 120 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument 122 struct pch_thermal_device *ptd = thermal_zone_device_priv(tzd); in pch_thermal_get_temp() 128 static void pch_critical(struct thermal_zone_device *tzd) in pch_critical() argument 130 dev_dbg(thermal_zone_device(tzd), "%s: critical temperature reached\n", in pch_critical() 131 thermal_zone_device_type(tzd)); in pch_critical() 236 ptd->tzd = thermal_zone_device_register_with_trips(board_names[board_id], in intel_pch_thermal_probe() 240 if (IS_ERR(ptd->tzd)) { in intel_pch_thermal_probe() 243 err = PTR_ERR(ptd->tzd); in intel_pch_thermal_probe() 246 err = thermal_zone_device_enable(ptd->tzd); in intel_pch_thermal_probe() [all …]
|
D | intel_bxt_pmic_thermal.c | 156 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()
|
D | intel_soc_dts_iosf.c | 148 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 151 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_set_trip_temp() 165 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 170 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_get_curr_temp()
|
D | x86_pkg_temp_thermal.c | 108 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument 110 struct zone_device *zonedev = thermal_zone_device_priv(tzd); in sys_get_curr_temp() 123 sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument 125 struct zone_device *zonedev = thermal_zone_device_priv(tzd); in sys_set_trip_temp()
|
/Linux-v6.6/include/linux/ |
D | thermal.h | 320 void *thermal_zone_device_priv(struct thermal_zone_device *tzd); 321 const char *thermal_zone_device_type(struct thermal_zone_device *tzd); 322 int thermal_zone_device_id(struct thermal_zone_device *tzd); 323 struct device *thermal_zone_device(struct thermal_zone_device *tzd); 417 static inline const char *thermal_zone_device_type(struct thermal_zone_device *tzd) in thermal_zone_device_type() argument 422 static inline int thermal_zone_device_id(struct thermal_zone_device *tzd) in thermal_zone_device_id() argument
|
/Linux-v6.6/drivers/hwmon/ |
D | scmi-hwmon.c | 197 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()
|
D | hwmon.c | 67 struct thermal_zone_device *tzd;/* thermal zone device */ member 220 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local 230 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor() 232 if (IS_ERR(tzd)) { in hwmon_thermal_add_sensor() 233 if (PTR_ERR(tzd) != -ENODEV) in hwmon_thermal_add_sensor() 234 return PTR_ERR(tzd); in hwmon_thermal_add_sensor() 245 tdata->tzd = tzd; in hwmon_thermal_add_sensor() 289 thermal_zone_device_update(tzdata->tzd, in hwmon_thermal_notify()
|
/Linux-v6.6/drivers/thermal/qcom/ |
D | qcom-spmi-adc-tm5.c | 208 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-v6.6/drivers/thermal/samsung/ |
D | exynos_tmu.c | 192 struct thermal_zone_device *tzd; member 261 struct thermal_zone_device *tzd = data->tzd; in exynos_tmu_initialize() local 262 int num_trips = thermal_zone_get_num_trips(tzd); in exynos_tmu_initialize() 266 ret = thermal_zone_get_crit_temp(tzd, &temp); in exynos_tmu_initialize() 300 ret = thermal_zone_get_trip(tzd, i, &trip); in exynos_tmu_initialize() 356 if (thermal_zone_get_trip(data->tzd, 0, &trip)) in exynos4210_tmu_set_trip_temp() 554 struct thermal_zone_device *tz = data->tzd; in exynos4210_tmu_control() 585 struct thermal_zone_device *tz = data->tzd; in exynos5433_tmu_control() 617 struct thermal_zone_device *tz = data->tzd; in exynos7_tmu_control() 774 thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED); in exynos_tmu_work() [all …]
|
/Linux-v6.6/drivers/iio/adc/ |
D | sun4i-gpadc-iio.c | 104 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-v6.6/drivers/thermal/intel/int340x_thermal/ |
D | processor_thermal_device_pci.c | 136 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument 138 struct proc_thermal_pci *pci_info = thermal_zone_device_priv(tzd); in sys_get_curr_temp() 147 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument 149 struct proc_thermal_pci *pci_info = thermal_zone_device_priv(tzd); in sys_set_trip_temp()
|