| /Linux-v4.19/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 | 75 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument 78 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp() 86 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument 89 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips() 107 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 109 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips() 128 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument 130 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid() 150 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument 152 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 | 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 93 if (!strcmp(hwmon->type, tz->type)) { in thermal_hwmon_lookup_by_type() 105 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument 111 if (temp->tz == tz) { in thermal_hwmon_lookup_temp() 120 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() 90 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument [all …]
|
| D | user_space.c | 37 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument 42 mutex_lock(&tz->lock); in notify_user_space() 43 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space() 44 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space() 46 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space() 48 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space() 51 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
|
| /Linux-v4.19/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 …]
|
| /Linux-v4.19/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-v4.19/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-v4.19/drivers/thermal/broadcom/ |
| D | bcm2835_thermal.c | 74 struct thermal_zone_device *tz; member 110 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp() 111 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp() 129 struct thermal_zone_device *tz = platform_get_drvdata(pdev); in bcm2835_thermal_debugfs() local 130 struct bcm2835_thermal_data *data = tz->devdata; in bcm2835_thermal_debugfs() 177 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local 220 tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data, in bcm2835_thermal_probe() 222 if (IS_ERR(tz)) { in bcm2835_thermal_probe() 223 err = PTR_ERR(tz); in bcm2835_thermal_probe() 240 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe() [all …]
|
| D | ns-thermal.c | 21 struct thermal_zone_device *tz; member 28 int offset = thermal_zone_get_offset(ns_thermal->tz); in ns_thermal_get_temp() 29 int slope = thermal_zone_get_slope(ns_thermal->tz); in ns_thermal_get_temp() 66 ns_thermal->tz = devm_thermal_zone_of_sensor_register(dev, 0, in ns_thermal_probe() 69 if (IS_ERR(ns_thermal->tz)) { in ns_thermal_probe() 71 return PTR_ERR(ns_thermal->tz); in ns_thermal_probe()
|
| /Linux-v4.19/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-v4.19/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-v4.19/arch/x86/entry/vdso/ |
| D | vclock_gettime.c | 28 extern int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz); 52 notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz) in vdso_fallback_gtod() argument 56 asm ("syscall" : "=a" (ret), "=m" (*tv), "=m" (*tz) : in vdso_fallback_gtod() 57 "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : in vdso_fallback_gtod() 80 notrace static long vdso_fallback_gtod(struct timeval *tv, struct timezone *tz) in vdso_fallback_gtod() argument 89 : "=a" (ret), "=m" (*tv), "=m" (*tz) in vdso_fallback_gtod() 90 : "0" (__NR_gettimeofday), [tv] "g" (tv), "c" (tz) in vdso_fallback_gtod() 299 notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 303 return vdso_fallback_gtod(tv, tz); in __vdso_gettimeofday() 306 if (unlikely(tz != NULL)) { in __vdso_gettimeofday() [all …]
|
| /Linux-v4.19/kernel/time/ |
| D | time.c | 144 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 152 if (unlikely(tz != NULL)) { in SYSCALL_DEFINE2() 153 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz))) in SYSCALL_DEFINE2() 170 int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz) in do_sys_settimeofday64() argument 178 error = security_settime64(tv, tz); in do_sys_settimeofday64() 182 if (tz) { in do_sys_settimeofday64() 184 if (tz->tz_minuteswest > 15*60 || tz->tz_minuteswest < -15*60) in do_sys_settimeofday64() 187 sys_tz = *tz; in do_sys_settimeofday64() 201 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 217 if (tz) { in SYSCALL_DEFINE2() [all …]
|
| /Linux-v4.19/arch/sparc/vdso/ |
| D | vclock_gettime.c | 92 vdso_fallback_gettimeofday(struct timeval *tv, struct timezone *tz) in vdso_fallback_gettimeofday() argument 96 register long o1 __asm__("o1") = (long) tz; in vdso_fallback_gettimeofday() 241 __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 263 if (unlikely(tz != NULL)) { in __vdso_gettimeofday() 265 tz->tz_minuteswest = vvd->tz_minuteswest; in __vdso_gettimeofday() 266 tz->tz_dsttime = vvd->tz_dsttime; in __vdso_gettimeofday() 270 return vdso_fallback_gettimeofday(tv, tz); in __vdso_gettimeofday()
|
| /Linux-v4.19/arch/mips/vdso/ |
| D | gettimeofday.c | 26 register struct timezone *tz asm("a1") = _tz; in gettimeofday_fallback() 35 : "r" (tv), "r" (tz), "r" (nr) in gettimeofday_fallback() 222 int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 230 return gettimeofday_fallback(tv, tz); in __vdso_gettimeofday() 237 if (tz) { in __vdso_gettimeofday() 238 tz->tz_minuteswest = data->tz_minuteswest; in __vdso_gettimeofday() 239 tz->tz_dsttime = data->tz_dsttime; in __vdso_gettimeofday()
|
| /Linux-v4.19/arch/arm/vdso/ |
| D | vgettimeofday.c | 232 register struct timezone *tz asm("r1") = _tz; in gettimeofday_fallback() 240 : "r" (tv), "r" (tz), "r" (nr) in gettimeofday_fallback() 246 notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 256 return gettimeofday_fallback(tv, tz); in __vdso_gettimeofday() 262 if (tz) { in __vdso_gettimeofday() 263 tz->tz_minuteswest = vdata->tz_minuteswest; in __vdso_gettimeofday() 264 tz->tz_dsttime = vdata->tz_dsttime; in __vdso_gettimeofday()
|