Home
last modified time | relevance | path

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

/Linux-v4.19/drivers/thermal/
Dof-thermal.c391 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local
394 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor()
395 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor()
398 tz = tzd->devdata; in thermal_zone_of_add_sensor()
403 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor()
407 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor()
408 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor()
415 tzd->ops->set_trips = of_thermal_set_trips; in thermal_zone_of_add_sensor()
418 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor()
420 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor()
[all …]
Dintel_quark_dts_thermal.c122 static int soc_dts_enable(struct thermal_zone_device *tzd) in soc_dts_enable() argument
125 struct soc_sensor_entry *aux_entry = tzd->devdata; in soc_dts_enable()
155 static int soc_dts_disable(struct thermal_zone_device *tzd) in soc_dts_disable() argument
158 struct soc_sensor_entry *aux_entry = tzd->devdata; in soc_dts_disable()
214 static inline int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument
220 static inline int sys_get_crit_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_crit_temp() argument
273 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument
276 return update_trip_temp(tzd->devdata, trip, temp); in sys_set_trip_temp()
290 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument
315 static int sys_get_mode(struct thermal_zone_device *tzd, in sys_get_mode() argument
[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()
Dintel_pch_thermal.c70 struct thermal_zone_device *tzd; member
233 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument
235 struct pch_thermal_device *ptd = tzd->devdata; in pch_thermal_get_temp()
240 static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip, in pch_get_trip_type() argument
243 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_type()
257 static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *temp) in pch_get_trip_temp() argument
259 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_temp()
349 ptd->tzd = thermal_zone_device_register(bi->name, nr_trips, 0, ptd, in intel_pch_thermal_probe()
351 if (IS_ERR(ptd->tzd)) { in intel_pch_thermal_probe()
354 err = PTR_ERR(ptd->tzd); in intel_pch_thermal_probe()
[all …]
Dhisi_thermal.c62 struct thermal_zone_device *tzd; member
464 thermal_zone_device_update(data->sensor.tzd, in hisi_thermal_alarm_irq_thread()
482 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in hisi_thermal_register_sensor()
485 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor()
486 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor()
487 sensor->tzd = NULL; in hisi_thermal_register_sensor()
493 trip = of_thermal_get_trip_points(sensor->tzd); in hisi_thermal_register_sensor()
495 for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); i++) { in hisi_thermal_register_sensor()
521 struct thermal_zone_device *tzd = sensor->tzd; in hisi_thermal_toggle_sensor() local
523 tzd->ops->set_mode(tzd, in hisi_thermal_toggle_sensor()
Dintel_soc_dts_iosf.c82 static int sys_get_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_get_trip_temp() argument
90 dts = tzd->devdata; in sys_get_trip_temp()
198 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument
201 struct intel_soc_dts_sensor_entry *dts = tzd->devdata; in sys_set_trip_temp()
209 status = update_trip_temp(tzd->devdata, trip, temp, in sys_set_trip_temp()
216 static int sys_get_trip_type(struct thermal_zone_device *tzd, in sys_get_trip_type() argument
221 dts = tzd->devdata; in sys_get_trip_type()
228 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument
236 dts = tzd->devdata; in sys_get_curr_temp()
Dx86_pkg_temp_thermal.c151 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument
153 struct pkg_device *pkgdev = tzd->devdata; in sys_get_curr_temp()
165 static int sys_get_trip_temp(struct thermal_zone_device *tzd, in sys_get_trip_temp() argument
168 struct pkg_device *pkgdev = tzd->devdata; in sys_get_trip_temp()
200 sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp) in sys_set_trip_temp() argument
202 struct pkg_device *pkgdev = tzd->devdata; in sys_set_trip_temp()
Dintel_bxt_pmic_thermal.c165 struct thermal_zone_device *tzd; in pmic_thermal_irq_handler() local
204 tzd = thermal_zone_get_zone_by_name(td->maps[i].handle); in pmic_thermal_irq_handler()
205 if (!IS_ERR(tzd)) in pmic_thermal_irq_handler()
206 thermal_zone_device_update(tzd, in pmic_thermal_irq_handler()
Drockchip_thermal.c141 struct thermal_zone_device *tzd; member
1028 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local
1030 tzd->ops->set_mode(tzd, in rockchip_thermal_toggle_sensor()
1044 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread()
1165 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, id, in rockchip_thermal_register_sensor()
1167 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor()
1168 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor()
/Linux-v4.19/drivers/platform/x86/
Dintel_mid_thermal.c89 struct thermal_zone_device *tzd[MSIC_THERMAL_SENSORS]; member
177 static int mid_read_temp(struct thermal_zone_device *tzd, int *temp) in mid_read_temp() argument
179 struct thermal_device_info *td_info = tzd->devdata; in mid_read_temp()
457 static int read_curr_temp(struct thermal_zone_device *tzd, int *temp) in read_curr_temp() argument
459 WARN_ON(tzd == NULL); in read_curr_temp()
460 return mid_read_temp(tzd, temp); in read_curr_temp()
505 pinfo->tzd[i] = thermal_zone_device_register(name[i], in mid_thermal_probe()
507 if (IS_ERR(pinfo->tzd[i])) { in mid_thermal_probe()
509 ret = PTR_ERR(pinfo->tzd[i]); in mid_thermal_probe()
520 kfree(pinfo->tzd[i]->devdata); in mid_thermal_probe()
[all …]
/Linux-v4.19/drivers/thermal/tegra/
Dtegra-bpmp-thermal.c30 struct thermal_zone_device *tzd; member
98 thermal_zone_device_update(zone->tzd, THERMAL_TRIP_VIOLATED); in tz_device_update_work_fn()
167 struct thermal_zone_device *tzd; in tegra_bpmp_thermal_probe() local
207 tzd = devm_thermal_zone_of_sensor_register( in tegra_bpmp_thermal_probe()
209 if (IS_ERR(tzd)) { in tegra_bpmp_thermal_probe()
210 if (PTR_ERR(tzd) == -EPROBE_DEFER) in tegra_bpmp_thermal_probe()
216 zone->tzd = tzd; in tegra_bpmp_thermal_probe()
/Linux-v4.19/drivers/thermal/samsung/
Dexynos_tmu.c204 struct thermal_zone_device *tzd; member
273 struct thermal_zone_device *tzd = data->tzd; in exynos_tmu_initialize() local
275 of_thermal_get_trip_points(tzd); in exynos_tmu_initialize()
286 ret = tzd->ops->get_crit_temp(tzd, &temp); in exynos_tmu_initialize()
293 if (of_thermal_get_ntrips(tzd) > data->ntrip) { in exynos_tmu_initialize()
298 (of_thermal_get_ntrips(tzd) - data->ntrip)); in exynos_tmu_initialize()
311 min_t(int, of_thermal_get_ntrips(tzd), data->ntrip); in exynos_tmu_initialize()
318 ret = tzd->ops->get_trip_temp(tzd, i, &temp); in exynos_tmu_initialize()
325 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst); in exynos_tmu_initialize()
377 of_thermal_get_trip_points(data->tzd); in exynos4210_tmu_set_trip_temp()
[all …]
/Linux-v4.19/drivers/thermal/qcom/
Dtsens.c91 struct thermal_zone_device *tzd; in tsens_register() local
101 tzd = devm_thermal_zone_of_sensor_register(tmdev->dev, i, in tsens_register()
104 if (IS_ERR(tzd)) in tsens_register()
106 tmdev->sensor[i].tzd = tzd; in tsens_register()
Dtsens.h26 struct thermal_zone_device *tzd; member
Dtsens-8960.c249 slope = thermal_zone_get_slope(s->tzd); in code_to_mdegC()
/Linux-v4.19/drivers/iio/adc/
Dsun4i-gpadc-iio.c108 struct thermal_zone_device *tzd; member
649 info->tzd = thermal_zone_of_sensor_register(info->sensor_device, in sun4i_gpadc_probe()
656 if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { in sun4i_gpadc_probe()
659 PTR_ERR(info->tzd)); in sun4i_gpadc_probe()
660 return PTR_ERR(info->tzd); in sun4i_gpadc_probe()
693 thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd); in sun4i_gpadc_remove()
/Linux-v4.19/drivers/power/supply/
Dpower_supply_core.c696 static int power_supply_read_temp(struct thermal_zone_device *tzd, in power_supply_read_temp() argument
703 WARN_ON(tzd == NULL); in power_supply_read_temp()
704 psy = tzd->devdata; in power_supply_read_temp()
729 psy->tzd = thermal_zone_device_register(psy->desc->name, in psy_register_thermal()
731 return PTR_ERR_OR_ZERO(psy->tzd); in psy_register_thermal()
739 if (IS_ERR_OR_NULL(psy->tzd)) in psy_unregister_thermal()
741 thermal_zone_device_unregister(psy->tzd); in psy_unregister_thermal()
/Linux-v4.19/drivers/hwmon/
Dhwmon.c146 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local
155 tzd = devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata, in hwmon_thermal_add_sensor()
161 if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) in hwmon_thermal_add_sensor()
162 return PTR_ERR(tzd); in hwmon_thermal_add_sensor()
/Linux-v4.19/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()
/Linux-v4.19/include/linux/
Dpower_supply.h275 struct thermal_zone_device *tzd; member
/Linux-v4.19/Documentation/thermal/
Dsysfs-api.txt118 struct thermal_zone_device *tzd)
141 struct thermal_zone_device *tzd)