/Linux-v5.4/drivers/thermal/ |
D | thermal_helpers.c | 25 int get_tz_trend(struct thermal_zone_device *tz, int trip) in get_tz_trend() argument 29 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend() 30 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend() 31 if (tz->temperature > tz->last_temperature) in get_tz_trend() 33 else if (tz->temperature < tz->last_temperature) in get_tz_trend() 44 get_thermal_instance(struct thermal_zone_device *tz, in get_thermal_instance() argument 50 mutex_lock(&tz->lock); in get_thermal_instance() 53 list_for_each_entry(pos, &tz->thermal_instances, tz_node) { in get_thermal_instance() 54 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance() 61 mutex_unlock(&tz->lock); in get_thermal_instance() [all …]
|
D | thermal_core.c | 81 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument 84 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor() 85 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor() 86 dev_err(&tz->device, in bind_previous_governor() 88 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor() 89 tz->governor = NULL; in bind_previous_governor() 103 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument 108 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor() 109 tz->governor->unbind_from_tz(tz); in thermal_set_governor() 112 ret = new_gov->bind_to_tz(tz); in thermal_set_governor() [all …]
|
D | thermal_sysfs.c | 29 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local 31 return sprintf(buf, "%s\n", tz->type); in type_show() 37 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local 40 ret = thermal_zone_get_temp(tz, &temperature); in temp_show() 51 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local 55 if (!tz->ops->get_mode) in mode_show() 58 result = tz->ops->get_mode(tz, &mode); in mode_show() 70 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local 73 if (!tz->ops->set_mode) in mode_store() 77 result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED); in mode_store() [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 | 89 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument 92 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp() 100 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument 103 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips() 121 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 123 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips() 142 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument 144 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid() 164 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument 166 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points() [all …]
|
D | gov_bang_bang.c | 16 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 21 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 23 if (!tz->ops->get_trip_hyst) { in thermal_zone_trip_update() 25 "running with default hysteresis zero\n", tz->type); in thermal_zone_trip_update() 28 tz->ops->get_trip_hyst(tz, trip, &trip_hyst); in thermal_zone_trip_update() 30 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update() 31 trip, trip_temp, tz->temperature, in thermal_zone_trip_update() 34 mutex_lock(&tz->lock); in thermal_zone_trip_update() 36 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update() 55 if (instance->target == 0 && tz->temperature >= trip_temp) in thermal_zone_trip_update() [all …]
|
D | step_wise.c | 105 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument 113 tz->passive += value; in update_passive_instance() 116 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 126 trip_temp = tz->forced_passive; in thermal_zone_trip_update() 129 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 130 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update() 133 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update() 135 if (tz->temperature >= trip_temp) { in thermal_zone_trip_update() 137 trace_thermal_zone_trip(tz, trip, trip_type); in thermal_zone_trip_update() 140 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update() [all …]
|
D | fair_share.c | 22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument 28 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level() 31 for (count = 0; count < tz->trips; count++) { in get_trip_level() 32 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level() 33 if (tz->temperature < trip_temp) in get_trip_level() 42 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level() 43 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level() 49 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument 56 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state() 78 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument [all …]
|
D | thermal_hwmon.c | 37 struct thermal_zone_device *tz; member 56 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local 58 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show() 74 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local 78 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show() 87 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument 94 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type() 109 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument 115 if (temp->tz == tz) { in thermal_hwmon_lookup_temp() 124 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument [all …]
|
D | user_space.c | 25 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument 30 mutex_lock(&tz->lock); in notify_user_space() 31 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space() 32 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space() 34 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space() 36 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space() 39 mutex_unlock(&tz->lock); in notify_user_space()
|
D | imx_thermal.c | 205 struct thermal_zone_device *tz; member 257 static int imx_get_temp(struct thermal_zone_device *tz, int *temp) in imx_get_temp() argument 259 struct imx_thermal_data *data = tz->devdata; in imx_get_temp() 301 dev_dbg(&tz->device, "temp measurement never finished\n"); in imx_get_temp() 322 dev_dbg(&tz->device, "thermal alarm off: T < %d\n", in imx_get_temp() 328 dev_dbg(&tz->device, "millicelsius: %d\n", *temp); in imx_get_temp() 341 static int imx_get_mode(struct thermal_zone_device *tz, in imx_get_mode() argument 344 struct imx_thermal_data *data = tz->devdata; in imx_get_mode() 351 static int imx_set_mode(struct thermal_zone_device *tz, in imx_set_mode() argument 354 struct imx_thermal_data *data = tz->devdata; in imx_set_mode() [all …]
|
D | thermal_hwmon.h | 19 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 20 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); 23 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument 29 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
|
D | db8500_thermal.c | 55 struct thermal_zone_device *tz; member 132 dev_dbg(&th->tz->device, in prcmu_low_irq_handler() 135 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_low_irq_handler() 155 dev_info(&th->tz->device, in prcmu_high_irq_handler() 161 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_high_irq_handler() 205 th->tz = devm_thermal_zone_of_sensor_register(dev, 0, th, &thdev_ops); in db8500_thermal_probe() 206 if (IS_ERR(th->tz)) { in db8500_thermal_probe() 208 return PTR_ERR(th->tz); in db8500_thermal_probe()
|
/Linux-v5.4/drivers/acpi/ |
D | thermal.c | 183 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument 188 if (!tz) in acpi_thermal_get_temperature() 191 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature() 193 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature() 197 tz->temperature = tmp; in acpi_thermal_get_temperature() 199 tz->temperature)); in acpi_thermal_get_temperature() 204 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument 209 if (!tz) in acpi_thermal_get_polling_frequency() 212 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); in acpi_thermal_get_polling_frequency() 216 tz->polling_frequency = tmp; in acpi_thermal_get_polling_frequency() [all …]
|
/Linux-v5.4/tools/testing/selftests/timers/ |
D | set-tz.c | 30 struct timezone tz; in set_tz() local 32 tz.tz_minuteswest = min; in set_tz() 33 tz.tz_dsttime = dst; in set_tz() 35 return settimeofday(0, &tz); in set_tz() 40 struct timezone tz; in get_tz_min() local 43 memset(&tz, 0, sizeof(tz)); in get_tz_min() 44 gettimeofday(&tv, &tz); in get_tz_min() 45 return tz.tz_minuteswest; in get_tz_min() 50 struct timezone tz; in get_tz_dst() local 53 memset(&tz, 0, sizeof(tz)); in get_tz_dst() [all …]
|
/Linux-v5.4/include/linux/ |
D | thermal.h | 238 int (*bind_to_tz)(struct thermal_zone_device *tz); 239 void (*unbind_from_tz)(struct thermal_zone_device *tz); 240 int (*throttle)(struct thermal_zone_device *tz, int trip); 275 int (*match) (struct thermal_zone_device *tz, 382 struct thermal_zone_device *tz); 387 struct thermal_zone_device *tz); 398 struct thermal_zone_device *tz) in thermal_zone_of_sensor_unregister() argument 411 struct thermal_zone_device *tz) in devm_thermal_zone_of_sensor_unregister() argument 425 struct thermal_zone_device *tz, u32 *max_power); 427 struct thermal_zone_device *tz, u32 *min_power); [all …]
|
/Linux-v5.4/drivers/thermal/broadcom/ |
D | bcm2835_thermal.c | 67 struct thermal_zone_device *tz; member 103 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp() 104 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp() 167 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local 210 tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data, in bcm2835_thermal_probe() 212 if (IS_ERR(tz)) { in bcm2835_thermal_probe() 213 err = PTR_ERR(tz); in bcm2835_thermal_probe() 230 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe() 231 offset = thermal_zone_get_offset(tz); in bcm2835_thermal_probe() 236 err = tz->ops->get_trip_temp(tz, 0, &trip_temp); in bcm2835_thermal_probe() [all …]
|
D | ns-thermal.c | 18 struct thermal_zone_device *tz; member 25 int offset = thermal_zone_get_offset(ns_thermal->tz); in ns_thermal_get_temp() 26 int slope = thermal_zone_get_slope(ns_thermal->tz); in ns_thermal_get_temp() 63 ns_thermal->tz = devm_thermal_zone_of_sensor_register(dev, 0, in ns_thermal_probe() 66 if (IS_ERR(ns_thermal->tz)) { in ns_thermal_probe() 68 return PTR_ERR(ns_thermal->tz); in ns_thermal_probe()
|
/Linux-v5.4/fs/isofs/ |
D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 30 if (flag == 0) tz = p[6]; /* High sierra has no time zone */ in iso_date() 31 else tz = 0; in iso_date() 39 if (tz & 0x80) in iso_date() 40 tz |= (-1 << 8); in iso_date() 67 if (-52 <= tz && tz <= 52) in iso_date() 68 crtime -= tz * 15 * 60; in iso_date()
|
/Linux-v5.4/drivers/net/ethernet/mellanox/mlxsw/ |
D | core_thermal.c | 153 mlxsw_thermal_module_trips_reset(struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_reset() argument 155 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = 0; in mlxsw_thermal_module_trips_reset() 156 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = 0; in mlxsw_thermal_module_trips_reset() 157 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = 0; in mlxsw_thermal_module_trips_reset() 158 tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = 0; in mlxsw_thermal_module_trips_reset() 163 struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_update() argument 168 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update() 174 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update() 188 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp - in mlxsw_thermal_module_trips_update() 191 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp; in mlxsw_thermal_module_trips_update() [all …]
|
/Linux-v5.4/include/trace/events/ |
D | thermal.h | 26 TP_PROTO(struct thermal_zone_device *tz), 28 TP_ARGS(tz), 31 __string(thermal_zone, tz->type) 38 __assign_str(thermal_zone, tz->type); 39 __entry->id = tz->id; 40 __entry->temp_prev = tz->last_temperature; 41 __entry->temp = tz->temperature; 70 TP_PROTO(struct thermal_zone_device *tz, int trip, 73 TP_ARGS(tz, trip, trip_type), 76 __string(thermal_zone, tz->type) [all …]
|
D | thermal_power_allocator.h | 11 TP_PROTO(struct thermal_zone_device *tz, u32 *req_power, 16 TP_ARGS(tz, req_power, total_req_power, granted_power, 32 __entry->tz_id = tz->id; 59 TP_PROTO(struct thermal_zone_device *tz, s32 err, s32 err_integral, 61 TP_ARGS(tz, err, err_integral, p, i, d, output), 72 __entry->tz_id = tz->id;
|
/Linux-v5.4/arch/sparc/vdso/ |
D | vclock_gettime.c | 77 notrace static long vdso_fallback_gettimeofday(struct timeval *tv, struct timezone *tz) in vdso_fallback_gettimeofday() argument 81 register long o1 __asm__("o1") = (long) tz; in vdso_fallback_gettimeofday() 307 __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 329 if (unlikely(tz != NULL)) { in __vdso_gettimeofday() 331 tz->tz_minuteswest = vvd->tz_minuteswest; in __vdso_gettimeofday() 332 tz->tz_dsttime = vvd->tz_dsttime; in __vdso_gettimeofday() 336 return vdso_fallback_gettimeofday(tv, tz); in __vdso_gettimeofday() 343 __vdso_gettimeofday_stick(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday_stick() argument 365 if (unlikely(tz != NULL)) { in __vdso_gettimeofday_stick() 367 tz->tz_minuteswest = vvd->tz_minuteswest; in __vdso_gettimeofday_stick() [all …]
|
/Linux-v5.4/kernel/time/ |
D | time.c | 141 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 151 if (unlikely(tz != NULL)) { in SYSCALL_DEFINE2() 152 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz))) in SYSCALL_DEFINE2() 169 int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz) in do_sys_settimeofday64() argument 177 error = security_settime64(tv, tz); in do_sys_settimeofday64() 181 if (tz) { in do_sys_settimeofday64() 183 if (tz->tz_minuteswest > 15*60 || tz->tz_minuteswest < -15*60) in do_sys_settimeofday64() 186 sys_tz = *tz; in do_sys_settimeofday64() 200 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 216 if (tz) { in SYSCALL_DEFINE2() [all …]
|
/Linux-v5.4/arch/mips/vdso/ |
D | vgettimeofday.c | 21 struct timezone *tz) in __vdso_gettimeofday() argument 23 return __cvdso_gettimeofday(tv, tz); in __vdso_gettimeofday() 47 struct timezone *tz) in __vdso_gettimeofday() argument 49 return __cvdso_gettimeofday(tv, tz); in __vdso_gettimeofday()
|