/Linux-v5.15/drivers/thermal/ |
D | thermal_of.c | 379 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local 382 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor() 383 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor() 386 tz = tzd->devdata; in thermal_zone_of_add_sensor() 391 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor() 395 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor() 396 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor() 403 tzd->ops->set_trips = of_thermal_set_trips; in thermal_zone_of_add_sensor() 406 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor() 408 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor() [all …]
|
D | imx_sc_thermal.c | 24 struct thermal_zone_device *tzd; member 63 dev_err(&sensor->tzd->device, "read temp sensor %d failed, ret %d\n", in imx_sc_thermal_get_temp() 112 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in imx_sc_thermal_probe() 116 if (IS_ERR(sensor->tzd)) { in imx_sc_thermal_probe() 118 ret = PTR_ERR(sensor->tzd); in imx_sc_thermal_probe() 123 if (devm_thermal_add_hwmon_sysfs(sensor->tzd)) in imx_sc_thermal_probe()
|
D | hisi_thermal.c | 70 struct thermal_zone_device *tzd; member 453 sensor->tzd, sensor->id, *temp, sensor->thres_temp); in hisi_thermal_get_temp() 477 thermal_zone_device_update(sensor->tzd, in hisi_thermal_alarm_irq_thread() 495 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in hisi_thermal_register_sensor() 498 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor() 499 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor() 500 sensor->tzd = NULL; in hisi_thermal_register_sensor() 506 trip = of_thermal_get_trip_points(sensor->tzd); in hisi_thermal_register_sensor() 508 for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); i++) { in hisi_thermal_register_sensor() 550 struct thermal_zone_device *tzd = sensor->tzd; in hisi_thermal_toggle_sensor() local [all …]
|
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_zone_of_sensor_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 | 104 struct thermal_zone_device *tzd; member 279 pdata->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in amlogic_thermal_probe() 283 if (IS_ERR(pdata->tzd)) { in amlogic_thermal_probe() 284 ret = PTR_ERR(pdata->tzd); in amlogic_thermal_probe() 289 if (devm_thermal_add_hwmon_sysfs(pdata->tzd)) in amlogic_thermal_probe()
|
D | k3_bandgap.c | 84 struct thermal_zone_device *tzd; member 213 data[id].tzd = in k3_bandgap_probe() 217 if (IS_ERR(data[id].tzd)) { in k3_bandgap_probe() 219 ret = PTR_ERR(data[id].tzd); in k3_bandgap_probe()
|
D | imx8mm_thermal.c | 50 struct thermal_zone_device *tzd; member 164 tmu->sensors[i].tzd = in imx8mm_tmu_probe() 168 if (IS_ERR(tmu->sensors[i].tzd)) { in imx8mm_tmu_probe() 169 ret = PTR_ERR(tmu->sensors[i].tzd); in imx8mm_tmu_probe()
|
D | rockchip_thermal.c | 136 struct thermal_zone_device *tzd; member 1190 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local 1193 thermal_zone_device_enable(tzd); in rockchip_thermal_toggle_sensor() 1195 thermal_zone_device_disable(tzd); in rockchip_thermal_toggle_sensor() 1208 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread() 1329 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, id, in rockchip_thermal_register_sensor() 1331 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor() 1332 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor() 1459 thermal->sensors[i].tzd->tzp->no_hwmon = false; in rockchip_thermal_probe() 1460 error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); in rockchip_thermal_probe() [all …]
|
D | sun8i_thermal.c | 63 struct thermal_zone_device *tzd; member 193 thermal_zone_device_update(tmdev->sensor[i].tzd, in sun8i_irq_thread() 470 tmdev->sensor[i].tzd = in sun8i_ths_register() 475 if (IS_ERR(tmdev->sensor[i].tzd)) in sun8i_ths_register() 476 return PTR_ERR(tmdev->sensor[i].tzd); in sun8i_ths_register() 478 if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd)) in sun8i_ths_register()
|
D | qoriq_thermal.c | 143 struct thermal_zone_device *tzd; in qoriq_tmu_register_tmu_zone() local 149 tzd = devm_thermal_zone_of_sensor_register(dev, id, in qoriq_tmu_register_tmu_zone() 152 ret = PTR_ERR_OR_ZERO(tzd); in qoriq_tmu_register_tmu_zone() 161 if (devm_thermal_add_hwmon_sysfs(tzd)) in qoriq_tmu_register_tmu_zone()
|
/Linux-v5.15/drivers/thermal/tegra/ |
D | tegra30-tsensor.c | 78 struct thermal_zone_device *tzd; member 264 thermal_zone_device_update(tsc->tzd, THERMAL_EVENT_UNSPECIFIED); in tegra_tsensor_handle_channel_interrupt() 285 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_disable_hw_channel() local 289 if (!tzd) in tegra_tsensor_disable_hw_channel() 292 err = thermal_zone_device_disable(tzd); in tegra_tsensor_disable_hw_channel() 307 static void tegra_tsensor_get_hw_channel_trips(struct thermal_zone_device *tzd, in tegra_tsensor_get_hw_channel_trips() argument 319 for (i = 0; i < tzd->trips; i++) { in tegra_tsensor_get_hw_channel_trips() 323 tzd->ops->get_trip_temp(tzd, i, &trip_temp); in tegra_tsensor_get_hw_channel_trips() 324 tzd->ops->get_trip_type(tzd, i, &type); in tegra_tsensor_get_hw_channel_trips() 350 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_enable_hw_channel() local [all …]
|
D | tegra-bpmp-thermal.c | 21 struct thermal_zone_device *tzd; member 89 thermal_zone_device_update(zone->tzd, THERMAL_TRIP_VIOLATED); in tz_device_update_work_fn() 158 struct thermal_zone_device *tzd; in tegra_bpmp_thermal_probe() local 198 tzd = devm_thermal_zone_of_sensor_register( in tegra_bpmp_thermal_probe() 200 if (IS_ERR(tzd)) { in tegra_bpmp_thermal_probe() 201 if (PTR_ERR(tzd) == -EPROBE_DEFER) in tegra_bpmp_thermal_probe() 207 zone->tzd = tzd; in tegra_bpmp_thermal_probe()
|
/Linux-v5.15/drivers/thermal/intel/ |
D | intel_quark_dts_thermal.c | 118 static int soc_dts_enable(struct thermal_zone_device *tzd) in soc_dts_enable() argument 121 struct soc_sensor_entry *aux_entry = tzd->devdata; in soc_dts_enable() 146 static int soc_dts_disable(struct thermal_zone_device *tzd) in soc_dts_disable() argument 149 struct soc_sensor_entry *aux_entry = tzd->devdata; in soc_dts_disable() 200 static inline int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument 206 static inline int sys_get_crit_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_crit_temp() argument 259 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 262 return update_trip_temp(tzd->devdata, trip, temp); in sys_set_trip_temp() 276 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 301 static int sys_change_mode(struct thermal_zone_device *tzd, in sys_change_mode() argument [all …]
|
D | intel_pch_thermal.c | 84 struct thermal_zone_device *tzd; member 289 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument 291 struct pch_thermal_device *ptd = tzd->devdata; in pch_thermal_get_temp() 296 static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip, in pch_get_trip_type() argument 299 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_type() 313 static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *temp) in pch_get_trip_temp() argument 315 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_temp() 329 static void pch_critical(struct thermal_zone_device *tzd) in pch_critical() argument 331 dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type); in pch_critical() 421 ptd->tzd = thermal_zone_device_register(bi->name, nr_trips, 0, ptd, in intel_pch_thermal_probe() [all …]
|
D | intel_soc_dts_iosf.c | 74 static int sys_get_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_get_trip_temp() argument 82 dts = tzd->devdata; in sys_get_trip_temp() 193 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 196 struct intel_soc_dts_sensor_entry *dts = tzd->devdata; in sys_set_trip_temp() 204 status = update_trip_temp(tzd->devdata, trip, temp, in sys_set_trip_temp() 211 static int sys_get_trip_type(struct thermal_zone_device *tzd, in sys_get_trip_type() argument 216 dts = tzd->devdata; in sys_get_trip_type() 223 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 232 dts = tzd->devdata; in sys_get_curr_temp()
|
D | x86_pkg_temp_thermal.c | 126 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument 128 struct zone_device *zonedev = tzd->devdata; in sys_get_curr_temp() 141 static int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument 144 struct zone_device *zonedev = tzd->devdata; in sys_get_trip_temp() 176 sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument 178 struct zone_device *zonedev = tzd->devdata; in sys_set_trip_temp()
|
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()
|
/Linux-v5.15/drivers/thermal/samsung/ |
D | exynos_tmu.c | 193 struct thermal_zone_device *tzd; member 262 struct thermal_zone_device *tzd = data->tzd; in exynos_tmu_initialize() local 264 of_thermal_get_trip_points(tzd); in exynos_tmu_initialize() 275 ret = tzd->ops->get_crit_temp(tzd, &temp); in exynos_tmu_initialize() 282 if (of_thermal_get_ntrips(tzd) > data->ntrip) { in exynos_tmu_initialize() 287 (of_thermal_get_ntrips(tzd) - data->ntrip)); in exynos_tmu_initialize() 300 min_t(int, of_thermal_get_ntrips(tzd), data->ntrip); in exynos_tmu_initialize() 307 ret = tzd->ops->get_trip_temp(tzd, i, &temp); in exynos_tmu_initialize() 314 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst); in exynos_tmu_initialize() 366 of_thermal_get_trip_points(data->tzd); in exynos4210_tmu_set_trip_temp() [all …]
|
/Linux-v5.15/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 = tzd->devdata; in sys_get_curr_temp() 147 static int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument 150 struct proc_thermal_pci *pci_info = tzd->devdata; in sys_get_trip_temp() 167 static int sys_get_trip_type(struct thermal_zone_device *tzd, int trip, in sys_get_trip_type() argument 175 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument 177 struct proc_thermal_pci *pci_info = tzd->devdata; in sys_set_trip_temp() 184 thermal_zone_device_disable(tzd); in sys_set_trip_temp() 197 thermal_zone_device_enable(tzd); in sys_set_trip_temp()
|
/Linux-v5.15/drivers/thermal/qcom/ |
D | qcom-spmi-adc-tm5.c | 115 struct thermal_zone_device *tzd; member 187 if (!chip->channels[i].tzd) in adc_tm5_isr() 206 thermal_zone_device_update(chip->channels[i].tzd, in adc_tm5_isr() 352 struct thermal_zone_device *tzd; in adc_tm5_register_tzd() local 357 tzd = devm_thermal_zone_of_sensor_register(adc_tm->dev, in adc_tm5_register_tzd() 361 if (IS_ERR(tzd)) { in adc_tm5_register_tzd() 362 if (PTR_ERR(tzd) == -ENODEV) { in adc_tm5_register_tzd() 369 adc_tm->channels[i].channel, PTR_ERR(tzd)); in adc_tm5_register_tzd() 370 return PTR_ERR(tzd); in adc_tm5_register_tzd() 372 adc_tm->channels[i].tzd = tzd; in adc_tm5_register_tzd()
|
D | tsens.c | 420 if (!s->tzd) in tsens_critical_irq_thread() 470 if (!s->tzd) in tsens_irq_thread() 514 thermal_zone_device_update(s->tzd, in tsens_irq_thread() 1052 struct thermal_zone_device *tzd; in tsens_register() local 1056 tzd = devm_thermal_zone_of_sensor_register(priv->dev, priv->sensor[i].hw_id, in tsens_register() 1059 if (IS_ERR(tzd)) in tsens_register() 1061 priv->sensor[i].tzd = tzd; in tsens_register()
|
/Linux-v5.15/drivers/iio/adc/ |
D | sun4i-gpadc-iio.c | 105 struct thermal_zone_device *tzd; member 640 info->tzd = thermal_zone_of_sensor_register(info->sensor_device, in sun4i_gpadc_probe() 647 if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { in sun4i_gpadc_probe() 650 PTR_ERR(info->tzd)); in sun4i_gpadc_probe() 651 return PTR_ERR(info->tzd); in sun4i_gpadc_probe() 684 thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd); in sun4i_gpadc_remove()
|
/Linux-v5.15/drivers/hwmon/ |
D | hwmon.c | 64 struct thermal_zone_device *tzd;/* thermal zone device */ member 205 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local 215 tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata, in hwmon_thermal_add_sensor() 221 if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) in hwmon_thermal_add_sensor() 222 return PTR_ERR(tzd); in hwmon_thermal_add_sensor() 228 tdata->tzd = tzd; in hwmon_thermal_add_sensor() 272 thermal_zone_device_update(tzdata->tzd, in hwmon_thermal_notify()
|
/Linux-v5.15/drivers/power/supply/ |
D | power_supply_core.c | 955 static int power_supply_read_temp(struct thermal_zone_device *tzd, in power_supply_read_temp() argument 962 WARN_ON(tzd == NULL); in power_supply_read_temp() 963 psy = tzd->devdata; in power_supply_read_temp() 988 psy->tzd = thermal_zone_device_register(psy->desc->name, in psy_register_thermal() 990 if (IS_ERR(psy->tzd)) in psy_register_thermal() 991 return PTR_ERR(psy->tzd); in psy_register_thermal() 992 ret = thermal_zone_device_enable(psy->tzd); in psy_register_thermal() 994 thermal_zone_device_unregister(psy->tzd); in psy_register_thermal() 1003 if (IS_ERR_OR_NULL(psy->tzd)) in psy_unregister_thermal() 1005 thermal_zone_device_unregister(psy->tzd); in psy_unregister_thermal()
|
/Linux-v5.15/drivers/regulator/ |
D | max8973-regulator.c | 487 struct thermal_zone_device *tzd; in max8973_thermal_init() local 495 tzd = devm_thermal_zone_of_sensor_register(mchip->dev, 0, mchip, in max8973_thermal_init() 497 if (IS_ERR(tzd)) { in max8973_thermal_init() 498 ret = PTR_ERR(tzd); in max8973_thermal_init()
|