Home
last modified time | relevance | path

Searched refs:tz (Results 1 – 25 of 199) sorted by relevance

12345678

/OK3568_Linux_fs/kernel/drivers/thermal/
H A Dthermal_core.c77 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument
80 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor()
81 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor()
82 dev_err(&tz->device, in bind_previous_governor()
84 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor()
85 tz->governor = NULL; in bind_previous_governor()
99 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument
104 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor()
105 tz->governor->unbind_from_tz(tz); in thermal_set_governor()
108 ret = new_gov->bind_to_tz(tz); in thermal_set_governor()
[all …]
H A Dthermal_helpers.c26 int get_tz_trend(struct thermal_zone_device *tz, int trip) in get_tz_trend() argument
30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend()
31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
32 if (tz->temperature > tz->last_temperature) in get_tz_trend()
34 else if (tz->temperature < tz->last_temperature) in get_tz_trend()
45 get_thermal_instance(struct thermal_zone_device *tz, in get_thermal_instance() argument
51 mutex_lock(&tz->lock); in get_thermal_instance()
54 list_for_each_entry(pos, &tz->thermal_instances, tz_node) { in get_thermal_instance()
55 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance()
62 mutex_unlock(&tz->lock); in get_thermal_instance()
[all …]
H A Dthermal_sysfs.c30 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local
32 return sprintf(buf, "%s\n", tz->type); in type_show()
38 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local
41 ret = thermal_zone_get_temp(tz, &temperature); in temp_show()
52 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local
53 int enabled = thermal_zone_device_is_enabled(tz); in mode_show()
62 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local
66 result = thermal_zone_device_enable(tz); in mode_store()
68 result = thermal_zone_device_disable(tz); in mode_store()
82 struct thermal_zone_device *tz = to_thermal_zone(dev); in trip_point_type_show() local
[all …]
H A Dgov_power_allocator.c86 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument
90 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power()
92 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power()
127 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument
135 ret = tz->ops->get_trip_temp(tz, trip_switch_on, &switch_on_temp); in estimate_pid_constants()
151 if (!tz->tzp->k_po || force) in estimate_pid_constants()
152 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants()
155 if (!tz->tzp->k_pu || force) in estimate_pid_constants()
156 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants()
159 if (!tz->tzp->k_i || force) in estimate_pid_constants()
[all …]
H A Dthermal_of.c87 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument
90 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp()
98 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument
101 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips()
119 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument
121 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips()
140 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument
142 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid()
162 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument
164 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points()
[all …]
H A Dthermal_hwmon.c39 struct thermal_zone_device *tz; member
58 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local
60 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show()
76 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local
80 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show()
89 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument
96 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type()
111 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument
117 if (temp->tz == tz) { in thermal_hwmon_lookup_temp()
126 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument
[all …]
H A Dgov_bang_bang.c16 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 …]
H A Dgov_fair_share.c22 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 …]
H A Dgov_step_wise.c105 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 …]
H A Dthermal_netlink.c366 static int __thermal_genl_cmd_tz_get_id(struct thermal_zone_device *tz, in __thermal_genl_cmd_tz_get_id() argument
371 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, tz->id) || in __thermal_genl_cmd_tz_get_id()
372 nla_put_string(msg, THERMAL_GENL_ATTR_TZ_NAME, tz->type)) in __thermal_genl_cmd_tz_get_id()
405 struct thermal_zone_device *tz; in thermal_genl_cmd_tz_get_trip() local
414 tz = thermal_zone_get_by_id(id); in thermal_genl_cmd_tz_get_trip()
415 if (!tz) in thermal_genl_cmd_tz_get_trip()
422 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
424 for (i = 0; i < tz->trips; i++) { in thermal_genl_cmd_tz_get_trip()
429 tz->ops->get_trip_type(tz, i, &type); in thermal_genl_cmd_tz_get_trip()
430 tz->ops->get_trip_temp(tz, i, &temp); in thermal_genl_cmd_tz_get_trip()
[all …]
H A Dimx_thermal.c200 struct thermal_zone_device *tz; member
251 static int imx_get_temp(struct thermal_zone_device *tz, int *temp) in imx_get_temp() argument
253 struct imx_thermal_data *data = tz->devdata; in imx_get_temp()
267 dev_dbg(&tz->device, "temp measurement never finished\n"); in imx_get_temp()
288 dev_dbg(&tz->device, "thermal alarm off: T < %d\n", in imx_get_temp()
294 dev_dbg(&tz->device, "millicelsius: %d\n", *temp); in imx_get_temp()
309 static int imx_change_mode(struct thermal_zone_device *tz, in imx_change_mode() argument
312 struct imx_thermal_data *data = tz->devdata; in imx_change_mode()
333 static int imx_get_trip_type(struct thermal_zone_device *tz, int trip, in imx_get_trip_type() argument
341 static int imx_get_crit_temp(struct thermal_zone_device *tz, int *temp) in imx_get_crit_temp() argument
[all …]
H A Dgov_user_space.c25 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()
H A Dthermal_hwmon.h19 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
20 int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
21 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
24 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument
30 devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in devm_thermal_add_hwmon_sysfs() argument
36 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
/OK3568_Linux_fs/kernel/drivers/acpi/
H A Dthermal.c185 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument
190 if (!tz) in acpi_thermal_get_temperature()
193 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature()
195 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature()
199 tz->temperature = tmp; in acpi_thermal_get_temperature()
201 tz->temperature)); in acpi_thermal_get_temperature()
206 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument
211 if (!tz) in acpi_thermal_get_polling_frequency()
214 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); in acpi_thermal_get_polling_frequency()
218 tz->polling_frequency = tmp; in acpi_thermal_get_polling_frequency()
[all …]
/OK3568_Linux_fs/buildroot/support/testing/tests/core/
H A Dtest_timezone.py23 tz, _ = self.emulator.run("TZ=UTC date +%Z")
24 self.assertEqual(tz[0].strip(), "UTC")
25 tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
26 self.assertEqual(tz[0].strip(), "UTC")
41 tz, _ = self.emulator.run("date +%Z")
42 self.assertEqual(tz[0].strip(), "UTC")
43 tz, _ = self.emulator.run("TZ=UTC date +%Z")
44 self.assertEqual(tz[0].strip(), "UTC")
45 tz, _ = self.emulator.run("TZ=America/Los_Angeles date +%Z")
46 self.assertEqual(tz[0].strip(), "PST")
[all …]
/OK3568_Linux_fs/kernel/tools/testing/selftests/timers/
H A Dset-tz.c30 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 …]
/OK3568_Linux_fs/kernel/include/linux/
H A Dthermal.h206 int (*bind_to_tz)(struct thermal_zone_device *tz);
207 void (*unbind_from_tz)(struct thermal_zone_device *tz);
208 int (*throttle)(struct thermal_zone_device *tz, int trip);
245 int (*match) (struct thermal_zone_device *tz,
341 struct thermal_zone_device *tz);
346 struct thermal_zone_device *tz);
364 struct thermal_zone_device *tz) in thermal_zone_of_sensor_unregister() argument
377 struct thermal_zone_device *tz) in devm_thermal_zone_of_sensor_unregister() argument
410 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
411 int thermal_zone_get_slope(struct thermal_zone_device *tz);
[all …]
/OK3568_Linux_fs/kernel/drivers/thermal/broadcom/
H A Dbcm2835_thermal.c67 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 …]
/OK3568_Linux_fs/kernel/fs/isofs/
H A Dutil.c21 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()
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore_thermal.c144 mlxsw_thermal_module_trips_reset(struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_reset() argument
146 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = 0; in mlxsw_thermal_module_trips_reset()
147 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = 0; in mlxsw_thermal_module_trips_reset()
148 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = 0; in mlxsw_thermal_module_trips_reset()
149 tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = 0; in mlxsw_thermal_module_trips_reset()
154 struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_update() argument
159 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update()
165 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update()
173 tz->tzdev->type, crit_temp, emerg_temp); in mlxsw_thermal_module_trips_update()
185 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp - in mlxsw_thermal_module_trips_update()
[all …]
/OK3568_Linux_fs/kernel/include/trace/events/
H A Dthermal.h26 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 …]
/OK3568_Linux_fs/yocto/poky/meta/recipes-core/busybox/files/
H A Dhwclock.sh25 [ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
38 hwclock $tz --hctosys
40 TZ="$TZ" hwclock $tz --hctosys
63 hwclock $tz --systohc
74 hwclock $tz --show
/OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/ipa/
H A Dmali_kbase_ipa_simple.c56 struct thermal_zone_device *tz, in kbase_simple_power_model_get_dummy_temp() argument
67 #define thermal_zone_get_temp(tz, temp) \ argument
68 kbase_simple_power_model_get_dummy_temp(tz, temp)
158 struct thermal_zone_device *tz = READ_ONCE(model_data->gpu_tz); in poll_temperature() local
160 if (tz) { in poll_temperature()
163 ret = thermal_zone_get_temp(tz, &temp); in poll_temperature()
304 struct thermal_zone_device *tz; in kbase_simple_power_model_recalculate() local
327 tz = thermal_zone_get_zone_by_name(tz_name); in kbase_simple_power_model_recalculate()
330 if (IS_ERR_OR_NULL(tz)) { in kbase_simple_power_model_recalculate()
333 PTR_ERR_OR_ZERO(tz), tz_name); in kbase_simple_power_model_recalculate()
[all …]
/OK3568_Linux_fs/kernel/kernel/time/
H A Dtime.c141 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
215 if (tz) { in SYSCALL_DEFINE2()
[all …]
/OK3568_Linux_fs/kernel/arch/sparc/vdso/
H A Dvclock_gettime.c77 notrace static long vdso_fallback_gettimeofday(struct __kernel_old_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 __kernel_old_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 __kernel_old_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 …]

12345678