Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/drivers/thermal/
Dthermal_of.c382 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local
385 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor()
386 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor()
389 tz = tzd->devdata; in thermal_zone_of_add_sensor()
394 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor()
398 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor()
399 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor()
406 tzd->ops->set_trips = of_thermal_set_trips; in thermal_zone_of_add_sensor()
409 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor()
411 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor()
[all …]
Dzx2967_thermal.c52 struct thermal_zone_device *tzd; member
67 if (!priv->tzd) in zx2967_thermal_get_temp()
106 *temp = DIV_ROUND_CLOSEST(((s32)val + priv->tzd->tzp->offset) * 1000, in zx2967_thermal_get_temp()
107 priv->tzd->tzp->slope); in zx2967_thermal_get_temp()
162 priv->tzd = thermal_zone_of_sensor_register(&pdev->dev, in zx2967_thermal_probe()
165 if (IS_ERR(priv->tzd)) { in zx2967_thermal_probe()
166 ret = PTR_ERR(priv->tzd); in zx2967_thermal_probe()
171 if (priv->tzd->tzp->slope == 0) { in zx2967_thermal_probe()
172 thermal_zone_of_sensor_unregister(&pdev->dev, priv->tzd); in zx2967_thermal_probe()
194 thermal_zone_of_sensor_unregister(&pdev->dev, priv->tzd); in zx2967_thermal_exit()
Dimx_sc_thermal.c24 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()
Dhisi_thermal.c70 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 …]
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()
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()
Dk3_bandgap.c84 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()
Dimx8mm_thermal.c51 struct thermal_zone_device *tzd; member
173 tmu->sensors[i].tzd = in imx8mm_tmu_probe()
177 if (IS_ERR(tmu->sensors[i].tzd)) { in imx8mm_tmu_probe()
181 return PTR_ERR(tmu->sensors[i].tzd); in imx8mm_tmu_probe()
Damlogic_thermal.c103 struct thermal_zone_device *tzd; member
280 pdata->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in amlogic_thermal_probe()
284 if (IS_ERR(pdata->tzd)) { in amlogic_thermal_probe()
285 ret = PTR_ERR(pdata->tzd); in amlogic_thermal_probe()
Drockchip_thermal.c136 struct thermal_zone_device *tzd; member
1069 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local
1072 thermal_zone_device_enable(tzd); in rockchip_thermal_toggle_sensor()
1074 thermal_zone_device_disable(tzd); in rockchip_thermal_toggle_sensor()
1087 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread()
1208 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, id, in rockchip_thermal_register_sensor()
1210 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor()
1211 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor()
1338 thermal->sensors[i].tzd->tzp->no_hwmon = false; in rockchip_thermal_probe()
1339 error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); in rockchip_thermal_probe()
[all …]
Dsun8i_thermal.c62 struct thermal_zone_device *tzd; member
192 thermal_zone_device_update(tmdev->sensor[i].tzd, in sun8i_irq_thread()
469 tmdev->sensor[i].tzd = in sun8i_ths_register()
474 if (IS_ERR(tmdev->sensor[i].tzd)) in sun8i_ths_register()
475 return PTR_ERR(tmdev->sensor[i].tzd); in sun8i_ths_register()
477 if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd)) in sun8i_ths_register()
Dqoriq_thermal.c143 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()
/kernel/linux/linux-5.10/drivers/platform/x86/
Dintel_mid_thermal.c73 struct thermal_zone_device *tzd[MSIC_THERMAL_SENSORS]; member
161 static int mid_read_temp(struct thermal_zone_device *tzd, int *temp) in mid_read_temp() argument
163 struct thermal_device_info *td_info = tzd->devdata; in mid_read_temp()
441 static int read_curr_temp(struct thermal_zone_device *tzd, int *temp) in read_curr_temp() argument
443 WARN_ON(tzd == NULL); in read_curr_temp()
444 return mid_read_temp(tzd, temp); in read_curr_temp()
489 pinfo->tzd[i] = thermal_zone_device_register(name[i], in mid_thermal_probe()
491 if (IS_ERR(pinfo->tzd[i])) { in mid_thermal_probe()
493 ret = PTR_ERR(pinfo->tzd[i]); in mid_thermal_probe()
496 ret = thermal_zone_device_enable(pinfo->tzd[i]); in mid_thermal_probe()
[all …]
/kernel/linux/linux-5.10/drivers/thermal/intel/
Dintel_quark_dts_thermal.c118 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 …]
Dintel_pch_thermal.c64 struct thermal_zone_device *tzd; member
227 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument
229 struct pch_thermal_device *ptd = tzd->devdata; in pch_thermal_get_temp()
234 static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip, in pch_get_trip_type() argument
237 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_type()
251 static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *temp) in pch_get_trip_temp() argument
253 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_temp()
348 ptd->tzd = thermal_zone_device_register(bi->name, nr_trips, 0, ptd, in intel_pch_thermal_probe()
350 if (IS_ERR(ptd->tzd)) { in intel_pch_thermal_probe()
353 err = PTR_ERR(ptd->tzd); in intel_pch_thermal_probe()
[all …]
Dintel_soc_dts_iosf.c74 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()
Dx86_pkg_temp_thermal.c124 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument
126 struct zone_device *zonedev = tzd->devdata; in sys_get_curr_temp()
139 static int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument
142 struct zone_device *zonedev = tzd->devdata; in sys_get_trip_temp()
174 sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument
176 struct zone_device *zonedev = tzd->devdata; in sys_set_trip_temp()
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()
/kernel/linux/linux-5.10/drivers/thermal/tegra/
Dtegra-bpmp-thermal.c21 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()
/kernel/linux/linux-5.10/drivers/thermal/samsung/
Dexynos_tmu.c193 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 …]
/kernel/linux/linux-5.10/drivers/iio/adc/
Dsun4i-gpadc-iio.c105 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()
/kernel/linux/linux-5.10/drivers/hwmon/
Dhwmon.c64 struct thermal_zone_device *tzd;/* thermal zone device */ member
169 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local
179 tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata, in hwmon_thermal_add_sensor()
181 if (IS_ERR(tzd)) { in hwmon_thermal_add_sensor()
182 if (PTR_ERR(tzd) != -ENODEV) in hwmon_thermal_add_sensor()
183 return PTR_ERR(tzd); in hwmon_thermal_add_sensor()
194 tdata->tzd = tzd; in hwmon_thermal_add_sensor()
238 thermal_zone_device_update(tzdata->tzd, in hwmon_thermal_notify()
/kernel/linux/linux-5.10/drivers/power/supply/
Dpower_supply_core.c945 static int power_supply_read_temp(struct thermal_zone_device *tzd, in power_supply_read_temp() argument
952 WARN_ON(tzd == NULL); in power_supply_read_temp()
953 psy = tzd->devdata; in power_supply_read_temp()
978 psy->tzd = thermal_zone_device_register(psy->desc->name, in psy_register_thermal()
980 if (IS_ERR(psy->tzd)) in psy_register_thermal()
981 return PTR_ERR(psy->tzd); in psy_register_thermal()
982 ret = thermal_zone_device_enable(psy->tzd); in psy_register_thermal()
984 thermal_zone_device_unregister(psy->tzd); in psy_register_thermal()
993 if (IS_ERR_OR_NULL(psy->tzd)) in psy_unregister_thermal()
995 thermal_zone_device_unregister(psy->tzd); in psy_unregister_thermal()
/kernel/linux/linux-5.10/drivers/thermal/qcom/
Dtsens.c418 if (!s->tzd) in tsens_critical_irq_thread()
468 if (!s->tzd) in tsens_irq_thread()
512 thermal_zone_device_update(s->tzd, in tsens_irq_thread()
966 struct thermal_zone_device *tzd; in tsens_register() local
970 tzd = devm_thermal_zone_of_sensor_register(priv->dev, priv->sensor[i].hw_id, in tsens_register()
973 if (IS_ERR(tzd)) in tsens_register()
975 priv->sensor[i].tzd = tzd; in tsens_register()
/kernel/linux/linux-5.10/drivers/regulator/
Dmax8973-regulator.c510 struct thermal_zone_device *tzd; in max8973_thermal_init() local
518 tzd = devm_thermal_zone_of_sensor_register(mchip->dev, 0, mchip, in max8973_thermal_init()
520 if (IS_ERR(tzd)) { in max8973_thermal_init()
521 ret = PTR_ERR(tzd); in max8973_thermal_init()
/kernel/linux/patches/linux-5.10/imx8mm_patch/patches/drivers/
D0033_linux_drivers_soc_scsi_spi_tee_thermal.patch4629 struct thermal_zone_device *tzd;
4669 + if (!sensor->tzd)
4674 + if (sensor->tzd->temperature >= (trip_temp - IMX_TEMP_PASSIVE_COOL_DELTA))
4711 return PTR_ERR(tmu->sensors[i].tzd);
4724 + ret = thermal_zone_bind_cooling_device(tmu->sensors[i].tzd,
4733 + tmu->sensors[i].tzd->type, tmu->sensors[i].cdev->type, ret);
4738 + trips = of_thermal_get_trip_points(tmu->sensors[i].tzd);
4767 struct thermal_zone_device *tzd;
4790 - dev_err(&sensor->tzd->device, "read temp sensor %d failed, ret %d\n",
4813 + if (!sensor->tzd)
[all …]

12