/drivers/thermal/ |
D | thermal_core.c | 89 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument 92 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor() 93 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor() 94 dev_err(&tz->device, in bind_previous_governor() 96 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor() 97 tz->governor = NULL; in bind_previous_governor() 111 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument 116 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor() 117 tz->governor->unbind_from_tz(tz); in thermal_set_governor() 120 ret = new_gov->bind_to_tz(tz); in thermal_set_governor() [all …]
|
D | power_allocator.c | 93 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument 97 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power() 99 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power() 106 if (power_actor_get_min_power(cdev, tz, &min_power)) in estimate_sustainable_power() 134 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument 142 ret = tz->ops->get_trip_temp(tz, trip_switch_on, &switch_on_temp); in estimate_pid_constants() 158 if (!tz->tzp->k_po || force) in estimate_pid_constants() 159 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants() 162 if (!tz->tzp->k_pu || force) in estimate_pid_constants() 163 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants() [all …]
|
D | of-thermal.c | 93 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument 96 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp() 104 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument 107 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips() 125 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 127 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips() 146 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument 148 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid() 168 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument 170 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points() [all …]
|
D | gov_bang_bang.c | 26 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 31 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 33 if (!tz->ops->get_trip_hyst) { in thermal_zone_trip_update() 35 "running with default hysteresis zero\n", tz->type); in thermal_zone_trip_update() 38 tz->ops->get_trip_hyst(tz, trip, &trip_hyst); in thermal_zone_trip_update() 40 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update() 41 trip, trip_temp, tz->temperature, in thermal_zone_trip_update() 44 mutex_lock(&tz->lock); in thermal_zone_trip_update() 46 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update() 65 if (instance->target == 0 && tz->temperature >= trip_temp) in thermal_zone_trip_update() [all …]
|
D | step_wise.c | 117 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument 125 tz->passive += value; in update_passive_instance() 128 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 138 trip_temp = tz->forced_passive; in thermal_zone_trip_update() 141 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 142 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update() 145 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update() 147 if (tz->temperature >= trip_temp) { in thermal_zone_trip_update() 149 trace_thermal_zone_trip(tz, trip, trip_type); in thermal_zone_trip_update() 152 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update() [all …]
|
D | thermal_hwmon.c | 52 struct thermal_zone_device *tz; member 79 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local 81 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show() 97 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local 101 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show() 110 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument 116 if (!strcmp(hwmon->type, tz->type)) { in thermal_hwmon_lookup_by_type() 128 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument 134 if (temp->tz == tz) { in thermal_hwmon_lookup_temp() 143 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument [all …]
|
D | fair_share.c | 34 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument 40 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level() 43 for (count = 0; count < tz->trips; count++) { in get_trip_level() 44 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level() 45 if (tz->temperature < trip_temp) in get_trip_level() 54 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level() 55 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level() 61 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument 68 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state() 89 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument [all …]
|
D | imx_thermal.c | 91 struct thermal_zone_device *tz; member 133 static int imx_get_temp(struct thermal_zone_device *tz, int *temp) in imx_get_temp() argument 135 struct imx_thermal_data *data = tz->devdata; in imx_get_temp() 172 dev_dbg(&tz->device, "temp measurement never finished\n"); in imx_get_temp() 189 dev_dbg(&tz->device, "thermal alarm off: T < %d\n", in imx_get_temp() 195 dev_dbg(&tz->device, "millicelsius: %d\n", *temp); in imx_get_temp() 208 static int imx_get_mode(struct thermal_zone_device *tz, in imx_get_mode() argument 211 struct imx_thermal_data *data = tz->devdata; in imx_get_mode() 218 static int imx_set_mode(struct thermal_zone_device *tz, in imx_set_mode() argument 221 struct imx_thermal_data *data = tz->devdata; in imx_set_mode() [all …]
|
D | user_space.c | 36 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument 41 mutex_lock(&tz->lock); in notify_user_space() 42 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space() 43 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space() 45 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space() 47 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space() 50 mutex_unlock(&tz->lock); in notify_user_space()
|
D | thermal_hwmon.h | 34 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 35 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); 38 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument 44 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
|
D | thermal_core.h | 41 struct thermal_zone_device *tz; member 111 static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 115 static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, in of_thermal_is_trip_valid() argument 121 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument
|
D | qoriq_thermal.c | 76 struct thermal_zone_device *tz; member 237 data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id, in qoriq_tmu_probe() 239 if (IS_ERR(data->tz)) { in qoriq_tmu_probe() 240 ret = PTR_ERR(data->tz); in qoriq_tmu_probe() 246 trip = of_thermal_get_trip_points(data->tz); in qoriq_tmu_probe() 267 thermal_zone_of_sensor_unregister(&pdev->dev, data->tz); in qoriq_tmu_remove()
|
D | cpu_cooling.c | 424 struct thermal_zone_device *tz, unsigned long freq, in get_static_power() argument 453 return cpufreq_device->plat_get_static_power(cpumask, tz->passive_delay, in get_static_power() 573 struct thermal_zone_device *tz, in cpufreq_get_requested_power() argument 619 ret = get_static_power(cpufreq_device, tz, freq, &static_power); in cpufreq_get_requested_power() 653 struct thermal_zone_device *tz, in cpufreq_state2power() argument 676 ret = get_static_power(cpufreq_device, tz, freq, &static_power); in cpufreq_state2power() 705 struct thermal_zone_device *tz, u32 power, in cpufreq_power2state() argument 721 ret = get_static_power(cpufreq_device, tz, cur_freq, &static_power); in cpufreq_power2state()
|
D | devfreq_cooling.c | 275 struct thermal_zone_device *tz, in devfreq_cooling_get_requested_power() argument 307 struct thermal_zone_device *tz, in devfreq_cooling_state2power() argument 326 struct thermal_zone_device *tz, in devfreq_cooling_power2state() argument
|
/drivers/acpi/ |
D | thermal.c | 197 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument 202 if (!tz) in acpi_thermal_get_temperature() 205 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature() 207 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature() 211 tz->temperature = tmp; in acpi_thermal_get_temperature() 213 tz->temperature)); in acpi_thermal_get_temperature() 218 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument 223 if (!tz) in acpi_thermal_get_polling_frequency() 226 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); in acpi_thermal_get_polling_frequency() 230 tz->polling_frequency = tmp; in acpi_thermal_get_polling_frequency() [all …]
|
/drivers/thermal/samsung/ |
D | exynos_tmu.c | 219 struct thermal_zone_device *tz = p->tzd; in exynos_report_trigger() local 223 if (!tz) { in exynos_report_trigger() 228 thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); in exynos_report_trigger() 230 mutex_lock(&tz->lock); in exynos_report_trigger() 232 for (i = 0; i < of_thermal_get_ntrips(tz); i++) { in exynos_report_trigger() 233 tz->ops->get_trip_temp(tz, i, &temp); in exynos_report_trigger() 234 if (tz->last_temperature < temp) in exynos_report_trigger() 239 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, envp); in exynos_report_trigger() 240 mutex_unlock(&tz->lock); in exynos_report_trigger() 318 struct thermal_zone_device *tz = data->tzd; in get_th_reg() local [all …]
|
/drivers/thermal/tegra/ |
D | soctherm.c | 212 struct thermal_zone_device *tz; member 356 struct thermal_zone_device *tz = zone->tz; in tegra_thermctl_set_trip_temp() local 363 if (!tz) in tegra_thermctl_set_trip_temp() 366 ret = tz->ops->get_trip_type(tz, trip, &type); in tegra_thermctl_set_trip_temp() 383 if (get_thermal_instance(tz, cdev, trip)) in tegra_thermctl_set_trip_temp() 530 static int get_hot_temp(struct thermal_zone_device *tz, int *trip, int *temp) in get_hot_temp() argument 535 ntrips = of_thermal_get_ntrips(tz); in get_hot_temp() 540 ret = tz->ops->get_trip_type(tz, i, &type); in get_hot_temp() 544 ret = tz->ops->get_trip_temp(tz, i, temp); in get_hot_temp() 578 struct thermal_zone_device *tz) in tegra_soctherm_set_hwtrips() argument [all …]
|
/drivers/hwmon/ |
D | ntc_thermistor.c | 557 struct thermal_zone_device *tz; in ntc_thermistor_probe() local 646 tz = devm_thermal_zone_of_sensor_register(dev, 0, data, in ntc_thermistor_probe() 648 if (IS_ERR(tz)) in ntc_thermistor_probe()
|
/drivers/staging/comedi/drivers/ |
D | jr3_pci.h | 262 tz, enumerator
|