Home
last modified time | relevance | path

Searched refs:tzd (Results 1 - 25 of 60) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/thermal/
H A 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 in thermal_zone_of_add_sensor()
497 struct thermal_zone_device *tzd = ERR_PTR(-ENODEV); thermal_zone_of_sensor_register() local
551 thermal_zone_of_sensor_unregister(struct device *dev, struct thermal_zone_device *tzd) thermal_zone_of_sensor_unregister() argument
619 struct thermal_zone_device **ptr, *tzd; devm_thermal_zone_of_sensor_register() local
652 devm_thermal_zone_of_sensor_unregister(struct device *dev, struct thermal_zone_device *tzd) devm_thermal_zone_of_sensor_unregister() argument
[all...]
H A Dzx2967_thermal.c43 * @tzd: struct thermal_zone_device where the sensor is registered
52 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()
[all...]
H A 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()
H A Dhisi_thermal.c70 struct thermal_zone_device *tzd; member
448 dev_dbg(&data->pdev->dev, "tzd=%p, id=%d, temp=%d, thres=%d\n", in hisi_thermal_get_temp()
449 sensor->tzd, sensor->id, *temp, sensor->thres_temp); in hisi_thermal_get_temp()
473 thermal_zone_device_update(sensor->tzd, in hisi_thermal_alarm_irq_thread()
491 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, in hisi_thermal_register_sensor()
494 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor()
495 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor()
496 sensor->tzd = NULL; in hisi_thermal_register_sensor()
502 trip = of_thermal_get_trip_points(sensor->tzd); in hisi_thermal_register_sensor()
504 for (i = 0; i < of_thermal_get_ntrips(sensor->tzd); in hisi_thermal_register_sensor()
546 struct thermal_zone_device *tzd = sensor->tzd; hisi_thermal_toggle_sensor() local
[all...]
H A 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()
H A 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()
/kernel/linux/linux-6.6/drivers/thermal/
H A Dloongson2_thermal.c74 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()
[all...]
H A 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()
118 devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd); in imx_sc_thermal_probe()
H A Dhisi_thermal.c61 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
[all...]
H A 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_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()
H A Damlogic_thermal.c101 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()
H A Dk3_bandgap.c86 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()
/kernel/linux/linux-5.10/drivers/platform/x86/
H A 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[ in mid_thermal_probe()
[all...]
/kernel/linux/linux-5.10/drivers/thermal/intel/
H A 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...]
H A 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...]
H A 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()
/kernel/linux/linux-6.6/drivers/thermal/intel/
H A Dintel_pch_thermal.c86 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...]
H A Dintel_quark_dts_thermal.c120 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()
[all...]
/kernel/linux/linux-6.6/drivers/thermal/tegra/
H A 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()
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 in tegra_tsensor_enable_hw_channel() local
[all...]
H A 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()
/kernel/linux/linux-5.10/drivers/thermal/tegra/
H A 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/
H A Dexynos_tmu.c165 * @tzd: pointer to thermal_zone_device structure
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), dat in exynos_tmu_initialize()
1139 struct thermal_zone_device *tzd = data->tzd; exynos_tmu_remove() local
[all...]
/kernel/linux/linux-6.6/drivers/thermal/qcom/
H A Dqcom-spmi-adc-tm5.c193 * @tzd: thermal zone device used by this channel.
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) in adc_tm5_register_tzd()
[all...]
/kernel/linux/linux-6.6/include/linux/
H A Dthermal.h322 void *thermal_zone_device_priv(struct thermal_zone_device *tzd);
323 const char *thermal_zone_device_type(struct thermal_zone_device *tzd);
324 int thermal_zone_device_id(struct thermal_zone_device *tzd);
325 struct device *thermal_zone_device(struct thermal_zone_device *tzd);
419 static inline const char *thermal_zone_device_type(struct thermal_zone_device *tzd) in thermal_zone_device_type() argument
424 static inline int thermal_zone_device_id(struct thermal_zone_device *tzd) in thermal_zone_device_id() argument
/kernel/linux/linux-6.6/drivers/hwmon/
H A 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()

Completed in 22 milliseconds

123