/Linux-v5.4/drivers/thermal/ |
D | of-thermal.c | 417 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local 420 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor() 421 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor() 424 tz = tzd->devdata; in thermal_zone_of_add_sensor() 429 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor() 433 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor() 434 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor() 441 tzd->ops->set_trips = of_thermal_set_trips; in thermal_zone_of_add_sensor() 444 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor() 446 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor() [all …]
|
D | zx2967_thermal.c | 51 struct thermal_zone_device *tzd; member 66 if (!priv->tzd) in zx2967_thermal_get_temp() 105 *temp = DIV_ROUND_CLOSEST(((s32)val + priv->tzd->tzp->offset) * 1000, in zx2967_thermal_get_temp() 106 priv->tzd->tzp->slope); in zx2967_thermal_get_temp() 161 priv->tzd = thermal_zone_of_sensor_register(&pdev->dev, in zx2967_thermal_probe() 164 if (IS_ERR(priv->tzd)) { in zx2967_thermal_probe() 165 ret = PTR_ERR(priv->tzd); in zx2967_thermal_probe() 170 if (priv->tzd->tzp->slope == 0) { in zx2967_thermal_probe() 171 thermal_zone_of_sensor_unregister(&pdev->dev, priv->tzd); in zx2967_thermal_probe() 193 thermal_zone_of_sensor_unregister(&pdev->dev, priv->tzd); in zx2967_thermal_exit()
|
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 | qoriq_thermal.c | 69 struct thermal_zone_device *tzd; member 126 qdata->sensor[id]->tzd = devm_thermal_zone_of_sensor_register( in qoriq_tmu_register_tmu_zone() 128 if (IS_ERR(qdata->sensor[id]->tzd)) { in qoriq_tmu_register_tmu_zone() 129 if (PTR_ERR(qdata->sensor[id]->tzd) == -ENODEV) in qoriq_tmu_register_tmu_zone() 132 return PTR_ERR(qdata->sensor[id]->tzd); in qoriq_tmu_register_tmu_zone()
|
D | rockchip_thermal.c | 133 struct thermal_zone_device *tzd; member 1058 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local 1060 tzd->ops->set_mode(tzd, in rockchip_thermal_toggle_sensor() 1074 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread() 1195 sensor->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, id, in rockchip_thermal_register_sensor() 1197 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor() 1198 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor()
|
/Linux-v5.4/drivers/thermal/intel/ |
D | intel_quark_dts_thermal.c | 122 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 …]
|
D | intel_pch_thermal.c | 61 struct thermal_zone_device *tzd; member 224 static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) in pch_thermal_get_temp() argument 226 struct pch_thermal_device *ptd = tzd->devdata; in pch_thermal_get_temp() 231 static int pch_get_trip_type(struct thermal_zone_device *tzd, int trip, in pch_get_trip_type() argument 234 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_type() 248 static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *temp) in pch_get_trip_temp() argument 250 struct pch_thermal_device *ptd = tzd->devdata; in pch_get_trip_temp() 340 ptd->tzd = thermal_zone_device_register(bi->name, nr_trips, 0, ptd, in intel_pch_thermal_probe() 342 if (IS_ERR(ptd->tzd)) { in intel_pch_thermal_probe() 345 err = PTR_ERR(ptd->tzd); in intel_pch_thermal_probe() [all …]
|
D | intel_soc_dts_iosf.c | 73 static int sys_get_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_get_trip_temp() argument 81 dts = tzd->devdata; in sys_get_trip_temp() 189 static int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 192 struct intel_soc_dts_sensor_entry *dts = tzd->devdata; in sys_set_trip_temp() 200 status = update_trip_temp(tzd->devdata, trip, temp, in sys_set_trip_temp() 207 static int sys_get_trip_type(struct thermal_zone_device *tzd, in sys_get_trip_type() argument 212 dts = tzd->devdata; in sys_get_trip_type() 219 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 227 dts = tzd->devdata; in sys_get_curr_temp()
|
D | x86_pkg_temp_thermal.c | 124 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()
|
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.4/drivers/platform/x86/ |
D | intel_mid_thermal.c | 73 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() 504 kfree(pinfo->tzd[i]->devdata); in mid_thermal_probe() [all …]
|
/Linux-v5.4/drivers/thermal/tegra/ |
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.4/drivers/thermal/samsung/ |
D | exynos_tmu.c | 190 struct thermal_zone_device *tzd; member 259 struct thermal_zone_device *tzd = data->tzd; in exynos_tmu_initialize() local 261 of_thermal_get_trip_points(tzd); in exynos_tmu_initialize() 272 ret = tzd->ops->get_crit_temp(tzd, &temp); in exynos_tmu_initialize() 279 if (of_thermal_get_ntrips(tzd) > data->ntrip) { in exynos_tmu_initialize() 284 (of_thermal_get_ntrips(tzd) - data->ntrip)); in exynos_tmu_initialize() 297 min_t(int, of_thermal_get_ntrips(tzd), data->ntrip); in exynos_tmu_initialize() 304 ret = tzd->ops->get_trip_temp(tzd, i, &temp); in exynos_tmu_initialize() 311 ret = tzd->ops->get_trip_hyst(tzd, i, &hyst); in exynos_tmu_initialize() 363 of_thermal_get_trip_points(data->tzd); in exynos4210_tmu_set_trip_temp() [all …]
|
/Linux-v5.4/drivers/thermal/qcom/ |
D | tsens.c | 85 struct thermal_zone_device *tzd; in tsens_register() local 90 tzd = devm_thermal_zone_of_sensor_register(priv->dev, i, in tsens_register() 93 if (IS_ERR(tzd)) in tsens_register() 95 priv->sensor[i].tzd = tzd; in tsens_register()
|
D | tsens-8960.c | 242 slope = thermal_zone_get_slope(s->tzd); in code_to_mdegC()
|
D | tsens.h | 42 struct thermal_zone_device *tzd; member
|
/Linux-v5.4/drivers/iio/adc/ |
D | sun4i-gpadc-iio.c | 105 struct thermal_zone_device *tzd; member 644 info->tzd = thermal_zone_of_sensor_register(info->sensor_device, in sun4i_gpadc_probe() 651 if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) { in sun4i_gpadc_probe() 654 PTR_ERR(info->tzd)); in sun4i_gpadc_probe() 655 return PTR_ERR(info->tzd); in sun4i_gpadc_probe() 688 thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd); in sun4i_gpadc_remove()
|
/Linux-v5.4/drivers/power/supply/ |
D | power_supply_core.c | 844 static int power_supply_read_temp(struct thermal_zone_device *tzd, in power_supply_read_temp() argument 851 WARN_ON(tzd == NULL); in power_supply_read_temp() 852 psy = tzd->devdata; in power_supply_read_temp() 877 psy->tzd = thermal_zone_device_register(psy->desc->name, in psy_register_thermal() 879 return PTR_ERR_OR_ZERO(psy->tzd); in psy_register_thermal() 887 if (IS_ERR_OR_NULL(psy->tzd)) in psy_unregister_thermal() 889 thermal_zone_device_unregister(psy->tzd); in psy_unregister_thermal()
|
/Linux-v5.4/drivers/hwmon/ |
D | hwmon.c | 144 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local 153 tzd = devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata, in hwmon_thermal_add_sensor() 159 if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) in hwmon_thermal_add_sensor() 160 return PTR_ERR(tzd); in hwmon_thermal_add_sensor()
|
/Linux-v5.4/drivers/regulator/ |
D | max8973-regulator.c | 510 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-v5.4/include/linux/ |
D | power_supply.h | 286 struct thermal_zone_device *tzd; member
|
/Linux-v5.4/Documentation/driver-api/thermal/ |
D | sysfs-api.rst | 161 struct thermal_zone_device *tzd) 192 struct thermal_zone_device *tzd)
|