| /linux/drivers/thermal/ |
| H A D | loongson2_thermal.c | 97 struct thermal_zone_device *tzd = dev; in loongson2_thermal_irq_thread() local 98 struct loongson2_thermal_data *data = thermal_zone_device_priv(tzd); in loongson2_thermal_irq_thread() 102 thermal_zone_device_update(tzd, THERMAL_EVENT_UNSPECIFIED); in loongson2_thermal_irq_thread() 129 struct thermal_zone_device *tzd; in loongson2_thermal_probe() local 162 tzd = devm_thermal_of_zone_register(dev, i, data, thermal_ops); in loongson2_thermal_probe() 164 if (!IS_ERR(tzd)) in loongson2_thermal_probe() 167 if (PTR_ERR(tzd) != -ENODEV) in loongson2_thermal_probe() 170 return dev_err_probe(dev, PTR_ERR(tzd), "failed to register"); in loongson2_thermal_probe() 174 IRQF_ONESHOT, "loongson2_thermal", tzd); in loongson2_thermal_probe() 178 devm_thermal_add_hwmon_sysfs(dev, tzd); in loongson2_thermal_probe()
|
| H A D | imx_sc_thermal.c | 22 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() 117 devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd); in imx_sc_thermal_probe()
|
| H A D | hisi_thermal.c | 61 struct thermal_zone_device *tzd; member 456 thermal_zone_device_update(sensor->tzd, in hisi_thermal_alarm_irq_thread() 485 sensor->tzd = devm_thermal_of_zone_register(&pdev->dev, in hisi_thermal_register_sensor() 488 if (IS_ERR(sensor->tzd)) { in hisi_thermal_register_sensor() 489 ret = PTR_ERR(sensor->tzd); in hisi_thermal_register_sensor() 490 sensor->tzd = NULL; in hisi_thermal_register_sensor() 496 thermal_zone_for_each_trip(sensor->tzd, hisi_trip_walk_cb, sensor); in hisi_thermal_register_sensor() 533 struct thermal_zone_device *tzd = sensor->tzd; in hisi_thermal_toggle_sensor() local 536 thermal_zone_device_enable(tzd); in hisi_thermal_toggle_sensor() 538 thermal_zone_device_disable(tzd); in hisi_thermal_toggle_sensor()
|
| H A D | imx91_thermal.c | 80 struct thermal_zone_device *tzd; member 198 thermal_zone_device_update(tmu->tzd, THERMAL_EVENT_UNSPECIFIED); in imx91_tmu_alarm_irq_thread() 318 tmu->tzd = devm_thermal_of_zone_register(dev, 0, tmu, &tmu_tz_ops); in imx91_tmu_probe() 319 if (IS_ERR(tmu->tzd)) in imx91_tmu_probe() 320 return dev_err_probe(dev, PTR_ERR(tmu->tzd), in imx91_tmu_probe() 323 devm_thermal_add_hwmon_sysfs(dev, tmu->tzd); in imx91_tmu_probe()
|
| H A D | sun8i_thermal.c | 64 struct thermal_zone_device *tzd; member 199 if (IS_ERR(tmdev->sensor[i].tzd)) in sun8i_irq_thread() 201 thermal_zone_device_update(tmdev->sensor[i].tzd, in sun8i_irq_thread() 530 tmdev->sensor[i].tzd = in sun8i_ths_register() 541 if (IS_ERR(tmdev->sensor[i].tzd)) { in sun8i_ths_register() 542 if (PTR_ERR(tmdev->sensor[i].tzd) == -EPROBE_DEFER) in sun8i_ths_register() 543 return PTR_ERR(tmdev->sensor[i].tzd); in sun8i_ths_register() 547 devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd); in sun8i_ths_register()
|
| H A D | thermal_of.c | 492 struct thermal_zone_device **ptr, *tzd; in devm_thermal_of_zone_register() local 499 tzd = thermal_of_zone_register(dev->of_node, sensor_id, data, ops); in devm_thermal_of_zone_register() 500 if (IS_ERR(tzd)) { in devm_thermal_of_zone_register() 502 return tzd; in devm_thermal_of_zone_register() 505 *ptr = tzd; in devm_thermal_of_zone_register() 508 return tzd; in devm_thermal_of_zone_register()
|
| H A D | qoriq_thermal.c | 185 struct thermal_zone_device *tzd; in qoriq_tmu_register_tmu_zone() local 191 tzd = devm_thermal_of_zone_register(dev, id, in qoriq_tmu_register_tmu_zone() 194 ret = PTR_ERR_OR_ZERO(tzd); in qoriq_tmu_register_tmu_zone() 207 devm_thermal_add_hwmon_sysfs(dev, tzd); in qoriq_tmu_register_tmu_zone()
|
| H A D | rockchip_thermal.c | 135 struct thermal_zone_device *tzd; member 1405 struct thermal_zone_device *tzd = sensor->tzd; in rockchip_thermal_toggle_sensor() local 1408 thermal_zone_device_enable(tzd); in rockchip_thermal_toggle_sensor() 1410 thermal_zone_device_disable(tzd); in rockchip_thermal_toggle_sensor() 1423 thermal_zone_device_update(thermal->sensors[i].tzd, in rockchip_thermal_alarm_irq_thread() 1668 sensor->tzd = devm_thermal_of_zone_register(dev, id, sensor, in rockchip_thermal_register_sensor() 1670 if (IS_ERR(sensor->tzd)) { in rockchip_thermal_register_sensor() 1671 error = PTR_ERR(sensor->tzd); in rockchip_thermal_register_sensor() 1782 error = thermal_add_hwmon_sysfs(thermal->sensors[i].tzd); in rockchip_thermal_probe() 1802 thermal_remove_hwmon_sysfs(sensor->tzd); in rockchip_thermal_remove()
|
| H A D | thermal_core.c | 1579 void *thermal_zone_device_priv(struct thermal_zone_device *tzd) in thermal_zone_device_priv() argument 1581 return tzd->devdata; in thermal_zone_device_priv() 1585 const char *thermal_zone_device_type(struct thermal_zone_device *tzd) in thermal_zone_device_type() argument 1587 return tzd->type; in thermal_zone_device_type() 1591 int thermal_zone_device_id(struct thermal_zone_device *tzd) in thermal_zone_device_id() argument 1593 return tzd->id; in thermal_zone_device_id() 1597 struct device *thermal_zone_device(struct thermal_zone_device *tzd) in thermal_zone_device() argument 1599 return &tzd->device; in thermal_zone_device()
|
| /linux/drivers/thermal/intel/ |
| H A D | intel_quark_dts_thermal.c | 115 static int soc_dts_enable(struct thermal_zone_device *tzd) in soc_dts_enable() argument 118 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_enable() 143 static int soc_dts_disable(struct thermal_zone_device *tzd) in soc_dts_disable() argument 146 struct soc_sensor_entry *aux_entry = thermal_zone_device_priv(tzd); in soc_dts_disable() 245 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument 264 return update_trip_temp(thermal_zone_device_priv(tzd), trip_index, temp); in sys_set_trip_temp() 267 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 292 static int sys_change_mode(struct thermal_zone_device *tzd, in sys_change_mode() argument 299 ret = soc_dts_enable(tzd); in sys_change_mode() 301 ret = soc_dts_disable(tzd); in sys_change_mode()
|
| H A 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()
|
| H A D | intel_soc_dts_iosf.c | 132 static int sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument 136 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_set_trip_temp() 151 static int sys_get_curr_temp(struct thermal_zone_device *tzd, in sys_get_curr_temp() argument 156 struct intel_soc_dts_sensor_entry *dts = thermal_zone_device_priv(tzd); in sys_get_curr_temp()
|
| /linux/drivers/thermal/tegra/ |
| H A D | tegra30-tsensor.c | 77 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() 323 static void tegra_tsensor_get_hw_channel_trips(struct thermal_zone_device *tzd, in tegra_tsensor_get_hw_channel_trips() argument 333 thermal_zone_for_each_trip(tzd, tegra_tsensor_get_trips_cb, temps); in tegra_tsensor_get_hw_channel_trips() 352 struct thermal_zone_device *tzd = tsc->tzd; in tegra_tsensor_enable_hw_channel() local 357 if (!tzd) { in tegra_tsensor_enable_hw_channel() 365 tegra_tsensor_get_hw_channel_trips(tzd, &temps); in tegra_tsensor_enable_hw_channel() [all …]
|
| /linux/drivers/thermal/qcom/ |
| H A D | qcom-spmi-adc-tm5-gen3.c | 42 struct thermal_zone_device *tzd; member 149 thermal_zone_device_update(chan_prop->tzd, THERMAL_TRIP_VIOLATED); in adctm5_gen3_isr_thread() 304 struct thermal_zone_device *tzd; in adc_tm5_register_tzd() local 310 tzd = devm_thermal_of_zone_register(adc_tm5->dev, channel, in adc_tm5_register_tzd() 313 if (IS_ERR(tzd)) { in adc_tm5_register_tzd() 314 if (PTR_ERR(tzd) == -ENODEV) { in adc_tm5_register_tzd() 320 return PTR_ERR(tzd); in adc_tm5_register_tzd() 322 adc_tm5->chan_props[i].tzd = tzd; in adc_tm5_register_tzd() 323 ret = devm_thermal_add_hwmon_sysfs(adc_tm5->dev, tzd); in adc_tm5_register_tzd()
|
| H A D | qcom-spmi-adc-tm5.c | 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() 668 struct thermal_zone_device *tzd; in adc_tm5_register_tzd() local 672 tzd = devm_thermal_of_zone_register(adc_tm->dev, in adc_tm5_register_tzd() 676 if (IS_ERR(tzd)) { in adc_tm5_register_tzd() 677 if (PTR_ERR(tzd) == -ENODEV) { in adc_tm5_register_tzd() 684 adc_tm->channels[i].channel, PTR_ERR(tzd)); in adc_tm5_register_tzd() [all …]
|
| H A D | tsens.c | 662 if (!s->tzd) in tsens_critical_irq_thread() 709 if (!s->tzd) in tsens_irq_thread() 714 thermal_zone_device_update(s->tzd, THERMAL_EVENT_UNSPECIFIED); in tsens_irq_thread() 1329 struct thermal_zone_device *tzd; in tsens_register() local 1333 tzd = devm_thermal_of_zone_register(priv->dev, priv->sensor[i].hw_id, in tsens_register() 1336 if (IS_ERR(tzd)) in tsens_register() 1338 priv->sensor[i].tzd = tzd; in tsens_register() 1342 devm_thermal_add_hwmon_sysfs(priv->dev, tzd); in tsens_register()
|
| /linux/drivers/thermal/spacemit/ |
| H A D | k1_tsensor.c | 64 struct thermal_zone_device *tzd; member 194 thermal_zone_device_update(ts->ch[i].tzd, THERMAL_EVENT_UNSPECIFIED); in k1_tsensor_irq_thread() 267 ts->ch[i].tzd = devm_thermal_of_zone_register(dev, i, ts->ch + i, &k1_tsensor_ops); in k1_tsensor_probe() 268 if (IS_ERR(ts->ch[i].tzd)) { in k1_tsensor_probe() 269 ret = PTR_ERR(ts->ch[i].tzd); in k1_tsensor_probe() 274 ret = devm_thermal_add_hwmon_sysfs(dev, ts->ch[i].tzd); in k1_tsensor_probe()
|
| /linux/drivers/hwmon/ |
| H A D | hwmon.c | 70 struct thermal_zone_device *tzd;/* thermal zone device */ member 233 struct thermal_zone_device *tzd; in hwmon_thermal_add_sensor() local 243 tzd = devm_thermal_of_zone_register(dev, index, tdata, in hwmon_thermal_add_sensor() 245 if (IS_ERR(tzd)) { in hwmon_thermal_add_sensor() 246 if (PTR_ERR(tzd) != -ENODEV) in hwmon_thermal_add_sensor() 247 return PTR_ERR(tzd); in hwmon_thermal_add_sensor() 258 tdata->tzd = tzd; in hwmon_thermal_add_sensor() 308 thermal_zone_device_update(tzdata->tzd, in hwmon_thermal_notify()
|
| /linux/drivers/thermal/samsung/ |
| H A D | exynos_tmu.c | 187 struct thermal_zone_device *tzd; member 283 struct thermal_zone_device *tzd = data->tzd; in exynos_thermal_zone_configure() local 286 ret = thermal_zone_get_crit_temp(tzd, &temp); in exynos_thermal_zone_configure() 763 thermal_zone_device_update(data->tzd, THERMAL_EVENT_UNSPECIFIED); in exynos_tmu_threaded_irq() 1087 data->tzd = devm_thermal_of_zone_register(dev, 0, data, in exynos_tmu_probe() 1089 if (IS_ERR(data->tzd)) { in exynos_tmu_probe() 1090 ret = dev_err_probe(dev, PTR_ERR(data->tzd), "Failed to register sensor\n"); in exynos_tmu_probe()
|
| /linux/drivers/thermal/intel/int340x_thermal/ |
| H A D | processor_thermal_device_pci.c | 217 static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp) in sys_get_curr_temp() argument 219 struct proc_thermal_pci *pci_info = thermal_zone_device_priv(tzd); in sys_get_curr_temp() 228 static int sys_set_trip_temp(struct thermal_zone_device *tzd, in sys_set_trip_temp() argument 231 struct proc_thermal_pci *pci_info = thermal_zone_device_priv(tzd); in sys_set_trip_temp()
|
| /linux/drivers/hwmon/pmbus/ |
| H A D | pmbus_core.c | 1496 struct thermal_zone_device *tzd; in pmbus_thermal_add_sensor() local 1505 tzd = devm_thermal_of_zone_register(dev, index, tdata, in pmbus_thermal_add_sensor() 1511 if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV)) in pmbus_thermal_add_sensor() 1512 return PTR_ERR(tzd); in pmbus_thermal_add_sensor()
|