arch/alpha/kernel/osf_sys.c
1001
return do_sys_settimeofday64(tv ? &kts : NULL, tz ? &ktz : NULL);
arch/alpha/kernel/osf_sys.c
970
struct timezone __user *, tz)
arch/alpha/kernel/osf_sys.c
979
if (tz) {
arch/alpha/kernel/osf_sys.c
980
if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
arch/alpha/kernel/osf_sys.c
987
struct timezone __user *, tz)
arch/alpha/kernel/osf_sys.c
996
if (tz) {
arch/alpha/kernel/osf_sys.c
997
if (copy_from_user(&ktz, tz, sizeof(*tz)))
arch/arm/include/asm/vdso/gettimeofday.h
22
register struct timezone *tz asm("r1") = _tz;
arch/arm/include/asm/vdso/gettimeofday.h
30
: "r" (tv), "r" (tz), "r" (nr)
arch/arm/vdso/vgettimeofday.c
26
struct timezone *tz)
arch/arm/vdso/vgettimeofday.c
28
return __cvdso_gettimeofday(tv, tz);
arch/arm64/include/asm/vdso/compat_gettimeofday.h
24
register struct timezone *tz asm("r1") = _tz;
arch/arm64/include/asm/vdso/compat_gettimeofday.h
32
: "r" (tv), "r" (tz), "r" (nr)
arch/arm64/include/asm/vdso/gettimeofday.h
24
register struct timezone *tz asm("x1") = _tz;
arch/arm64/include/asm/vdso/gettimeofday.h
32
: "r" (tv), "r" (tz), "r" (nr)
arch/arm64/kernel/vdso/vgettimeofday.c
10
int __kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
arch/arm64/kernel/vdso/vgettimeofday.c
20
struct timezone *tz)
arch/arm64/kernel/vdso/vgettimeofday.c
22
return __cvdso_gettimeofday(tv, tz);
arch/arm64/kernel/vdso32/vgettimeofday.c
24
struct timezone *tz)
arch/arm64/kernel/vdso32/vgettimeofday.c
26
return __cvdso_gettimeofday(tv, tz);
arch/loongarch/include/asm/vdso/gettimeofday.h
24
register struct timezone *tz asm("a1") = _tz;
arch/loongarch/include/asm/vdso/gettimeofday.h
31
: "r" (nr), "r" (tv), "r" (tz)
arch/loongarch/vdso/vgettimeofday.c
15
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/loongarch/vdso/vgettimeofday.c
17
return __cvdso_gettimeofday(tv, tz);
arch/mips/include/asm/vdso/gettimeofday.h
33
register struct timezone *tz asm("a1") = _tz;
arch/mips/include/asm/vdso/gettimeofday.h
42
: "r" (tv), "r" (tz), "r" (nr)
arch/mips/vdso/vgettimeofday.c
30
struct timezone *tz)
arch/mips/vdso/vgettimeofday.c
32
return __cvdso_gettimeofday(tv, tz);
arch/mips/vdso/vgettimeofday.c
71
struct timezone *tz)
arch/mips/vdso/vgettimeofday.c
73
return __cvdso_gettimeofday(tv, tz);
arch/parisc/kernel/vdso32/vdso32_generic.c
13
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
arch/parisc/kernel/vdso32/vdso32_generic.c
19
struct timezone *tz)
arch/parisc/kernel/vdso32/vdso32_generic.c
21
return syscall2(__NR_gettimeofday, (long)tv, (long)tz);
arch/parisc/kernel/vdso64/vdso64_generic.c
11
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
arch/parisc/kernel/vdso64/vdso64_generic.c
16
struct timezone *tz)
arch/parisc/kernel/vdso64/vdso64_generic.c
18
return syscall2(__NR_gettimeofday, (long)tv, (long)tz);
arch/powerpc/include/asm/vdso/gettimeofday.h
141
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
arch/powerpc/kernel/vdso/vgettimeofday.c
46
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
arch/powerpc/kernel/vdso/vgettimeofday.c
49
return __cvdso_gettimeofday_data(vd, tv, tz);
arch/riscv/include/asm/vdso/gettimeofday.h
25
register struct timezone *tz asm("a1") = _tz;
arch/riscv/include/asm/vdso/gettimeofday.h
31
: "r"(tv), "r"(tz), "r"(nr)
arch/riscv/kernel/vdso/vgettimeofday.c
18
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/riscv/kernel/vdso/vgettimeofday.c
20
return __cvdso_gettimeofday(tv, tz);
arch/s390/include/asm/vdso/gettimeofday.h
30
register struct timezone *tz)
arch/s390/include/asm/vdso/gettimeofday.h
32
return syscall2(__NR_gettimeofday, (long)tv, (long)tz);
arch/s390/kernel/vdso/vdso.h
8
int __s390_vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
arch/s390/kernel/vdso/vdso_generic.c
6
struct timezone *tz)
arch/s390/kernel/vdso/vdso_generic.c
8
return __cvdso_gettimeofday(tv, tz);
arch/sparc/vdso/vclock_gettime.c
327
__vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/sparc/vdso/vclock_gettime.c
349
if (unlikely(tz != NULL)) {
arch/sparc/vdso/vclock_gettime.c
351
tz->tz_minuteswest = vvd->tz_minuteswest;
arch/sparc/vdso/vclock_gettime.c
352
tz->tz_dsttime = vvd->tz_dsttime;
arch/sparc/vdso/vclock_gettime.c
356
return vdso_fallback_gettimeofday(tv, tz);
arch/sparc/vdso/vclock_gettime.c
363
__vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/sparc/vdso/vclock_gettime.c
385
if (unlikely(tz != NULL)) {
arch/sparc/vdso/vclock_gettime.c
387
tz->tz_minuteswest = vvd->tz_minuteswest;
arch/sparc/vdso/vclock_gettime.c
388
tz->tz_dsttime = vvd->tz_dsttime;
arch/sparc/vdso/vclock_gettime.c
392
return vdso_fallback_gettimeofday(tv, tz);
arch/sparc/vdso/vclock_gettime.c
77
notrace static long vdso_fallback_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/sparc/vdso/vclock_gettime.c
81
register long o1 __asm__("o1") = (long) tz;
arch/x86/entry/vdso/common/vclock_gettime.c
18
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/x86/entry/vdso/common/vclock_gettime.c
20
return __cvdso_gettimeofday(tv, tz);
arch/x86/um/vdso/um_vdso.c
30
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
arch/x86/um/vdso/um_vdso.c
36
: "0" (__NR_gettimeofday), "D" (tv), "S" (tz)
crypto/ecc.c
1447
u64 tz[ECC_MAX_DIGITS];
crypto/ecc.c
1452
vli_mod_sub(tz, rx, tx, curve->p, ndigits);
crypto/ecc.c
1454
vli_mod_mult_fast(z, z, tz, curve);
drivers/acpi/acpi_tad.c
217
rt.tz = val;
drivers/acpi/acpi_tad.c
247
rt.tz, rt.daylight);
drivers/acpi/acpi_tad.c
65
s16 tz; /* -1440 to 1440 or 2047 (unspecified) */
drivers/acpi/acpi_tad.c
86
rt->tz < -1440 || (rt->tz > 1440 && rt->tz != 2047) ||
drivers/acpi/thermal.c
129
static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
drivers/acpi/thermal.c
134
if (!tz)
drivers/acpi/thermal.c
137
tz->last_temp_dk = tz->temp_dk;
drivers/acpi/thermal.c
139
status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp);
drivers/acpi/thermal.c
143
tz->temp_dk = tmp;
drivers/acpi/thermal.c
145
acpi_handle_debug(tz->device->handle, "Temperature is %lu dK\n",
drivers/acpi/thermal.c
146
tz->temp_dk);
drivers/acpi/thermal.c
151
static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
drivers/acpi/thermal.c
156
if (!tz)
drivers/acpi/thermal.c
159
status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp);
drivers/acpi/thermal.c
163
tz->polling_frequency = tmp;
drivers/acpi/thermal.c
164
acpi_handle_debug(tz->device->handle, "Polling frequency is %lu dS\n",
drivers/acpi/thermal.c
165
tz->polling_frequency);
drivers/acpi/thermal.c
170
static int acpi_thermal_temp(struct acpi_thermal *tz, int temp_deci_k)
drivers/acpi/thermal.c
178
tz->kelvin_offset);
drivers/acpi/thermal.c
190
static int active_trip_index(struct acpi_thermal *tz,
drivers/acpi/thermal.c
196
return active - tz->trips.active;
drivers/acpi/thermal.c
199
static long get_passive_temp(struct acpi_thermal *tz)
drivers/acpi/thermal.c
203
if (acpi_passive_trip_temp(tz->device, &temp))
drivers/acpi/thermal.c
209
static long get_active_temp(struct acpi_thermal *tz, int index)
drivers/acpi/thermal.c
213
if (acpi_active_trip_temp(tz->device, index, &temp))
drivers/acpi/thermal.c
229
static void acpi_thermal_update_trip(struct acpi_thermal *tz,
drivers/acpi/thermal.c
238
acpi_trip->temp_dk = get_passive_temp(tz);
drivers/acpi/thermal.c
240
int index = active_trip_index(tz, acpi_trip);
drivers/acpi/thermal.c
242
acpi_trip->temp_dk = get_active_temp(tz, index);
drivers/acpi/thermal.c
246
ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
drivers/acpi/thermal.c
249
static bool update_trip_devices(struct acpi_thermal *tz,
drivers/acpi/thermal.c
262
if (!acpi_evaluate_reference(tz->device->handle, method, NULL, &devices)) {
drivers/acpi/thermal.c
263
acpi_handle_info(tz->device->handle, "%s evaluation failure\n", method);
drivers/acpi/thermal.c
273
ACPI_THERMAL_TRIPS_EXCEPTION(tz, "device");
drivers/acpi/thermal.c
279
static void acpi_thermal_update_trip_devices(struct acpi_thermal *tz,
drivers/acpi/thermal.c
284
ACPI_THERMAL_TRIP_PASSIVE : active_trip_index(tz, acpi_trip);
drivers/acpi/thermal.c
286
if (update_trip_devices(tz, acpi_trip, index, true))
drivers/acpi/thermal.c
290
ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
drivers/acpi/thermal.c
294
struct acpi_thermal *tz;
drivers/acpi/thermal.c
302
struct acpi_thermal *tz = atd->tz;
drivers/acpi/thermal.c
309
acpi_thermal_update_trip(tz, trip);
drivers/acpi/thermal.c
311
acpi_thermal_update_trip_devices(tz, trip);
drivers/acpi/thermal.c
314
temp = acpi_thermal_temp(tz, acpi_trip->temp_dk);
drivers/acpi/thermal.c
318
thermal_zone_set_trip_temp(tz->thermal_zone, trip, temp);
drivers/acpi/thermal.c
323
static void acpi_queue_thermal_check(struct acpi_thermal *tz)
drivers/acpi/thermal.c
325
if (!work_pending(&tz->thermal_check_work))
drivers/acpi/thermal.c
326
queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work);
drivers/acpi/thermal.c
329
static void acpi_thermal_trips_update(struct acpi_thermal *tz, u32 event)
drivers/acpi/thermal.c
331
struct adjust_trip_data atd = { .tz = tz, .event = event };
drivers/acpi/thermal.c
332
struct acpi_device *adev = tz->device;
drivers/acpi/thermal.c
341
thermal_zone_for_each_trip(tz->thermal_zone,
drivers/acpi/thermal.c
343
acpi_queue_thermal_check(tz);
drivers/acpi/thermal.c
348
static int acpi_thermal_get_critical_trip(struct acpi_thermal *tz)
drivers/acpi/thermal.c
357
acpi_handle_debug(tz->device->handle, "Critical threshold disabled\n");
drivers/acpi/thermal.c
361
if (acpi_critical_trip_temp(tz->device, &temp))
drivers/acpi/thermal.c
374
acpi_handle_debug(tz->device->handle, "Critical threshold [%d]\n", temp);
drivers/acpi/thermal.c
378
static int acpi_thermal_get_hot_trip(struct acpi_thermal *tz)
drivers/acpi/thermal.c
382
if (acpi_hot_trip_temp(tz->device, &temp) || temp == THERMAL_TEMP_INVALID) {
drivers/acpi/thermal.c
383
acpi_handle_debug(tz->device->handle, "No hot threshold\n");
drivers/acpi/thermal.c
387
acpi_handle_debug(tz->device->handle, "Hot threshold [%d]\n", temp);
drivers/acpi/thermal.c
391
static bool passive_trip_params_init(struct acpi_thermal *tz)
drivers/acpi/thermal.c
396
status = acpi_evaluate_integer(tz->device->handle, "_TC1", NULL, &tmp);
drivers/acpi/thermal.c
400
tz->trips.passive.tc1 = tmp;
drivers/acpi/thermal.c
402
status = acpi_evaluate_integer(tz->device->handle, "_TC2", NULL, &tmp);
drivers/acpi/thermal.c
406
tz->trips.passive.tc2 = tmp;
drivers/acpi/thermal.c
408
status = acpi_evaluate_integer(tz->device->handle, "_TFP", NULL, &tmp);
drivers/acpi/thermal.c
410
tz->trips.passive.delay = tmp;
drivers/acpi/thermal.c
414
status = acpi_evaluate_integer(tz->device->handle, "_TSP", NULL, &tmp);
drivers/acpi/thermal.c
418
tz->trips.passive.delay = tmp * 100;
drivers/acpi/thermal.c
423
static bool acpi_thermal_init_trip(struct acpi_thermal *tz, int index)
drivers/acpi/thermal.c
429
acpi_trip = &tz->trips.passive.trip;
drivers/acpi/thermal.c
434
if (!passive_trip_params_init(tz))
drivers/acpi/thermal.c
438
get_passive_temp(tz);
drivers/acpi/thermal.c
440
acpi_trip = &tz->trips.active[index].trip;
drivers/acpi/thermal.c
445
temp = get_active_temp(tz, index);
drivers/acpi/thermal.c
451
if (!update_trip_devices(tz, acpi_trip, index, false))
drivers/acpi/thermal.c
462
static void acpi_thermal_get_trip_points(struct acpi_thermal *tz)
drivers/acpi/thermal.c
466
acpi_thermal_init_trip(tz, ACPI_THERMAL_TRIP_PASSIVE);
drivers/acpi/thermal.c
469
if (!acpi_thermal_init_trip(tz, i))
drivers/acpi/thermal.c
474
tz->trips.active[i].trip.temp_dk = THERMAL_TEMP_INVALID;
drivers/acpi/thermal.c
481
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
drivers/acpi/thermal.c
484
if (!tz)
drivers/acpi/thermal.c
487
result = acpi_thermal_get_temperature(tz);
drivers/acpi/thermal.c
491
*temp = deci_kelvin_to_millicelsius_with_offset(tz->temp_dk,
drivers/acpi/thermal.c
492
tz->kelvin_offset);
drivers/acpi/thermal.c
500
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
drivers/acpi/thermal.c
504
if (!tz || !trip)
drivers/acpi/thermal.c
513
t = tz->trips.passive.tc1 * (tz->temp_dk -
drivers/acpi/thermal.c
514
tz->last_temp_dk) +
drivers/acpi/thermal.c
515
tz->trips.passive.tc2 * (tz->temp_dk -
drivers/acpi/thermal.c
527
t = acpi_thermal_temp(tz, tz->temp_dk);
drivers/acpi/thermal.c
544
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
drivers/acpi/thermal.c
546
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
drivers/acpi/thermal.c
547
dev_name(&tz->device->dev),
drivers/acpi/thermal.c
553
struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
drivers/acpi/thermal.c
555
acpi_bus_generate_netlink_event(tz->device->pnp.device_class,
drivers/acpi/thermal.c
556
dev_name(&tz->device->dev),
drivers/acpi/thermal.c
593
static int acpi_thermal_zone_sysfs_add(struct acpi_thermal *tz)
drivers/acpi/thermal.c
595
struct device *tzdev = thermal_zone_device(tz->thermal_zone);
drivers/acpi/thermal.c
598
ret = sysfs_create_link(&tz->device->dev.kobj,
drivers/acpi/thermal.c
60
#define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) \
drivers/acpi/thermal.c
604
&tz->device->dev.kobj, "device");
drivers/acpi/thermal.c
606
sysfs_remove_link(&tz->device->dev.kobj, "thermal_zone");
drivers/acpi/thermal.c
611
static void acpi_thermal_zone_sysfs_remove(struct acpi_thermal *tz)
drivers/acpi/thermal.c
613
struct device *tzdev = thermal_zone_device(tz->thermal_zone);
drivers/acpi/thermal.c
615
sysfs_remove_link(&tz->device->dev.kobj, "thermal_zone");
drivers/acpi/thermal.c
619
static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
drivers/acpi/thermal.c
62
acpi_handle_info(tz->device->handle, \
drivers/acpi/thermal.c
627
tz->thermal_zone = thermal_zone_device_register_with_trips(
drivers/acpi/thermal.c
628
"acpitz", trip_table, trip_count, tz,
drivers/acpi/thermal.c
630
tz->polling_frequency * 100);
drivers/acpi/thermal.c
632
tz->thermal_zone = thermal_tripless_zone_device_register(
drivers/acpi/thermal.c
633
"acpitz", tz, &acpi_thermal_zone_ops, NULL);
drivers/acpi/thermal.c
635
if (IS_ERR(tz->thermal_zone))
drivers/acpi/thermal.c
636
return PTR_ERR(tz->thermal_zone);
drivers/acpi/thermal.c
638
result = acpi_thermal_zone_sysfs_add(tz);
drivers/acpi/thermal.c
642
result = thermal_zone_device_enable(tz->thermal_zone);
drivers/acpi/thermal.c
646
dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
drivers/acpi/thermal.c
647
thermal_zone_device_id(tz->thermal_zone));
drivers/acpi/thermal.c
652
acpi_thermal_zone_sysfs_remove(tz);
drivers/acpi/thermal.c
654
thermal_zone_device_unregister(tz->thermal_zone);
drivers/acpi/thermal.c
659
static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
drivers/acpi/thermal.c
661
thermal_zone_device_disable(tz->thermal_zone);
drivers/acpi/thermal.c
662
acpi_thermal_zone_sysfs_remove(tz);
drivers/acpi/thermal.c
663
thermal_zone_device_unregister(tz->thermal_zone);
drivers/acpi/thermal.c
664
tz->thermal_zone = NULL;
drivers/acpi/thermal.c
674
struct acpi_thermal *tz = data;
drivers/acpi/thermal.c
676
if (!tz)
drivers/acpi/thermal.c
681
acpi_queue_thermal_check(tz);
drivers/acpi/thermal.c
685
acpi_thermal_trips_update(tz, event);
drivers/acpi/thermal.c
688
acpi_handle_debug(tz->device->handle,
drivers/acpi/thermal.c
706
static void acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz)
drivers/acpi/thermal.c
708
acpi_handle handle = tz->device->handle;
drivers/acpi/thermal.c
736
static void acpi_thermal_guess_offset(struct acpi_thermal *tz, long crit_temp)
drivers/acpi/thermal.c
739
tz->kelvin_offset = 273100;
drivers/acpi/thermal.c
741
tz->kelvin_offset = 273200;
drivers/acpi/thermal.c
746
struct acpi_thermal *tz = container_of(work, struct acpi_thermal,
drivers/acpi/thermal.c
757
if (!refcount_dec_not_one(&tz->thermal_check_count))
drivers/acpi/thermal.c
760
mutex_lock(&tz->thermal_check_lock);
drivers/acpi/thermal.c
762
thermal_zone_device_update(tz->thermal_zone, THERMAL_EVENT_UNSPECIFIED);
drivers/acpi/thermal.c
764
refcount_inc(&tz->thermal_check_count);
drivers/acpi/thermal.c
766
mutex_unlock(&tz->thermal_check_lock);
drivers/acpi/thermal.c
769
static void acpi_thermal_free_thermal_zone(struct acpi_thermal *tz)
drivers/acpi/thermal.c
773
acpi_handle_list_free(&tz->trips.passive.trip.devices);
drivers/acpi/thermal.c
775
acpi_handle_list_free(&tz->trips.active[i].trip.devices);
drivers/acpi/thermal.c
777
kfree(tz);
drivers/acpi/thermal.c
786
struct acpi_thermal *tz;
drivers/acpi/thermal.c
795
tz = kzalloc_obj(struct acpi_thermal);
drivers/acpi/thermal.c
796
if (!tz)
drivers/acpi/thermal.c
799
platform_set_drvdata(pdev, tz);
drivers/acpi/thermal.c
801
tz->device = device;
drivers/acpi/thermal.c
802
strscpy(tz->name, device->pnp.bus_id);
drivers/acpi/thermal.c
806
acpi_thermal_aml_dependency_fix(tz);
drivers/acpi/thermal.c
812
acpi_execute_simple_method(tz->device->handle, "_SCP", ACPI_THERMAL_MODE_ACTIVE);
drivers/acpi/thermal.c
815
acpi_thermal_get_trip_points(tz);
drivers/acpi/thermal.c
817
crit_temp = acpi_thermal_get_critical_trip(tz);
drivers/acpi/thermal.c
818
hot_temp = acpi_thermal_get_hot_trip(tz);
drivers/acpi/thermal.c
821
result = acpi_thermal_get_temperature(tz);
drivers/acpi/thermal.c
827
tz->polling_frequency = tzp;
drivers/acpi/thermal.c
829
acpi_thermal_get_polling_frequency(tz);
drivers/acpi/thermal.c
831
acpi_thermal_guess_offset(tz, crit_temp);
drivers/acpi/thermal.c
837
trip->temperature = acpi_thermal_temp(tz, crit_temp);
drivers/acpi/thermal.c
843
trip->temperature = acpi_thermal_temp(tz, hot_temp);
drivers/acpi/thermal.c
847
acpi_trip = &tz->trips.passive.trip;
drivers/acpi/thermal.c
849
passive_delay = tz->trips.passive.delay;
drivers/acpi/thermal.c
852
trip->temperature = acpi_thermal_temp(tz, acpi_trip->temp_dk);
drivers/acpi/thermal.c
858
acpi_trip = &tz->trips.active[i].trip;
drivers/acpi/thermal.c
864
trip->temperature = acpi_thermal_temp(tz, acpi_trip->temp_dk);
drivers/acpi/thermal.c
872
result = acpi_thermal_register_thermal_zone(tz, trip_table,
drivers/acpi/thermal.c
878
refcount_set(&tz->thermal_check_count, 3);
drivers/acpi/thermal.c
879
mutex_init(&tz->thermal_check_lock);
drivers/acpi/thermal.c
880
INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn);
drivers/acpi/thermal.c
883
acpi_device_bid(device), deci_kelvin_to_celsius(tz->temp_dk));
drivers/acpi/thermal.c
886
acpi_thermal_notify, tz);
drivers/acpi/thermal.c
894
acpi_thermal_unregister_thermal_zone(tz);
drivers/acpi/thermal.c
896
acpi_thermal_free_thermal_zone(tz);
drivers/acpi/thermal.c
903
struct acpi_thermal *tz = platform_get_drvdata(pdev);
drivers/acpi/thermal.c
905
acpi_dev_remove_notify_handler(tz->device, ACPI_DEVICE_NOTIFY,
drivers/acpi/thermal.c
909
acpi_thermal_unregister_thermal_zone(tz);
drivers/acpi/thermal.c
910
acpi_thermal_free_thermal_zone(tz);
drivers/ata/ahci_imx.c
385
static int sata_ahci_read_temperature(struct thermal_zone_device *tz, int *temp)
drivers/ata/ahci_imx.c
387
return __sata_ahci_read_temperature(thermal_zone_device_priv(tz), temp);
drivers/hwmon/hwmon.c
163
static int hwmon_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/hwmon/hwmon.c
165
struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz);
drivers/hwmon/hwmon.c
182
static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/hwmon/hwmon.c
184
struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz);
drivers/hwmon/pmbus/pmbus_core.c
1360
static int pmbus_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/hwmon/pmbus/pmbus_core.c
1362
struct pmbus_thermal_data *tdata = thermal_zone_device_priv(tz);
drivers/hwmon/scmi-hwmon.c
139
static int scmi_hwmon_thermal_get_temp(struct thermal_zone_device *tz,
drivers/hwmon/scmi-hwmon.c
144
struct scmi_thermal_sensor *th_sensor = thermal_zone_device_priv(tz);
drivers/hwmon/scpi-hwmon.c
65
static int scpi_read_temp(struct thermal_zone_device *tz, int *temp)
drivers/hwmon/scpi-hwmon.c
67
struct scpi_thermal_zone *zone = thermal_zone_device_priv(tz);
drivers/iio/adc/sun4i-gpadc-iio.c
408
static int sun4i_gpadc_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/iio/adc/sun4i-gpadc-iio.c
410
struct sun4i_gpadc_iio *info = thermal_zone_device_priv(tz);
drivers/input/touchscreen/sun4i-ts.c
195
static int sun4i_get_tz_temp(struct thermal_zone_device *tz, int *temp)
drivers/input/touchscreen/sun4i-ts.c
197
return sun4i_get_temp(thermal_zone_device_priv(tz), temp);
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
222
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
224
struct mlxsw_thermal *thermal = tz->parent;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
239
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
240
struct mlxsw_thermal *thermal = tz->parent;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
245
sensor_index = MLXSW_REG_MTMP_MODULE_INDEX_MIN + tz->module;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
246
mlxsw_reg_mtmp_pack(mtmp_pl, tz->slot_index, sensor_index,
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
263
struct mlxsw_thermal_module *tz = thermal_zone_device_priv(tzdev);
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
264
struct mlxsw_thermal *thermal = tz->parent;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
270
index = MLXSW_REG_MTMP_GBOX_INDEX_MIN + tz->module;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
271
mlxsw_reg_mtmp_pack(mtmp_pl, tz->slot_index, index, false, false);
drivers/perf/xgene_pmu.c
555
XGENE_PMU_EVENT_ATTR(tz-fail, 0x26),
drivers/power/supply/ab8500_btemp.c
102
struct thermal_zone_device *tz;
drivers/power/supply/ab8500_btemp.c
287
ret = thermal_zone_get_temp(di->tz, &bat_temp);
drivers/power/supply/ab8500_btemp.c
716
di->tz = thermal_zone_get_zone_by_name("battery-thermal");
drivers/power/supply/ab8500_btemp.c
717
if (IS_ERR(di->tz)) {
drivers/power/supply/ab8500_btemp.c
718
ret = PTR_ERR(di->tz);
drivers/regulator/max8973-regulator.c
435
static int max8973_thermal_read_temp(struct thermal_zone_device *tz, int *temp)
drivers/regulator/max8973-regulator.c
437
struct max8973_chip *mchip = thermal_zone_device_priv(tz);
drivers/remoteproc/stm32_rproc.c
703
struct stm32_syscon tz;
drivers/remoteproc/stm32_rproc.c
755
err = stm32_rproc_get_syscon(np, "st,syscfg-tz", &tz);
drivers/remoteproc/stm32_rproc.c
757
err = regmap_read(tz.map, tz.reg, &tzen);
drivers/remoteproc/stm32_rproc.c
762
ddata->hold_boot_smc = tzen & tz.mask;
drivers/thermal/airoha_thermal.c
201
struct thermal_zone_device *tz;
drivers/thermal/airoha_thermal.c
231
static int airoha_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/airoha_thermal.c
233
struct airoha_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/airoha_thermal.c
256
static int airoha_thermal_set_trips(struct thermal_zone_device *tz, int low,
drivers/thermal/airoha_thermal.c
259
struct airoha_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/airoha_thermal.c
324
thermal_zone_device_update(priv->tz, event);
drivers/thermal/airoha_thermal.c
456
priv->tz = devm_thermal_of_zone_register(dev, 0, priv, &thdev_ops);
drivers/thermal/airoha_thermal.c
457
if (IS_ERR(priv->tz)) {
drivers/thermal/airoha_thermal.c
459
return PTR_ERR(priv->tz);
drivers/thermal/amlogic_thermal.c
177
static int amlogic_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/amlogic_thermal.c
180
struct amlogic_thermal *pdata = thermal_zone_device_priv(tz);
drivers/thermal/armada_thermal.c
121
struct thermal_zone_device *tz;
drivers/thermal/armada_thermal.c
415
static int armada_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/armada_thermal.c
417
struct armada_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/armada_thermal.c
796
struct thermal_zone_device *tz,
drivers/thermal/armada_thermal.c
803
ret = thermal_zone_get_crit_temp(tz, &temperature);
drivers/thermal/armada_thermal.c
815
priv->overheat_sensor = tz;
drivers/thermal/armada_thermal.c
824
struct thermal_zone_device *tz;
drivers/thermal/armada_thermal.c
874
tz = thermal_tripless_zone_device_register(priv->zone_name,
drivers/thermal/armada_thermal.c
877
if (IS_ERR(tz)) {
drivers/thermal/armada_thermal.c
880
return PTR_ERR(tz);
drivers/thermal/armada_thermal.c
883
ret = thermal_zone_device_enable(tz);
drivers/thermal/armada_thermal.c
885
thermal_zone_device_unregister(tz);
drivers/thermal/armada_thermal.c
890
drvdata->data.tz = tz;
drivers/thermal/armada_thermal.c
937
tz = devm_thermal_of_zone_register(&pdev->dev,
drivers/thermal/armada_thermal.c
940
if (IS_ERR(tz)) {
drivers/thermal/armada_thermal.c
953
armada_configure_overheat_int(priv, tz, sensor->id);
drivers/thermal/armada_thermal.c
968
thermal_zone_device_unregister(drvdata->data.tz);
drivers/thermal/broadcom/bcm2711_thermal.c
34
static int bcm2711_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/broadcom/bcm2711_thermal.c
36
struct bcm2711_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/bcm2711_thermal.c
37
int slope = thermal_zone_get_slope(tz);
drivers/thermal/broadcom/bcm2711_thermal.c
38
int offset = thermal_zone_get_offset(tz);
drivers/thermal/broadcom/bcm2835_thermal.c
100
thermal_zone_get_slope(data->tz));
drivers/thermal/broadcom/bcm2835_thermal.c
164
struct thermal_zone_device *tz;
drivers/thermal/broadcom/bcm2835_thermal.c
195
tz = devm_thermal_of_zone_register(dev, 0, data, &bcm2835_thermal_ops);
drivers/thermal/broadcom/bcm2835_thermal.c
196
if (IS_ERR(tz))
drivers/thermal/broadcom/bcm2835_thermal.c
197
return dev_err_probe(dev, PTR_ERR(tz), "Failed to register the thermal device\n");
drivers/thermal/broadcom/bcm2835_thermal.c
209
slope = thermal_zone_get_slope(tz);
drivers/thermal/broadcom/bcm2835_thermal.c
210
offset = thermal_zone_get_offset(tz);
drivers/thermal/broadcom/bcm2835_thermal.c
215
err = thermal_zone_get_crit_temp(tz, &crit_temp);
drivers/thermal/broadcom/bcm2835_thermal.c
241
data->tz = tz;
drivers/thermal/broadcom/bcm2835_thermal.c
249
err = thermal_add_hwmon_sysfs(tz);
drivers/thermal/broadcom/bcm2835_thermal.c
68
struct thermal_zone_device *tz;
drivers/thermal/broadcom/bcm2835_thermal.c
87
static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/broadcom/bcm2835_thermal.c
89
struct bcm2835_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/bcm2835_thermal.c
99
thermal_zone_get_offset(data->tz),
drivers/thermal/broadcom/brcmstb_thermal.c
153
static int brcmstb_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/broadcom/brcmstb_thermal.c
155
struct brcmstb_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/brcmstb_thermal.c
261
static int brcmstb_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/broadcom/brcmstb_thermal.c
263
struct brcmstb_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/ns-thermal.c
17
static int ns_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/broadcom/ns-thermal.c
19
void __iomem *pvtmon = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/ns-thermal.c
20
int offset = thermal_zone_get_offset(tz);
drivers/thermal/broadcom/ns-thermal.c
21
int slope = thermal_zone_get_slope(tz);
drivers/thermal/broadcom/ns-thermal.c
48
struct thermal_zone_device *tz;
drivers/thermal/broadcom/ns-thermal.c
55
tz = devm_thermal_of_zone_register(dev, 0,
drivers/thermal/broadcom/ns-thermal.c
58
if (IS_ERR(tz)) {
drivers/thermal/broadcom/ns-thermal.c
60
return PTR_ERR(tz);
drivers/thermal/broadcom/sr-thermal.c
33
static int sr_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/broadcom/sr-thermal.c
35
struct sr_tmon *tmon = thermal_zone_device_priv(tz);
drivers/thermal/broadcom/sr-thermal.c
50
struct thermal_zone_device *tz;
drivers/thermal/broadcom/sr-thermal.c
87
tz = devm_thermal_of_zone_register(dev, i, tmon,
drivers/thermal/broadcom/sr-thermal.c
89
if (IS_ERR(tz))
drivers/thermal/broadcom/sr-thermal.c
90
return PTR_ERR(tz);
drivers/thermal/db8500_thermal.c
121
thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/db8500_thermal.c
146
thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/db8500_thermal.c
188
th->tz = devm_thermal_of_zone_register(dev, 0, th, &thdev_ops);
drivers/thermal/db8500_thermal.c
189
if (IS_ERR(th->tz)) {
drivers/thermal/db8500_thermal.c
191
return PTR_ERR(th->tz);
drivers/thermal/db8500_thermal.c
55
struct thermal_zone_device *tz;
drivers/thermal/db8500_thermal.c
62
static int db8500_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/db8500_thermal.c
64
struct db8500_thermal_zone *th = thermal_zone_device_priv(tz);
drivers/thermal/gov_bang_bang.c
102
turn_on = tz->temperature >= td->threshold;
drivers/thermal/gov_bang_bang.c
109
tz->governor_data = (void *)true;
drivers/thermal/gov_bang_bang.c
112
static void bang_bang_update_tz(struct thermal_zone_device *tz,
drivers/thermal/gov_bang_bang.c
120
tz->governor_data = NULL;
drivers/thermal/gov_bang_bang.c
63
static void bang_bang_trip_crossed(struct thermal_zone_device *tz,
drivers/thermal/gov_bang_bang.c
70
lockdep_assert_held(&tz->lock);
drivers/thermal/gov_bang_bang.c
72
dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n",
drivers/thermal/gov_bang_bang.c
73
thermal_zone_trip_id(tz, trip), trip->temperature,
drivers/thermal/gov_bang_bang.c
74
tz->temperature, trip->hysteresis);
drivers/thermal/gov_bang_bang.c
80
static void bang_bang_manage(struct thermal_zone_device *tz)
drivers/thermal/gov_bang_bang.c
86
if (tz->governor_data)
drivers/thermal/gov_bang_bang.c
89
for_each_trip_desc(tz, td) {
drivers/thermal/gov_fair_share.c
101
lockdep_assert_held(&tz->lock);
drivers/thermal/gov_fair_share.c
103
for_each_trip_desc(tz, td) {
drivers/thermal/gov_fair_share.c
111
fair_share_throttle(tz, td, trip_level);
drivers/thermal/gov_fair_share.c
18
static int get_trip_level(struct thermal_zone_device *tz)
drivers/thermal/gov_fair_share.c
24
for_each_trip_desc(tz, td) {
drivers/thermal/gov_fair_share.c
25
if (td->threshold > tz->temperature)
drivers/thermal/gov_fair_share.c
38
trace_thermal_zone_trip(tz, thermal_zone_trip_id(tz, &level_td->trip),
drivers/thermal/gov_fair_share.c
63
static void fair_share_throttle(struct thermal_zone_device *tz,
drivers/thermal/gov_fair_share.c
83
divisor = tz->num_trips;
drivers/thermal/gov_fair_share.c
96
static void fair_share_manage(struct thermal_zone_device *tz)
drivers/thermal/gov_fair_share.c
98
int trip_level = get_trip_level(tz);
drivers/thermal/gov_power_allocator.c
116
static u32 estimate_sustainable_power(struct thermal_zone_device *tz)
drivers/thermal/gov_power_allocator.c
118
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
149
static void estimate_pid_constants(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
171
tz->tzp->k_po = int_to_frac(sustainable_power) /
drivers/thermal/gov_power_allocator.c
174
tz->tzp->k_pu = int_to_frac(2 * sustainable_power) /
drivers/thermal/gov_power_allocator.c
177
k_i = tz->tzp->k_pu / 10;
drivers/thermal/gov_power_allocator.c
178
tz->tzp->k_i = k_i > 0 ? k_i : 1;
drivers/thermal/gov_power_allocator.c
197
static u32 get_sustainable_power(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
203
if (!tz->tzp->sustainable_power)
drivers/thermal/gov_power_allocator.c
204
sustainable_power = estimate_sustainable_power(tz);
drivers/thermal/gov_power_allocator.c
206
sustainable_power = tz->tzp->sustainable_power;
drivers/thermal/gov_power_allocator.c
210
estimate_pid_constants(tz, sustainable_power,
drivers/thermal/gov_power_allocator.c
214
tz->tzp->sustainable_power = sustainable_power;
drivers/thermal/gov_power_allocator.c
239
static u32 pid_controller(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
243
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
250
sustainable_power = get_sustainable_power(tz, params, control_temp);
drivers/thermal/gov_power_allocator.c
252
err = control_temp - tz->temperature;
drivers/thermal/gov_power_allocator.c
256
p = mul_frac(err < 0 ? tz->tzp->k_po : tz->tzp->k_pu, err);
drivers/thermal/gov_power_allocator.c
264
i = mul_frac(tz->tzp->k_i, params->err_integral);
drivers/thermal/gov_power_allocator.c
266
if (err < int_to_frac(tz->tzp->integral_cutoff)) {
drivers/thermal/gov_power_allocator.c
267
s64 i_next = i + mul_frac(tz->tzp->k_i, err);
drivers/thermal/gov_power_allocator.c
282
d = mul_frac(tz->tzp->k_d, err - params->prev_err);
drivers/thermal/gov_power_allocator.c
283
d = div_frac(d, jiffies_to_msecs(tz->passive_delay_jiffies));
drivers/thermal/gov_power_allocator.c
293
trace_thermal_power_allocator_pid(tz, frac_to_int(err),
drivers/thermal/gov_power_allocator.c
406
static void allocate_power(struct thermal_zone_device *tz, int control_temp)
drivers/thermal/gov_power_allocator.c
408
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
458
power_range = pid_controller(tz, control_temp, max_allocatable_power);
drivers/thermal/gov_power_allocator.c
474
trace_thermal_power_actor(tz, i, pa->req_power,
drivers/thermal/gov_power_allocator.c
479
trace_thermal_power_allocator(tz, total_req_power, total_granted_power,
drivers/thermal/gov_power_allocator.c
481
max_allocatable_power, tz->temperature,
drivers/thermal/gov_power_allocator.c
482
control_temp - tz->temperature);
drivers/thermal/gov_power_allocator.c
500
static void get_governor_trips(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
508
for_each_trip_desc(tz, td) {
drivers/thermal/gov_power_allocator.c
545
static void allow_maximum_power(struct thermal_zone_device *tz)
drivers/thermal/gov_power_allocator.c
547
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
588
static int check_power_actors(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
602
dev_warn(&tz->device, "power_allocator: %s is not a power actor\n",
drivers/thermal/gov_power_allocator.c
659
static void power_allocator_update_tz(struct thermal_zone_device *tz,
drivers/thermal/gov_power_allocator.c
662
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
696
static int power_allocator_bind(struct thermal_zone_device *tz)
drivers/thermal/gov_power_allocator.c
705
get_governor_trips(tz, params);
drivers/thermal/gov_power_allocator.c
707
ret = check_power_actors(tz, params);
drivers/thermal/gov_power_allocator.c
709
dev_warn(&tz->device, "power_allocator: binding failed\n");
drivers/thermal/gov_power_allocator.c
716
dev_warn(&tz->device, "power_allocator: allocation failed\n");
drivers/thermal/gov_power_allocator.c
721
if (!tz->tzp) {
drivers/thermal/gov_power_allocator.c
722
tz->tzp = kzalloc_obj(*tz->tzp);
drivers/thermal/gov_power_allocator.c
723
if (!tz->tzp) {
drivers/thermal/gov_power_allocator.c
731
if (!tz->tzp->sustainable_power)
drivers/thermal/gov_power_allocator.c
732
dev_warn(&tz->device, "power_allocator: sustainable_power will be estimated\n");
drivers/thermal/gov_power_allocator.c
734
params->sustainable_power = tz->tzp->sustainable_power;
drivers/thermal/gov_power_allocator.c
737
estimate_pid_constants(tz, tz->tzp->sustainable_power,
drivers/thermal/gov_power_allocator.c
743
tz->governor_data = params;
drivers/thermal/gov_power_allocator.c
756
static void power_allocator_unbind(struct thermal_zone_device *tz)
drivers/thermal/gov_power_allocator.c
758
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
760
dev_dbg(&tz->device, "Unbinding from thermal zone %d\n", tz->id);
drivers/thermal/gov_power_allocator.c
763
kfree(tz->tzp);
drivers/thermal/gov_power_allocator.c
764
tz->tzp = NULL;
drivers/thermal/gov_power_allocator.c
768
kfree(tz->governor_data);
drivers/thermal/gov_power_allocator.c
769
tz->governor_data = NULL;
drivers/thermal/gov_power_allocator.c
772
static void power_allocator_manage(struct thermal_zone_device *tz)
drivers/thermal/gov_power_allocator.c
774
struct power_allocator_params *params = tz->governor_data;
drivers/thermal/gov_power_allocator.c
777
lockdep_assert_held(&tz->lock);
drivers/thermal/gov_power_allocator.c
779
if (trip && tz->temperature < trip->temperature) {
drivers/thermal/gov_power_allocator.c
781
allow_maximum_power(tz);
drivers/thermal/gov_power_allocator.c
789
allocate_power(tz, params->trip_max->temperature);
drivers/thermal/gov_step_wise.c
117
static void step_wise_manage(struct thermal_zone_device *tz)
drivers/thermal/gov_step_wise.c
122
lockdep_assert_held(&tz->lock);
drivers/thermal/gov_step_wise.c
131
for_each_trip_desc(tz, td) {
drivers/thermal/gov_step_wise.c
139
thermal_zone_trip_update(tz, td, td->threshold);
drivers/thermal/gov_step_wise.c
142
for_each_trip_desc(tz, td) {
drivers/thermal/gov_step_wise.c
81
static void thermal_zone_trip_update(struct thermal_zone_device *tz,
drivers/thermal/gov_step_wise.c
85
bool throttle = tz->temperature >= trip_threshold;
drivers/thermal/gov_step_wise.c
87
enum thermal_trend trend = get_tz_trend(tz, trip);
drivers/thermal/gov_step_wise.c
88
int trip_id = thermal_zone_trip_id(tz, trip);
drivers/thermal/gov_step_wise.c
92
trace_thermal_zone_trip(tz, trip_id, trip->type);
drivers/thermal/gov_step_wise.c
94
dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n",
drivers/thermal/gov_user_space.c
18
static int user_space_bind(struct thermal_zone_device *tz)
drivers/thermal/gov_user_space.c
33
static void user_space_trip_crossed(struct thermal_zone_device *tz,
drivers/thermal/gov_user_space.c
40
lockdep_assert_held(&tz->lock);
drivers/thermal/gov_user_space.c
42
thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type);
drivers/thermal/gov_user_space.c
43
thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature);
drivers/thermal/gov_user_space.c
45
thermal_zone_trip_id(tz, trip));
drivers/thermal/gov_user_space.c
46
thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event);
drivers/thermal/gov_user_space.c
48
kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop);
drivers/thermal/hisi_thermal.c
427
static int hisi_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/hisi_thermal.c
429
struct hisi_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/imx8mm_thermal.c
141
static int tmu_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/imx8mm_thermal.c
143
struct tmu_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/imx91_thermal.c
107
static int imx91_tmu_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/imx91_thermal.c
109
struct imx91_tmu *tmu = thermal_zone_device_priv(tz);
drivers/thermal/imx91_thermal.c
119
static int imx91_tmu_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/imx91_thermal.c
121
struct imx91_tmu *tmu = thermal_zone_device_priv(tz);
drivers/thermal/imx91_thermal.c
201
static int imx91_tmu_change_mode(struct thermal_zone_device *tz, enum thermal_device_mode mode)
drivers/thermal/imx91_thermal.c
203
struct imx91_tmu *tmu = thermal_zone_device_priv(tz);
drivers/thermal/imx_sc_thermal.c
44
static int imx_sc_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/imx_sc_thermal.c
48
struct imx_sc_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/imx_thermal.c
205
struct thermal_zone_device *tz;
drivers/thermal/imx_thermal.c
254
static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/imx_thermal.c
256
struct imx_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/imx_thermal.c
310
static int imx_change_mode(struct thermal_zone_device *tz,
drivers/thermal/imx_thermal.c
313
struct imx_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/imx_thermal.c
334
static int imx_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/imx_thermal.c
337
struct imx_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/imx_thermal.c
356
static bool imx_should_bind(struct thermal_zone_device *tz,
drivers/thermal/imx_thermal.c
523
thermal_zone_device_update(data->tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/imx_thermal.c
682
data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone",
drivers/thermal/imx_thermal.c
689
if (IS_ERR(data->tz)) {
drivers/thermal/imx_thermal.c
690
ret = PTR_ERR(data->tz);
drivers/thermal/imx_thermal.c
728
ret = thermal_zone_device_enable(data->tz);
drivers/thermal/imx_thermal.c
745
thermal_zone_device_unregister(data->tz);
drivers/thermal/imx_thermal.c
764
thermal_zone_device_unregister(data->tz);
drivers/thermal/imx_thermal.c
780
ret = thermal_zone_device_disable(data->tz);
drivers/thermal/imx_thermal.c
796
return thermal_zone_device_enable(data->tz);
drivers/thermal/k3_bandgap.c
141
static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/k3_bandgap.c
143
struct k3_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/k3_j72xx_bandgap.c
252
static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/k3_j72xx_bandgap.c
254
return k3_bgp_read_temp(thermal_zone_device_priv(tz), temp);
drivers/thermal/loongson2_thermal.c
108
static int loongson2_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/loongson2_thermal.c
110
struct loongson2_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/loongson2_thermal.c
74
static int loongson2_2k1000_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/loongson2_thermal.c
77
struct loongson2_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/loongson2_thermal.c
85
static int loongson2_2k2000_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/loongson2_thermal.c
88
struct loongson2_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/max77620_thermal.c
47
static int max77620_thermal_read_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/max77620_thermal.c
49
struct max77620_therm_info *mtherm = thermal_zone_device_priv(tz);
drivers/thermal/mediatek/auxadc_thermal.c
848
static int mtk_read_temp(struct thermal_zone_device *tz, int *temperature)
drivers/thermal/mediatek/auxadc_thermal.c
850
struct mtk_thermal *mt = thermal_zone_device_priv(tz);
drivers/thermal/mediatek/lvts_thermal.c
1288
struct thermal_zone_device *tz;
drivers/thermal/mediatek/lvts_thermal.c
1305
tz = devm_thermal_of_zone_register(dev, dt_id, &lvts_sensors[i],
drivers/thermal/mediatek/lvts_thermal.c
1307
if (IS_ERR(tz)) {
drivers/thermal/mediatek/lvts_thermal.c
1313
if (PTR_ERR(tz) == -ENODEV)
drivers/thermal/mediatek/lvts_thermal.c
1316
return PTR_ERR(tz);
drivers/thermal/mediatek/lvts_thermal.c
1319
devm_thermal_add_hwmon_sysfs(dev, tz);
drivers/thermal/mediatek/lvts_thermal.c
1329
lvts_sensors[i].tz = tz;
drivers/thermal/mediatek/lvts_thermal.c
166
struct thermal_zone_device *tz;
drivers/thermal/mediatek/lvts_thermal.c
341
static int lvts_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/mediatek/lvts_thermal.c
343
struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz);
drivers/thermal/mediatek/lvts_thermal.c
441
static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/mediatek/lvts_thermal.c
443
struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz);
drivers/thermal/mediatek/lvts_thermal.c
476
thermal_zone_device_type(tz), low);
drivers/thermal/mediatek/lvts_thermal.c
489
thermal_zone_device_type(tz), high);
drivers/thermal/mediatek/lvts_thermal.c
583
thermal_zone_device_update(lvts_ctrl->sensors[i].tz,
drivers/thermal/qcom/qcom-spmi-adc-tm5.c
360
static int adc_tm5_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/qcom/qcom-spmi-adc-tm5.c
362
struct adc_tm5_channel *channel = thermal_zone_device_priv(tz);
drivers/thermal/qcom/qcom-spmi-adc-tm5.c
642
static int adc_tm5_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/qcom/qcom-spmi-adc-tm5.c
644
struct adc_tm5_channel *channel = thermal_zone_device_priv(tz);
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
277
static int qpnp_tm_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
279
struct qpnp_tm_chip *chip = thermal_zone_device_priv(tz);
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
357
static int qpnp_tm_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
360
struct qpnp_tm_chip *chip = thermal_zone_device_priv(tz);
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
407
static int qpnp_tm_gen2_rev2_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
411
struct qpnp_tm_chip *chip = thermal_zone_device_priv(tz);
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
499
static int qpnp_tm_lite_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/qcom/qcom-spmi-temp-alarm.c
503
struct qpnp_tm_chip *chip = thermal_zone_device_priv(tz);
drivers/thermal/qcom/tsens.c
1079
static int tsens_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/qcom/tsens.c
1081
struct tsens_sensor *s = thermal_zone_device_priv(tz);
drivers/thermal/qcom/tsens.c
689
static int tsens_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/qcom/tsens.c
691
struct tsens_sensor *s = thermal_zone_device_priv(tz);
drivers/thermal/qoriq_thermal.c
89
static int tmu_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/qoriq_thermal.c
91
struct qoriq_sensor *qsensor = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rcar_gen3_thermal.c
167
static int rcar_gen3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/renesas/rcar_gen3_thermal.c
169
struct rcar_gen3_thermal_tsc *tsc = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rcar_gen3_thermal.c
224
static int rcar_gen3_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/renesas/rcar_gen3_thermal.c
226
struct rcar_gen3_thermal_tsc *tsc = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rzg2l_thermal.c
76
static int rzg2l_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/renesas/rzg2l_thermal.c
78
struct rzg2l_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rzg3e_thermal.c
206
static int rzg3e_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/renesas/rzg3e_thermal.c
208
struct rzg3e_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rzg3e_thermal.c
250
static int rzg3e_thermal_set_trips(struct thermal_zone_device *tz,
drivers/thermal/renesas/rzg3e_thermal.c
253
struct rzg3e_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rzg3s_thermal.c
133
static int rzg3s_thermal_change_mode(struct thermal_zone_device *tz,
drivers/thermal/renesas/rzg3s_thermal.c
136
struct rzg3s_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/renesas/rzg3s_thermal.c
215
priv->tz = devm_thermal_of_zone_register(dev, 0, priv, &rzg3s_tz_of_ops);
drivers/thermal/renesas/rzg3s_thermal.c
216
if (IS_ERR(priv->tz))
drivers/thermal/renesas/rzg3s_thermal.c
217
return dev_err_probe(dev, PTR_ERR(priv->tz), "Failed to register thermal zone!\n");
drivers/thermal/renesas/rzg3s_thermal.c
219
ret = devm_thermal_add_hwmon_sysfs(dev, priv->tz);
drivers/thermal/renesas/rzg3s_thermal.c
50
struct thermal_zone_device *tz;
drivers/thermal/renesas/rzg3s_thermal.c
58
static int rzg3s_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/renesas/rzg3s_thermal.c
60
struct rzg3s_thermal_priv *priv = thermal_zone_device_priv(tz);
drivers/thermal/rockchip_thermal.c
1429
static int rockchip_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/rockchip_thermal.c
1431
struct rockchip_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/rockchip_thermal.c
1442
static int rockchip_thermal_get_temp(struct thermal_zone_device *tz, int *out_temp)
drivers/thermal/rockchip_thermal.c
1444
struct rockchip_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/samsung/exynos_tmu.c
636
static int exynos_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/samsung/exynos_tmu.c
638
struct exynos_tmu_data *data = thermal_zone_device_priv(tz);
drivers/thermal/samsung/exynos_tmu.c
714
static int exynos_tmu_set_emulation(struct thermal_zone_device *tz, int temp)
drivers/thermal/samsung/exynos_tmu.c
716
struct exynos_tmu_data *data = thermal_zone_device_priv(tz);
drivers/thermal/samsung/exynos_tmu.c
736
static int exynos_tmu_set_emulation(struct thermal_zone_device *tz, int temp)
drivers/thermal/samsung/exynos_tmu.c
977
static int exynos_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/samsung/exynos_tmu.c
979
struct exynos_tmu_data *data = thermal_zone_device_priv(tz);
drivers/thermal/sprd_thermal.c
207
static int sprd_thm_read_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/sprd_thermal.c
209
struct sprd_thermal_sensor *sen = thermal_zone_device_priv(tz);
drivers/thermal/st/stm_thermal.c
302
static int stm_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/st/stm_thermal.c
304
struct stm_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/st/stm_thermal.c
350
static int stm_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/st/stm_thermal.c
352
struct stm_thermal_sensor *sensor = thermal_zone_device_priv(tz);
drivers/thermal/sun8i_thermal.c
117
static int sun8i_ths_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/sun8i_thermal.c
119
struct tsensor *s = thermal_zone_device_priv(tz);
drivers/thermal/tegra/soctherm.c
2207
zone->tz = z;
drivers/thermal/tegra/soctherm.c
2263
struct thermal_zone_device *tz;
drivers/thermal/tegra/soctherm.c
2265
tz = tegra->thermctl_tzs[soc->ttgs[i]->id];
drivers/thermal/tegra/soctherm.c
2266
err = tegra_soctherm_set_hwtrips(dev, soc->ttgs[i], tz);
drivers/thermal/tegra/soctherm.c
305
struct thermal_zone_device *tz;
drivers/thermal/tegra/soctherm.c
431
static int tegra_thermctl_get_temp(struct thermal_zone_device *tz, int *out_temp)
drivers/thermal/tegra/soctherm.c
433
struct tegra_thermctl_zone *zone = thermal_zone_device_priv(tz);
drivers/thermal/tegra/soctherm.c
592
static int tegra_thermctl_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/tegra/soctherm.c
595
struct tegra_thermctl_zone *zone = thermal_zone_device_priv(tz);
drivers/thermal/tegra/soctherm.c
600
if (!tz)
drivers/thermal/tegra/soctherm.c
625
if (thermal_trip_is_bound_to_cdev(tz, trip, cdev))
drivers/thermal/tegra/soctherm.c
661
static int tegra_thermctl_set_trips(struct thermal_zone_device *tz, int lo, int hi)
drivers/thermal/tegra/soctherm.c
663
struct tegra_thermctl_zone *zone = thermal_zone_device_priv(tz);
drivers/thermal/tegra/soctherm.c
704
static const struct thermal_trip *get_hot_trip(struct thermal_zone_device *tz)
drivers/thermal/tegra/soctherm.c
708
thermal_zone_for_each_trip(tz, get_hot_trip_cb, &trip);
drivers/thermal/tegra/soctherm.c
739
struct thermal_zone_device *tz)
drivers/thermal/tegra/soctherm.c
749
if (thermal_zone_get_crit_temp(tz, &temperature))
drivers/thermal/tegra/soctherm.c
761
hot_trip = get_hot_trip(tz);
drivers/thermal/tegra/soctherm.c
775
if (thermal_trip_is_bound_to_cdev(tz, hot_trip, cdev))
drivers/thermal/tegra/soctherm.c
840
struct thermal_zone_device *tz;
drivers/thermal/tegra/soctherm.c
864
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_CPU];
drivers/thermal/tegra/soctherm.c
865
thermal_zone_device_update(tz,
drivers/thermal/tegra/soctherm.c
870
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_GPU];
drivers/thermal/tegra/soctherm.c
871
thermal_zone_device_update(tz,
drivers/thermal/tegra/soctherm.c
876
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_PLLX];
drivers/thermal/tegra/soctherm.c
877
thermal_zone_device_update(tz,
drivers/thermal/tegra/soctherm.c
882
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_MEM];
drivers/thermal/tegra/soctherm.c
883
thermal_zone_device_update(tz,
drivers/thermal/tegra/tegra-bpmp-thermal.c
65
static int tegra_bpmp_thermal_get_temp(struct thermal_zone_device *tz, int *out_temp)
drivers/thermal/tegra/tegra-bpmp-thermal.c
67
struct tegra_bpmp_thermal_zone *zone = thermal_zone_device_priv(tz);
drivers/thermal/tegra/tegra-bpmp-thermal.c
72
static int tegra_bpmp_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/tegra/tegra-bpmp-thermal.c
74
struct tegra_bpmp_thermal_zone *zone = thermal_zone_device_priv(tz);
drivers/thermal/tegra/tegra30-tsensor.c
161
static int tegra_tsensor_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/tegra/tegra30-tsensor.c
163
const struct tegra_tsensor_channel *tsc = thermal_zone_device_priv(tz);
drivers/thermal/tegra/tegra30-tsensor.c
219
static int tegra_tsensor_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/tegra/tegra30-tsensor.c
221
const struct tegra_tsensor_channel *tsc = thermal_zone_device_priv(tz);
drivers/thermal/testing/zone.c
116
if (!tt_zone->tz)
drivers/thermal/testing/zone.c
129
if (!tt_zone->tz)
drivers/thermal/testing/zone.c
133
thermal_zone_device_update(tt_zone->tz, THERMAL_EVENT_TEMP_SAMPLE);
drivers/thermal/testing/zone.c
230
if (tt_zone->tz) {
drivers/thermal/testing/zone.c
231
thermal_zone_device_unregister(tt_zone->tz);
drivers/thermal/testing/zone.c
232
tt_zone->tz = NULL;
drivers/thermal/testing/zone.c
366
static int tt_zone_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/testing/zone.c
368
struct tt_thermal_zone *tt_zone = thermal_zone_device_priv(tz);
drivers/thermal/testing/zone.c
384
struct thermal_zone_device *tz;
drivers/thermal/testing/zone.c
390
if (tt_zone->tz)
drivers/thermal/testing/zone.c
404
tz = thermal_zone_device_register_with_trips("test_tz", trips, i, tt_zone,
drivers/thermal/testing/zone.c
406
if (IS_ERR(tz))
drivers/thermal/testing/zone.c
407
return PTR_ERR(tz);
drivers/thermal/testing/zone.c
409
tt_zone->tz = tz;
drivers/thermal/testing/zone.c
411
thermal_zone_device_enable(tz);
drivers/thermal/testing/zone.c
44
struct thermal_zone_device *tz;
drivers/thermal/thermal-generic-adc.c
58
static int gadc_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/thermal-generic-adc.c
60
struct gadc_thermal_info *gti = thermal_zone_device_priv(tz);
drivers/thermal/thermal_core.c
1007
if (!tz->ops.should_bind(tz, &td->trip, cdev, &c))
drivers/thermal/thermal_core.c
1010
ret = thermal_bind_cdev_to_trip(tz, td, cdev, &c);
drivers/thermal/thermal_core.c
1012
print_bind_err_msg(tz, td, cdev, ret);
drivers/thermal/thermal_core.c
102
if (tz->governor && tz->governor->unbind_from_tz)
drivers/thermal/thermal_core.c
1022
static void thermal_zone_cdev_bind(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
1025
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1027
if (__thermal_zone_cdev_bind(tz, cdev))
drivers/thermal/thermal_core.c
1028
__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/thermal_core.c
103
tz->governor->unbind_from_tz(tz);
drivers/thermal/thermal_core.c
1033
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1039
list_for_each_entry(tz, &thermal_tz_list, node)
drivers/thermal/thermal_core.c
1040
thermal_zone_cdev_bind(tz, cdev);
drivers/thermal/thermal_core.c
106
ret = new_gov->bind_to_tz(tz);
drivers/thermal/thermal_core.c
108
bind_previous_governor(tz, new_gov->name);
drivers/thermal/thermal_core.c
114
tz->governor = new_gov;
drivers/thermal/thermal_core.c
1319
static void __thermal_zone_cdev_unbind(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
1324
for_each_trip_desc(tz, td)
drivers/thermal/thermal_core.c
1325
thermal_unbind_cdev_from_trip(tz, td, cdev);
drivers/thermal/thermal_core.c
1328
static void thermal_zone_cdev_unbind(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
1331
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1333
__thermal_zone_cdev_unbind(tz, cdev);
drivers/thermal/thermal_core.c
1338
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1347
list_for_each_entry(tz, &thermal_tz_list, node)
drivers/thermal/thermal_core.c
1348
thermal_zone_cdev_unbind(tz, cdev);
drivers/thermal/thermal_core.c
1369
int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/thermal_core.c
1374
if (tz->ops.get_crit_temp)
drivers/thermal/thermal_core.c
1375
return tz->ops.get_crit_temp(tz, temp);
drivers/thermal/thermal_core.c
1377
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1379
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_core.c
1395
struct thermal_zone_device *tz = container_of(work, struct
drivers/thermal/thermal_core.c
1398
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/thermal_core.c
1401
static void thermal_zone_device_init(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1405
INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_check);
drivers/thermal/thermal_core.c
1407
tz->temperature = THERMAL_TEMP_INIT;
drivers/thermal/thermal_core.c
1408
tz->passive = 0;
drivers/thermal/thermal_core.c
1409
tz->prev_low_trip = -INT_MAX;
drivers/thermal/thermal_core.c
1410
tz->prev_high_trip = INT_MAX;
drivers/thermal/thermal_core.c
1411
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_core.c
1421
list_for_each_entry_safe(td, next, &tz->trips_invalid, list_node) {
drivers/thermal/thermal_core.c
1423
move_to_trips_high(tz, td);
drivers/thermal/thermal_core.c
1426
list_for_each_entry_safe(td, next, &tz->trips_reached, list_node) {
drivers/thermal/thermal_core.c
1428
move_to_trips_invalid(tz, td);
drivers/thermal/thermal_core.c
1430
move_to_trips_high(tz, td);
drivers/thermal/thermal_core.c
1434
static int thermal_zone_init_governor(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1440
if (tz->tzp)
drivers/thermal/thermal_core.c
1441
governor = __find_governor(tz->tzp->governor_name);
drivers/thermal/thermal_core.c
1445
return thermal_set_governor(tz, governor);
drivers/thermal/thermal_core.c
1448
static void thermal_zone_init_complete(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1454
list_add_tail(&tz->node, &thermal_tz_list);
drivers/thermal/thermal_core.c
1456
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1460
__thermal_zone_cdev_bind(tz, cdev);
drivers/thermal/thermal_core.c
1462
tz->state &= ~TZ_STATE_FLAG_INIT;
drivers/thermal/thermal_core.c
1469
tz->state |= TZ_STATE_FLAG_SUSPENDED;
drivers/thermal/thermal_core.c
1471
__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/thermal_core.c
1508
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1547
tz = kzalloc_flex(*tz, trips, num_trips);
drivers/thermal/thermal_core.c
1548
if (!tz)
drivers/thermal/thermal_core.c
1552
tz->tzp = kmemdup(tzp, sizeof(*tzp), GFP_KERNEL);
drivers/thermal/thermal_core.c
1553
if (!tz->tzp) {
drivers/thermal/thermal_core.c
1559
INIT_LIST_HEAD(&tz->node);
drivers/thermal/thermal_core.c
1560
INIT_LIST_HEAD(&tz->trips_high);
drivers/thermal/thermal_core.c
1561
INIT_LIST_HEAD(&tz->trips_reached);
drivers/thermal/thermal_core.c
1562
INIT_LIST_HEAD(&tz->trips_invalid);
drivers/thermal/thermal_core.c
1563
ida_init(&tz->ida);
drivers/thermal/thermal_core.c
1564
mutex_init(&tz->lock);
drivers/thermal/thermal_core.c
1565
init_completion(&tz->removal);
drivers/thermal/thermal_core.c
1566
init_completion(&tz->resume);
drivers/thermal/thermal_core.c
1573
tz->id = id;
drivers/thermal/thermal_core.c
1574
strscpy(tz->type, type, sizeof(tz->type));
drivers/thermal/thermal_core.c
1576
tz->ops = *ops;
drivers/thermal/thermal_core.c
1577
if (!tz->ops.critical)
drivers/thermal/thermal_core.c
1578
tz->ops.critical = thermal_zone_device_critical;
drivers/thermal/thermal_core.c
1580
tz->device.class = thermal_class;
drivers/thermal/thermal_core.c
1581
tz->devdata = devdata;
drivers/thermal/thermal_core.c
1582
tz->num_trips = num_trips;
drivers/thermal/thermal_core.c
1583
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_core.c
1592
move_to_trips_invalid(tz, td);
drivers/thermal/thermal_core.c
1595
tz->polling_delay_jiffies = msecs_to_jiffies(polling_delay);
drivers/thermal/thermal_core.c
1596
tz->passive_delay_jiffies = msecs_to_jiffies(passive_delay);
drivers/thermal/thermal_core.c
1597
tz->recheck_delay_jiffies = THERMAL_RECHECK_DELAY;
drivers/thermal/thermal_core.c
1599
tz->state = TZ_STATE_FLAG_INIT;
drivers/thermal/thermal_core.c
1601
result = dev_set_name(&tz->device, "thermal_zone%d", tz->id);
drivers/thermal/thermal_core.c
1605
thermal_zone_device_init(tz);
drivers/thermal/thermal_core.c
1607
result = thermal_zone_init_governor(tz);
drivers/thermal/thermal_core.c
1613
result = thermal_zone_create_device_groups(tz);
drivers/thermal/thermal_core.c
1617
result = device_register(&tz->device);
drivers/thermal/thermal_core.c
1621
if (!tz->tzp || !tz->tzp->no_hwmon) {
drivers/thermal/thermal_core.c
1622
result = thermal_add_hwmon_sysfs(tz);
drivers/thermal/thermal_core.c
1627
result = thermal_thresholds_init(tz);
drivers/thermal/thermal_core.c
1631
thermal_zone_init_complete(tz);
drivers/thermal/thermal_core.c
1633
thermal_notify_tz_create(tz);
drivers/thermal/thermal_core.c
1635
thermal_debug_tz_add(tz);
drivers/thermal/thermal_core.c
1637
return tz;
drivers/thermal/thermal_core.c
1640
thermal_remove_hwmon_sysfs(tz);
drivers/thermal/thermal_core.c
1642
device_del(&tz->device);
drivers/thermal/thermal_core.c
1644
put_device(&tz->device);
drivers/thermal/thermal_core.c
1645
wait_for_completion(&tz->removal);
drivers/thermal/thermal_core.c
1649
kfree(tz->tzp);
drivers/thermal/thermal_core.c
1651
kfree(tz);
drivers/thermal/thermal_core.c
1691
static bool thermal_zone_exit(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1697
if (list_empty(&tz->node))
drivers/thermal/thermal_core.c
1700
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1702
tz->state |= TZ_STATE_FLAG_EXIT;
drivers/thermal/thermal_core.c
1703
list_del_init(&tz->node);
drivers/thermal/thermal_core.c
1707
__thermal_zone_cdev_unbind(tz, cdev);
drivers/thermal/thermal_core.c
1716
void thermal_zone_device_unregister(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1718
if (!tz)
drivers/thermal/thermal_core.c
1721
thermal_debug_tz_remove(tz);
drivers/thermal/thermal_core.c
1723
if (!thermal_zone_exit(tz))
drivers/thermal/thermal_core.c
1726
cancel_delayed_work_sync(&tz->poll_queue);
drivers/thermal/thermal_core.c
1728
thermal_set_governor(tz, NULL);
drivers/thermal/thermal_core.c
1730
thermal_thresholds_exit(tz);
drivers/thermal/thermal_core.c
1731
thermal_remove_hwmon_sysfs(tz);
drivers/thermal/thermal_core.c
1732
ida_free(&thermal_tz_ida, tz->id);
drivers/thermal/thermal_core.c
1733
ida_destroy(&tz->ida);
drivers/thermal/thermal_core.c
1735
device_del(&tz->device);
drivers/thermal/thermal_core.c
1736
put_device(&tz->device);
drivers/thermal/thermal_core.c
1738
thermal_notify_tz_delete(tz);
drivers/thermal/thermal_core.c
1740
wait_for_completion(&tz->removal);
drivers/thermal/thermal_core.c
1741
kfree(tz->tzp);
drivers/thermal/thermal_core.c
1742
kfree(tz);
drivers/thermal/thermal_core.c
1785
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1787
tz = container_of(work, struct thermal_zone_device, poll_queue.work);
drivers/thermal/thermal_core.c
1789
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1792
if (tz->state & TZ_STATE_FLAG_EXIT)
drivers/thermal/thermal_core.c
1795
tz->state &= ~(TZ_STATE_FLAG_SUSPENDED | TZ_STATE_FLAG_RESUMING);
drivers/thermal/thermal_core.c
1797
thermal_debug_tz_resume(tz);
drivers/thermal/thermal_core.c
1798
thermal_zone_device_init(tz);
drivers/thermal/thermal_core.c
1799
thermal_governor_update_tz(tz, THERMAL_TZ_RESUME);
drivers/thermal/thermal_core.c
1800
__thermal_zone_device_update(tz, THERMAL_TZ_RESUME);
drivers/thermal/thermal_core.c
1802
complete(&tz->resume);
drivers/thermal/thermal_core.c
1805
static void thermal_zone_pm_prepare(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1807
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1809
if (tz->state & TZ_STATE_FLAG_RESUMING) {
drivers/thermal/thermal_core.c
1815
scoped_guard(thermal_zone_reverse, tz) {
drivers/thermal/thermal_core.c
1816
wait_for_completion(&tz->resume);
drivers/thermal/thermal_core.c
1820
tz->state |= TZ_STATE_FLAG_SUSPENDED;
drivers/thermal/thermal_core.c
1823
cancel_delayed_work(&tz->poll_queue);
drivers/thermal/thermal_core.c
1828
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1834
list_for_each_entry(tz, &thermal_tz_list, node)
drivers/thermal/thermal_core.c
1835
thermal_zone_pm_prepare(tz);
drivers/thermal/thermal_core.c
1838
static void thermal_zone_pm_complete(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
1840
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
1842
reinit_completion(&tz->resume);
drivers/thermal/thermal_core.c
1843
tz->state |= TZ_STATE_FLAG_RESUMING;
drivers/thermal/thermal_core.c
1849
INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_resume);
drivers/thermal/thermal_core.c
1851
mod_delayed_work(thermal_wq, &tz->poll_queue, 0);
drivers/thermal/thermal_core.c
1856
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
1862
list_for_each_entry(tz, &thermal_tz_list, node)
drivers/thermal/thermal_core.c
1863
thermal_zone_pm_complete(tz);
drivers/thermal/thermal_core.c
193
int thermal_zone_device_set_policy(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
200
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
204
ret = thermal_set_governor(tz, gov);
drivers/thermal/thermal_core.c
206
thermal_notify_tz_gov_change(tz, policy);
drivers/thermal/thermal_core.c
264
static int __thermal_zone_device_set_mode(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
267
if (tz->ops.change_mode) {
drivers/thermal/thermal_core.c
270
ret = tz->ops.change_mode(tz, mode);
drivers/thermal/thermal_core.c
275
tz->mode = mode;
drivers/thermal/thermal_core.c
280
static void thermal_zone_broken_disable(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
284
dev_err(&tz->device, "Unable to get temperature, disabling!\n");
drivers/thermal/thermal_core.c
289
__thermal_zone_device_set_mode(tz, THERMAL_DEVICE_DISABLED);
drivers/thermal/thermal_core.c
290
thermal_notify_tz_disable(tz);
drivers/thermal/thermal_core.c
292
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_core.c
295
dev_crit(&tz->device,
drivers/thermal/thermal_core.c
312
static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
318
mod_delayed_work(thermal_wq, &tz->poll_queue, delay);
drivers/thermal/thermal_core.c
321
static void thermal_zone_recheck(struct thermal_zone_device *tz, int error)
drivers/thermal/thermal_core.c
324
thermal_zone_device_set_polling(tz, THERMAL_RECHECK_DELAY);
drivers/thermal/thermal_core.c
333
if (tz->recheck_delay_jiffies == THERMAL_RECHECK_DELAY)
drivers/thermal/thermal_core.c
334
dev_info(&tz->device, "Temperature check failed (%d)\n", error);
drivers/thermal/thermal_core.c
336
thermal_zone_device_set_polling(tz, tz->recheck_delay_jiffies);
drivers/thermal/thermal_core.c
338
tz->recheck_delay_jiffies += max(tz->recheck_delay_jiffies >> 1, 1ULL);
drivers/thermal/thermal_core.c
339
if (tz->recheck_delay_jiffies > THERMAL_MAX_RECHECK_DELAY) {
drivers/thermal/thermal_core.c
340
thermal_zone_broken_disable(tz);
drivers/thermal/thermal_core.c
345
tz->recheck_delay_jiffies = THERMAL_RECHECK_DELAY;
drivers/thermal/thermal_core.c
349
static void monitor_thermal_zone(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
351
if (tz->passive > 0 && tz->passive_delay_jiffies)
drivers/thermal/thermal_core.c
352
thermal_zone_device_set_polling(tz, tz->passive_delay_jiffies);
drivers/thermal/thermal_core.c
353
else if (tz->polling_delay_jiffies)
drivers/thermal/thermal_core.c
354
thermal_zone_device_set_polling(tz, tz->polling_delay_jiffies);
drivers/thermal/thermal_core.c
357
static struct thermal_governor *thermal_get_tz_governor(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
359
if (tz->governor)
drivers/thermal/thermal_core.c
360
return tz->governor;
drivers/thermal/thermal_core.c
365
void thermal_governor_update_tz(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
368
if (!tz->governor || !tz->governor->update_tz)
drivers/thermal/thermal_core.c
371
tz->governor->update_tz(tz, reason);
drivers/thermal/thermal_core.c
374
static void thermal_zone_device_halt(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
384
dev_emerg(&tz->device, "%s: critical temperature reached\n", tz->type);
drivers/thermal/thermal_core.c
389
void thermal_zone_device_critical(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
391
thermal_zone_device_halt(tz, HWPROT_ACT_DEFAULT);
drivers/thermal/thermal_core.c
395
void thermal_zone_device_critical_shutdown(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
397
thermal_zone_device_halt(tz, HWPROT_ACT_SHUTDOWN);
drivers/thermal/thermal_core.c
400
void thermal_zone_device_critical_reboot(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
402
thermal_zone_device_halt(tz, HWPROT_ACT_REBOOT);
drivers/thermal/thermal_core.c
405
static void handle_critical_trips(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
408
trace_thermal_zone_trip(tz, thermal_zone_trip_id(tz, trip), trip->type);
drivers/thermal/thermal_core.c
411
tz->ops.critical(tz);
drivers/thermal/thermal_core.c
412
else if (tz->ops.hot)
drivers/thermal/thermal_core.c
413
tz->ops.hot(tz);
drivers/thermal/thermal_core.c
437
static void move_to_trips_high(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
441
move_trip_to_sorted_list(td, &tz->trips_high);
drivers/thermal/thermal_core.c
444
static void move_to_trips_reached(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
448
move_trip_to_sorted_list(td, &tz->trips_reached);
drivers/thermal/thermal_core.c
451
static void move_to_trips_invalid(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
455
list_move(&td->list_node, &tz->trips_invalid);
drivers/thermal/thermal_core.c
459
struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
467
governor->trip_crossed(tz, trip, upward);
drivers/thermal/thermal_core.c
470
static void thermal_trip_crossed(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
479
tz->passive++;
drivers/thermal/thermal_core.c
482
handle_critical_trips(tz, trip);
drivers/thermal/thermal_core.c
484
thermal_notify_tz_trip_up(tz, trip);
drivers/thermal/thermal_core.c
485
thermal_debug_tz_trip_up(tz, trip);
drivers/thermal/thermal_core.c
488
tz->passive--;
drivers/thermal/thermal_core.c
489
WARN_ON(tz->passive < 0);
drivers/thermal/thermal_core.c
491
thermal_notify_tz_trip_down(tz, trip);
drivers/thermal/thermal_core.c
492
thermal_debug_tz_trip_down(tz, trip);
drivers/thermal/thermal_core.c
494
thermal_governor_trip_crossed(governor, tz, trip, upward);
drivers/thermal/thermal_core.c
497
void thermal_zone_set_trip_hyst(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
503
thermal_notify_tz_trip_change(tz, trip);
drivers/thermal/thermal_core.c
510
if (tz->temperature >= td->threshold)
drivers/thermal/thermal_core.c
511
move_to_trips_reached(tz, td);
drivers/thermal/thermal_core.c
514
void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
524
thermal_notify_tz_trip_change(tz, trip);
drivers/thermal/thermal_core.c
534
move_to_trips_high(tz, td);
drivers/thermal/thermal_core.c
544
if (tz->temperature >= td->threshold)
drivers/thermal/thermal_core.c
545
thermal_trip_crossed(tz, td, thermal_get_tz_governor(tz), false);
drivers/thermal/thermal_core.c
547
move_to_trips_invalid(tz, td);
drivers/thermal/thermal_core.c
556
if (tz->temperature >= td->threshold)
drivers/thermal/thermal_core.c
557
move_to_trips_reached(tz, td);
drivers/thermal/thermal_core.c
559
move_to_trips_high(tz, td);
drivers/thermal/thermal_core.c
563
static void thermal_zone_handle_trips(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
571
list_for_each_entry_safe_reverse(td, next, &tz->trips_reached, list_node) {
drivers/thermal/thermal_core.c
572
if (td->threshold <= tz->temperature)
drivers/thermal/thermal_core.c
575
thermal_trip_crossed(tz, td, governor, false);
drivers/thermal/thermal_core.c
583
list_for_each_entry_safe(td, next, &tz->trips_high, list_node) {
drivers/thermal/thermal_core.c
584
if (td->threshold > tz->temperature)
drivers/thermal/thermal_core.c
587
thermal_trip_crossed(tz, td, governor, true);
drivers/thermal/thermal_core.c
588
move_to_trips_reached(tz, td);
drivers/thermal/thermal_core.c
592
move_to_trips_high(tz, td);
drivers/thermal/thermal_core.c
594
if (!list_empty(&tz->trips_reached)) {
drivers/thermal/thermal_core.c
595
td = list_last_entry(&tz->trips_reached,
drivers/thermal/thermal_core.c
604
if (!list_empty(&tz->trips_high)) {
drivers/thermal/thermal_core.c
605
td = list_first_entry(&tz->trips_high,
drivers/thermal/thermal_core.c
611
void __thermal_zone_device_update(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
614
struct thermal_governor *governor = thermal_get_tz_governor(tz);
drivers/thermal/thermal_core.c
618
if (tz->state != TZ_STATE_READY || tz->mode != THERMAL_DEVICE_ENABLED)
drivers/thermal/thermal_core.c
621
ret = __thermal_zone_get_temp(tz, &temp);
drivers/thermal/thermal_core.c
623
thermal_zone_recheck(tz, ret);
drivers/thermal/thermal_core.c
635
tz->recheck_delay_jiffies = THERMAL_RECHECK_DELAY;
drivers/thermal/thermal_core.c
637
tz->last_temperature = tz->temperature;
drivers/thermal/thermal_core.c
638
tz->temperature = temp;
drivers/thermal/thermal_core.c
640
trace_thermal_temperature(tz);
drivers/thermal/thermal_core.c
642
thermal_genl_sampling_temp(tz->id, temp);
drivers/thermal/thermal_core.c
644
tz->notify_event = event;
drivers/thermal/thermal_core.c
646
thermal_zone_handle_trips(tz, governor, &low, &high);
drivers/thermal/thermal_core.c
648
thermal_thresholds_handle(tz, &low, &high);
drivers/thermal/thermal_core.c
650
thermal_zone_set_trips(tz, low, high);
drivers/thermal/thermal_core.c
653
governor->manage(tz);
drivers/thermal/thermal_core.c
655
thermal_debug_update_trip_stats(tz);
drivers/thermal/thermal_core.c
658
monitor_thermal_zone(tz);
drivers/thermal/thermal_core.c
661
static int thermal_zone_device_set_mode(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
666
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
669
if (mode == tz->mode)
drivers/thermal/thermal_core.c
672
ret = __thermal_zone_device_set_mode(tz, mode);
drivers/thermal/thermal_core.c
676
__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/thermal_core.c
679
thermal_notify_tz_enable(tz);
drivers/thermal/thermal_core.c
681
thermal_notify_tz_disable(tz);
drivers/thermal/thermal_core.c
686
int thermal_zone_device_enable(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
688
return thermal_zone_device_set_mode(tz, THERMAL_DEVICE_ENABLED);
drivers/thermal/thermal_core.c
692
int thermal_zone_device_disable(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
694
return thermal_zone_device_set_mode(tz, THERMAL_DEVICE_DISABLED);
drivers/thermal/thermal_core.c
698
static bool thermal_zone_is_present(struct thermal_zone_device *tz)
drivers/thermal/thermal_core.c
700
return !list_empty(&tz->node);
drivers/thermal/thermal_core.c
703
void thermal_zone_device_update(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
706
guard(thermal_zone)(tz);
drivers/thermal/thermal_core.c
708
if (thermal_zone_is_present(tz))
drivers/thermal/thermal_core.c
709
__thermal_zone_device_update(tz, event);
drivers/thermal/thermal_core.c
75
static void bind_previous_governor(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
752
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
756
list_for_each_entry(tz, &thermal_tz_list, node) {
drivers/thermal/thermal_core.c
759
ret = cb(tz, data);
drivers/thermal/thermal_core.c
769
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
773
list_for_each_entry(tz, &thermal_tz_list, node) {
drivers/thermal/thermal_core.c
774
if (tz->id == id) {
drivers/thermal/thermal_core.c
775
get_device(&tz->device);
drivers/thermal/thermal_core.c
776
return tz;
drivers/thermal/thermal_core.c
78
if (tz->governor && tz->governor->bind_to_tz) {
drivers/thermal/thermal_core.c
79
if (tz->governor->bind_to_tz(tz)) {
drivers/thermal/thermal_core.c
80
dev_err(&tz->device,
drivers/thermal/thermal_core.c
82
failed_gov_name, tz->governor->name, tz->type);
drivers/thermal/thermal_core.c
826
static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
83
tz->governor = NULL;
drivers/thermal/thermal_core.c
861
result = ida_alloc(&tz->ida, GFP_KERNEL);
drivers/thermal/thermal_core.c
868
sysfs_create_link(&tz->device.kobj, &cdev->device.kobj, dev->name);
drivers/thermal/thermal_core.c
878
result = device_create_file(&tz->device, &dev->attr);
drivers/thermal/thermal_core.c
889
result = device_create_file(&tz->device, &dev->weight_attr);
drivers/thermal/thermal_core.c
897
thermal_governor_update_tz(tz, THERMAL_TZ_BIND_CDEV);
drivers/thermal/thermal_core.c
902
device_remove_file(&tz->device, &dev->weight_attr);
drivers/thermal/thermal_core.c
904
device_remove_file(&tz->device, &dev->attr);
drivers/thermal/thermal_core.c
906
sysfs_remove_link(&tz->device.kobj, dev->name);
drivers/thermal/thermal_core.c
908
ida_free(&tz->ida, dev->id);
drivers/thermal/thermal_core.c
933
static void thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
949
thermal_governor_update_tz(tz, THERMAL_TZ_UNBIND_CDEV);
drivers/thermal/thermal_core.c
951
device_remove_file(&tz->device, &pos->weight_attr);
drivers/thermal/thermal_core.c
952
device_remove_file(&tz->device, &pos->attr);
drivers/thermal/thermal_core.c
953
sysfs_remove_link(&tz->device.kobj, pos->name);
drivers/thermal/thermal_core.c
954
ida_free(&tz->ida, pos->id);
drivers/thermal/thermal_core.c
960
struct thermal_zone_device *tz;
drivers/thermal/thermal_core.c
965
tz = to_thermal_zone(dev);
drivers/thermal/thermal_core.c
966
thermal_zone_destroy_device_groups(tz);
drivers/thermal/thermal_core.c
967
mutex_destroy(&tz->lock);
drivers/thermal/thermal_core.c
968
complete(&tz->removal);
drivers/thermal/thermal_core.c
97
static int thermal_set_governor(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
982
void print_bind_err_msg(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
986
dev_err(&tz->device, "binding cdev %s to trip %d failed: %d\n",
drivers/thermal/thermal_core.c
987
cdev->type, thermal_zone_trip_id(tz, &td->trip), ret);
drivers/thermal/thermal_core.c
990
static bool __thermal_zone_cdev_bind(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.c
996
if (!tz->ops.should_bind)
drivers/thermal/thermal_core.c
999
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_core.h
229
int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip);
drivers/thermal/thermal_core.h
265
void __thermal_zone_device_update(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.h
267
void thermal_zone_device_critical_reboot(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
268
void thermal_zone_device_critical_shutdown(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
269
void thermal_governor_update_tz(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.h
281
void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high);
drivers/thermal/thermal_core.h
282
int thermal_zone_trip_id(const struct thermal_zone_device *tz,
drivers/thermal/thermal_core.h
284
int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
drivers/thermal/thermal_core.h
285
void thermal_zone_set_trip_hyst(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.h
289
int thermal_zone_create_device_groups(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
55
int (*bind_to_tz)(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
56
void (*unbind_from_tz)(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
57
void (*trip_crossed)(struct thermal_zone_device *tz,
drivers/thermal/thermal_core.h
60
void (*manage)(struct thermal_zone_device *tz);
drivers/thermal/thermal_core.h
61
void (*update_tz)(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.c
152
struct thermal_zone_device *tz;
drivers/thermal/thermal_debugfs.c
556
static struct tz_episode *thermal_debugfs_tz_event_alloc(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.c
562
tze = kzalloc_flex(*tze, trip_stats, tz->num_trips);
drivers/thermal/thermal_debugfs.c
571
for (i = 0; i < tz->num_trips; i++) {
drivers/thermal/thermal_debugfs.c
579
void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.c
582
struct thermal_debugfs *thermal_dbg = tz->debugfs;
drivers/thermal/thermal_debugfs.c
583
int trip_id = thermal_zone_trip_id(tz, trip);
drivers/thermal/thermal_debugfs.c
630
tze = thermal_debugfs_tz_event_alloc(tz, now);
drivers/thermal/thermal_debugfs.c
672
void thermal_debug_tz_trip_down(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.c
675
struct thermal_debugfs *thermal_dbg = tz->debugfs;
drivers/thermal/thermal_debugfs.c
676
int trip_id = thermal_zone_trip_id(tz, trip);
drivers/thermal/thermal_debugfs.c
727
void thermal_debug_update_trip_stats(struct thermal_zone_device *tz)
drivers/thermal/thermal_debugfs.c
729
struct thermal_debugfs *thermal_dbg = tz->debugfs;
drivers/thermal/thermal_debugfs.c
746
if (tz->temperature > tze->max_temp)
drivers/thermal/thermal_debugfs.c
747
tze->max_temp = tz->temperature;
drivers/thermal/thermal_debugfs.c
753
trip_stats->min = min(trip_stats->min, tz->temperature);
drivers/thermal/thermal_debugfs.c
754
trip_stats->avg += (tz->temperature - trip_stats->avg) /
drivers/thermal/thermal_debugfs.c
789
struct thermal_zone_device *tz = thermal_dbg->tz_dbg.tz;
drivers/thermal/thermal_debugfs.c
812
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_debugfs.c
824
trip_id = thermal_zone_trip_id(tz, trip);
drivers/thermal/thermal_debugfs.c
866
void thermal_debug_tz_add(struct thermal_zone_device *tz)
drivers/thermal/thermal_debugfs.c
871
thermal_dbg = thermal_debugfs_add_id(d_tz, tz->id);
drivers/thermal/thermal_debugfs.c
877
tz_dbg->tz = tz;
drivers/thermal/thermal_debugfs.c
879
tz_dbg->trips_crossed = kzalloc_objs(int, tz->num_trips);
drivers/thermal/thermal_debugfs.c
890
tz->debugfs = thermal_dbg;
drivers/thermal/thermal_debugfs.c
893
static struct thermal_debugfs *thermal_debug_tz_clear(struct thermal_zone_device *tz)
drivers/thermal/thermal_debugfs.c
897
guard(thermal_zone)(tz);
drivers/thermal/thermal_debugfs.c
899
thermal_dbg = tz->debugfs;
drivers/thermal/thermal_debugfs.c
901
tz->debugfs = NULL;
drivers/thermal/thermal_debugfs.c
906
void thermal_debug_tz_remove(struct thermal_zone_device *tz)
drivers/thermal/thermal_debugfs.c
913
thermal_dbg = thermal_debug_tz_clear(tz);
drivers/thermal/thermal_debugfs.c
934
void thermal_debug_tz_resume(struct thermal_zone_device *tz)
drivers/thermal/thermal_debugfs.c
936
struct thermal_debugfs *thermal_dbg = tz->debugfs;
drivers/thermal/thermal_debugfs.h
10
void thermal_debug_tz_resume(struct thermal_zone_device *tz);
drivers/thermal/thermal_debugfs.h
11
void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.h
13
void thermal_debug_tz_trip_down(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.h
15
void thermal_debug_update_trip_stats(struct thermal_zone_device *tz);
drivers/thermal/thermal_debugfs.h
22
static inline void thermal_debug_tz_add(struct thermal_zone_device *tz) {}
drivers/thermal/thermal_debugfs.h
23
static inline void thermal_debug_tz_remove(struct thermal_zone_device *tz) {}
drivers/thermal/thermal_debugfs.h
24
static inline void thermal_debug_tz_resume(struct thermal_zone_device *tz) {}
drivers/thermal/thermal_debugfs.h
25
static inline void thermal_debug_tz_trip_up(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.h
27
static inline void thermal_debug_tz_trip_down(struct thermal_zone_device *tz,
drivers/thermal/thermal_debugfs.h
29
static inline void thermal_debug_update_trip_stats(struct thermal_zone_device *tz) {}
drivers/thermal/thermal_debugfs.h
8
void thermal_debug_tz_add(struct thermal_zone_device *tz);
drivers/thermal/thermal_debugfs.h
9
void thermal_debug_tz_remove(struct thermal_zone_device *tz);
drivers/thermal/thermal_helpers.c
108
*temp = tz->emul_temperature;
drivers/thermal/thermal_helpers.c
112
dev_dbg(&tz->device, "Failed to get temperature: %d\n", ret);
drivers/thermal/thermal_helpers.c
127
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/thermal_helpers.c
131
if (IS_ERR_OR_NULL(tz))
drivers/thermal/thermal_helpers.c
134
guard(thermal_zone)(tz);
drivers/thermal/thermal_helpers.c
136
if (!tz->ops.get_temp)
drivers/thermal/thermal_helpers.c
139
ret = __thermal_zone_get_temp(tz, temp);
drivers/thermal/thermal_helpers.c
219
int thermal_zone_get_slope(struct thermal_zone_device *tz)
drivers/thermal/thermal_helpers.c
221
if (tz && tz->tzp)
drivers/thermal/thermal_helpers.c
222
return tz->tzp->slope;
drivers/thermal/thermal_helpers.c
234
int thermal_zone_get_offset(struct thermal_zone_device *tz)
drivers/thermal/thermal_helpers.c
236
if (tz && tz->tzp)
drivers/thermal/thermal_helpers.c
237
return tz->tzp->offset;
drivers/thermal/thermal_helpers.c
25
int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip)
drivers/thermal/thermal_helpers.c
29
if (tz->emul_temperature || !tz->ops.get_trend ||
drivers/thermal/thermal_helpers.c
30
tz->ops.get_trend(tz, trip, &trend)) {
drivers/thermal/thermal_helpers.c
31
if (tz->temperature > tz->last_temperature)
drivers/thermal/thermal_helpers.c
33
else if (tz->temperature < tz->last_temperature)
drivers/thermal/thermal_helpers.c
42
static bool thermal_instance_present(struct thermal_zone_device *tz,
drivers/thermal/thermal_helpers.c
57
bool thermal_trip_is_bound_to_cdev(struct thermal_zone_device *tz,
drivers/thermal/thermal_helpers.c
61
guard(thermal_zone)(tz);
drivers/thermal/thermal_helpers.c
64
return thermal_instance_present(tz, cdev, trip);
drivers/thermal/thermal_helpers.c
82
int __thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/thermal_helpers.c
88
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_helpers.c
90
ret = tz->ops.get_temp(tz, temp);
drivers/thermal/thermal_helpers.c
92
if (IS_ENABLED(CONFIG_THERMAL_EMULATION) && tz->emul_temperature) {
drivers/thermal/thermal_helpers.c
93
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_hwmon.c
114
const struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
120
if (temp->tz == tz) {
drivers/thermal/thermal_hwmon.c
129
static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
132
return tz->ops.get_crit_temp && !tz->ops.get_crit_temp(tz, &temp);
drivers/thermal/thermal_hwmon.c
135
int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
142
hwmon = thermal_hwmon_lookup_by_type(tz);
drivers/thermal/thermal_hwmon.c
153
strscpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
drivers/thermal/thermal_hwmon.c
155
hwmon->device = hwmon_device_register_for_thermal(&tz->device,
drivers/thermal/thermal_hwmon.c
169
temp->tz = tz;
drivers/thermal/thermal_hwmon.c
182
if (thermal_zone_crit_temp_valid(tz)) {
drivers/thermal/thermal_hwmon.c
218
void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
223
hwmon = thermal_hwmon_lookup_by_type(tz);
drivers/thermal/thermal_hwmon.c
226
dev_dbg(&tz->device, "hwmon device lookup failed!\n");
drivers/thermal/thermal_hwmon.c
230
temp = thermal_hwmon_lookup_temp(hwmon, tz);
drivers/thermal/thermal_hwmon.c
233
dev_dbg(&tz->device, "temperature input lookup failed!\n");
drivers/thermal/thermal_hwmon.c
238
if (thermal_zone_crit_temp_valid(tz))
drivers/thermal/thermal_hwmon.c
261
int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
273
ret = thermal_add_hwmon_sysfs(tz);
drivers/thermal/thermal_hwmon.c
280
*ptr = tz;
drivers/thermal/thermal_hwmon.c
40
struct thermal_zone_device *tz;
drivers/thermal/thermal_hwmon.c
59
struct thermal_zone_device *tz = temp->tz;
drivers/thermal/thermal_hwmon.c
61
ret = thermal_zone_get_temp(tz, &temperature);
drivers/thermal/thermal_hwmon.c
77
struct thermal_zone_device *tz = temp->tz;
drivers/thermal/thermal_hwmon.c
81
guard(thermal_zone)(tz);
drivers/thermal/thermal_hwmon.c
83
ret = tz->ops.get_crit_temp(tz, &temperature);
drivers/thermal/thermal_hwmon.c
92
thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.c
99
strscpy(type, tz->type);
drivers/thermal/thermal_hwmon.h
19
int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz);
drivers/thermal/thermal_hwmon.h
20
int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz);
drivers/thermal/thermal_hwmon.h
21
void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz);
drivers/thermal/thermal_hwmon.h
24
thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.h
30
devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device *tz)
drivers/thermal/thermal_hwmon.h
36
thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
drivers/thermal/thermal_mmio.c
23
static int thermal_mmio_get_temperature(struct thermal_zone_device *tz, int *temp)
drivers/thermal/thermal_mmio.c
26
struct thermal_mmio *sensor = thermal_zone_device_priv(tz);
drivers/thermal/thermal_netlink.c
351
int thermal_notify_tz_create(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
353
struct param p = { .tz_id = tz->id, .name = tz->type };
drivers/thermal/thermal_netlink.c
358
int thermal_notify_tz_delete(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
360
struct param p = { .tz_id = tz->id };
drivers/thermal/thermal_netlink.c
365
int thermal_notify_tz_enable(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
367
struct param p = { .tz_id = tz->id };
drivers/thermal/thermal_netlink.c
372
int thermal_notify_tz_disable(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
374
struct param p = { .tz_id = tz->id };
drivers/thermal/thermal_netlink.c
379
int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
382
struct param p = { .tz_id = tz->id,
drivers/thermal/thermal_netlink.c
383
.trip_id = thermal_zone_trip_id(tz, trip),
drivers/thermal/thermal_netlink.c
384
.temp = tz->temperature };
drivers/thermal/thermal_netlink.c
389
int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
392
struct param p = { .tz_id = tz->id,
drivers/thermal/thermal_netlink.c
393
.trip_id = thermal_zone_trip_id(tz, trip),
drivers/thermal/thermal_netlink.c
394
.temp = tz->temperature };
drivers/thermal/thermal_netlink.c
399
int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
402
struct param p = { .tz_id = tz->id,
drivers/thermal/thermal_netlink.c
403
.trip_id = thermal_zone_trip_id(tz, trip),
drivers/thermal/thermal_netlink.c
434
int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
437
struct param p = { .tz_id = tz->id, .name = name };
drivers/thermal/thermal_netlink.c
451
int thermal_notify_threshold_add(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
454
struct param p = { .tz_id = tz->id, .temp = temperature, .direction = direction };
drivers/thermal/thermal_netlink.c
459
int thermal_notify_threshold_delete(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
462
struct param p = { .tz_id = tz->id, .temp = temperature, .direction = direction };
drivers/thermal/thermal_netlink.c
467
int thermal_notify_threshold_flush(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
469
struct param p = { .tz_id = tz->id };
drivers/thermal/thermal_netlink.c
474
int thermal_notify_threshold_down(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
476
struct param p = { .tz_id = tz->id, .temp = tz->temperature, .prev_temp = tz->last_temperature };
drivers/thermal/thermal_netlink.c
481
int thermal_notify_threshold_up(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.c
483
struct param p = { .tz_id = tz->id, .temp = tz->temperature, .prev_temp = tz->last_temperature };
drivers/thermal/thermal_netlink.c
490
static int __thermal_genl_cmd_tz_get_id(struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.c
495
if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, tz->id) ||
drivers/thermal/thermal_netlink.c
496
nla_put_string(msg, THERMAL_GENL_ATTR_TZ_NAME, tz->type))
drivers/thermal/thermal_netlink.c
538
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
539
if (!tz)
drivers/thermal/thermal_netlink.c
546
guard(thermal_zone)(tz);
drivers/thermal/thermal_netlink.c
548
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_netlink.c
552
thermal_zone_trip_id(tz, trip)) ||
drivers/thermal/thermal_netlink.c
574
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
575
if (!tz)
drivers/thermal/thermal_netlink.c
578
ret = thermal_zone_get_temp(tz, &temp);
drivers/thermal/thermal_netlink.c
599
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
600
if (!tz)
drivers/thermal/thermal_netlink.c
603
guard(thermal_zone)(tz);
drivers/thermal/thermal_netlink.c
607
tz->governor->name))
drivers/thermal/thermal_netlink.c
672
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
673
if (!tz)
drivers/thermal/thermal_netlink.c
680
ret = thermal_thresholds_for_each(tz, __thermal_genl_cmd_threshold_get, msg);
drivers/thermal/thermal_netlink.c
705
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
706
if (!tz)
drivers/thermal/thermal_netlink.c
709
guard(thermal_zone)(tz);
drivers/thermal/thermal_netlink.c
711
return thermal_thresholds_add(tz, temp, direction);
drivers/thermal/thermal_netlink.c
730
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
731
if (!tz)
drivers/thermal/thermal_netlink.c
734
guard(thermal_zone)(tz);
drivers/thermal/thermal_netlink.c
736
return thermal_thresholds_delete(tz, temp, direction);
drivers/thermal/thermal_netlink.c
751
CLASS(thermal_zone_get_by_id, tz)(id);
drivers/thermal/thermal_netlink.c
752
if (!tz)
drivers/thermal/thermal_netlink.c
755
guard(thermal_zone)(tz);
drivers/thermal/thermal_netlink.c
757
thermal_thresholds_flush(tz);
drivers/thermal/thermal_netlink.h
105
static inline int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
111
static inline int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
133
static inline int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
149
static inline int thermal_notify_threshold_add(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
155
static inline int thermal_notify_threshold_delete(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
161
static inline int thermal_notify_threshold_flush(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
166
static inline int thermal_notify_threshold_down(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
171
static inline int thermal_notify_threshold_up(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
37
int thermal_notify_tz_create(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
38
int thermal_notify_tz_delete(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
39
int thermal_notify_tz_enable(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
40
int thermal_notify_tz_disable(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
41
int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
43
int thermal_notify_tz_trip_up(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
45
int thermal_notify_tz_trip_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
51
int thermal_notify_tz_gov_change(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
56
int thermal_notify_threshold_add(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
58
int thermal_notify_threshold_delete(const struct thermal_zone_device *tz,
drivers/thermal/thermal_netlink.h
60
int thermal_notify_threshold_flush(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
61
int thermal_notify_threshold_down(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
62
int thermal_notify_threshold_up(const struct thermal_zone_device *tz);
drivers/thermal/thermal_netlink.h
69
static inline int thermal_notify_tz_create(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
84
static inline int thermal_notify_tz_delete(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
89
static inline int thermal_notify_tz_enable(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
94
static inline int thermal_notify_tz_disable(const struct thermal_zone_device *tz)
drivers/thermal/thermal_netlink.h
99
static inline int thermal_notify_tz_trip_down(const struct thermal_zone_device *tz,
drivers/thermal/thermal_of.c
225
static struct device_node *thermal_of_zone_get_by_name(struct thermal_zone_device *tz)
drivers/thermal/thermal_of.c
233
tz_np = of_get_child_by_name(np, tz->type);
drivers/thermal/thermal_of.c
305
static bool thermal_of_should_bind(struct thermal_zone_device *tz,
drivers/thermal/thermal_of.c
313
tz_np = thermal_of_zone_get_by_name(tz);
drivers/thermal/thermal_of.c
341
static void thermal_of_zone_unregister(struct thermal_zone_device *tz)
drivers/thermal/thermal_of.c
343
thermal_zone_device_disable(tz);
drivers/thermal/thermal_of.c
344
thermal_zone_device_unregister(tz);
drivers/thermal/thermal_of.c
371
struct thermal_zone_device *tz;
drivers/thermal/thermal_of.c
415
tz = thermal_zone_device_register_with_trips(np->name, trips, ntrips,
drivers/thermal/thermal_of.c
418
if (IS_ERR(tz)) {
drivers/thermal/thermal_of.c
419
ret = PTR_ERR(tz);
drivers/thermal/thermal_of.c
427
ret = thermal_zone_device_enable(tz);
drivers/thermal/thermal_of.c
430
tz->type, tz->id, ret);
drivers/thermal/thermal_of.c
431
thermal_of_zone_unregister(tz);
drivers/thermal/thermal_of.c
435
return tz;
drivers/thermal/thermal_of.c
507
void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz)
drivers/thermal/thermal_of.c
510
devm_thermal_of_zone_match, tz));
drivers/thermal/thermal_sysfs.c
108
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
114
guard(thermal_zone)(tz);
drivers/thermal/thermal_sysfs.c
124
if (tz->ops.set_trip_temp) {
drivers/thermal/thermal_sysfs.c
127
ret = tz->ops.set_trip_temp(tz, trip, temp);
drivers/thermal/thermal_sysfs.c
132
thermal_zone_set_trip_temp(tz, trip, temp);
drivers/thermal/thermal_sysfs.c
134
__thermal_zone_device_update(tz, THERMAL_TRIP_CHANGED);
drivers/thermal/thermal_sysfs.c
153
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
159
guard(thermal_zone)(tz);
drivers/thermal/thermal_sysfs.c
178
thermal_zone_set_trip_hyst(tz, trip, hyst);
drivers/thermal/thermal_sysfs.c
180
__thermal_zone_device_update(tz, THERMAL_TRIP_CHANGED);
drivers/thermal/thermal_sysfs.c
198
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
204
ret = thermal_zone_device_set_policy(tz, name);
drivers/thermal/thermal_sysfs.c
214
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
216
return sysfs_emit(buf, "%s\n", tz->governor->name);
drivers/thermal/thermal_sysfs.c
231
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
237
guard(thermal_zone)(tz);
drivers/thermal/thermal_sysfs.c
239
if (tz->ops.set_emul_temp) {
drivers/thermal/thermal_sysfs.c
242
ret = tz->ops.set_emul_temp(tz, temperature);
drivers/thermal/thermal_sysfs.c
246
tz->emul_temperature = temperature;
drivers/thermal/thermal_sysfs.c
249
__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/thermal_sysfs.c
260
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
262
if (tz->tzp)
drivers/thermal/thermal_sysfs.c
263
return sysfs_emit(buf, "%u\n", tz->tzp->sustainable_power);
drivers/thermal/thermal_sysfs.c
272
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
275
if (!tz->tzp)
drivers/thermal/thermal_sysfs.c
281
tz->tzp->sustainable_power = sustainable_power;
drivers/thermal/thermal_sysfs.c
291
struct thermal_zone_device *tz = to_thermal_zone(dev); \
drivers/thermal/thermal_sysfs.c
293
if (tz->tzp) \
drivers/thermal/thermal_sysfs.c
294
return sysfs_emit(buf, "%d\n", tz->tzp->name); \
drivers/thermal/thermal_sysfs.c
30
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
303
struct thermal_zone_device *tz = to_thermal_zone(dev); \
drivers/thermal/thermal_sysfs.c
306
if (!tz->tzp) \
drivers/thermal/thermal_sysfs.c
312
tz->tzp->name = value; \
drivers/thermal/thermal_sysfs.c
32
return sysfs_emit(buf, "%s\n", tz->type);
drivers/thermal/thermal_sysfs.c
38
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
389
static int create_trip_attrs(struct thermal_zone_device *tz)
drivers/thermal/thermal_sysfs.c
395
attrs = kzalloc_objs(*attrs, tz->num_trips * 3 + 1);
drivers/thermal/thermal_sysfs.c
400
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_sysfs.c
41
ret = thermal_zone_get_temp(tz, &temperature);
drivers/thermal/thermal_sysfs.c
425
attrs[i + tz->num_trips] = &trip_attrs->temp.attr.attr;
drivers/thermal/thermal_sysfs.c
438
attrs[i + 2 * tz->num_trips] = &trip_attrs->hyst.attr.attr;
drivers/thermal/thermal_sysfs.c
441
attrs[tz->num_trips * 3] = NULL;
drivers/thermal/thermal_sysfs.c
443
tz->trips_attribute_group.attrs = attrs;
drivers/thermal/thermal_sysfs.c
454
static void destroy_trip_attrs(struct thermal_zone_device *tz)
drivers/thermal/thermal_sysfs.c
456
if (tz)
drivers/thermal/thermal_sysfs.c
457
kfree(tz->trips_attribute_group.attrs);
drivers/thermal/thermal_sysfs.c
460
int thermal_zone_create_device_groups(struct thermal_zone_device *tz)
drivers/thermal/thermal_sysfs.c
475
if (tz->num_trips) {
drivers/thermal/thermal_sysfs.c
476
result = create_trip_attrs(tz);
drivers/thermal/thermal_sysfs.c
483
groups[size - 2] = &tz->trips_attribute_group;
drivers/thermal/thermal_sysfs.c
486
tz->device.groups = groups;
drivers/thermal/thermal_sysfs.c
491
void thermal_zone_destroy_device_groups(struct thermal_zone_device *tz)
drivers/thermal/thermal_sysfs.c
493
if (!tz)
drivers/thermal/thermal_sysfs.c
496
if (tz->num_trips)
drivers/thermal/thermal_sysfs.c
497
destroy_trip_attrs(tz);
drivers/thermal/thermal_sysfs.c
499
kfree(tz->device.groups);
drivers/thermal/thermal_sysfs.c
55
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
57
guard(thermal_zone)(tz);
drivers/thermal/thermal_sysfs.c
59
if (tz->mode == THERMAL_DEVICE_ENABLED)
drivers/thermal/thermal_sysfs.c
69
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
73
result = thermal_zone_device_enable(tz);
drivers/thermal/thermal_sysfs.c
75
result = thermal_zone_device_disable(tz);
drivers/thermal/thermal_sysfs.c
844
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
849
return sysfs_emit(buf, "%d\n", thermal_zone_trip_id(tz, instance->trip));
drivers/thermal/thermal_sysfs.c
865
struct thermal_zone_device *tz = to_thermal_zone(dev);
drivers/thermal/thermal_sysfs.c
876
guard(thermal_zone)(tz);
drivers/thermal/thermal_sysfs.c
880
thermal_governor_update_tz(tz, THERMAL_INSTANCE_WEIGHT_CHANGED);
drivers/thermal/thermal_thresholds.c
128
void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, int *high)
drivers/thermal/thermal_thresholds.c
130
struct list_head *thresholds = &tz->user_thresholds;
drivers/thermal/thermal_thresholds.c
132
int temperature = tz->temperature;
drivers/thermal/thermal_thresholds.c
133
int last_temperature = tz->last_temperature;
drivers/thermal/thermal_thresholds.c
135
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_thresholds.c
16
int thermal_thresholds_init(struct thermal_zone_device *tz)
drivers/thermal/thermal_thresholds.c
160
thermal_notify_threshold_up(tz);
drivers/thermal/thermal_thresholds.c
164
thermal_notify_threshold_down(tz);
drivers/thermal/thermal_thresholds.c
168
int thermal_thresholds_add(struct thermal_zone_device *tz,
drivers/thermal/thermal_thresholds.c
171
struct list_head *thresholds = &tz->user_thresholds;
drivers/thermal/thermal_thresholds.c
174
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_thresholds.c
18
INIT_LIST_HEAD(&tz->user_thresholds);
drivers/thermal/thermal_thresholds.c
195
thermal_notify_threshold_add(tz, temperature, direction);
drivers/thermal/thermal_thresholds.c
197
__thermal_zone_device_update(tz, THERMAL_TZ_ADD_THRESHOLD);
drivers/thermal/thermal_thresholds.c
202
int thermal_thresholds_delete(struct thermal_zone_device *tz,
drivers/thermal/thermal_thresholds.c
205
struct list_head *thresholds = &tz->user_thresholds;
drivers/thermal/thermal_thresholds.c
208
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_thresholds.c
221
thermal_notify_threshold_delete(tz, temperature, direction);
drivers/thermal/thermal_thresholds.c
223
__thermal_zone_device_update(tz, THERMAL_TZ_DEL_THRESHOLD);
drivers/thermal/thermal_thresholds.c
228
int thermal_thresholds_for_each(struct thermal_zone_device *tz,
drivers/thermal/thermal_thresholds.c
23
static void __thermal_thresholds_flush(struct thermal_zone_device *tz)
drivers/thermal/thermal_thresholds.c
231
struct list_head *thresholds = &tz->user_thresholds;
drivers/thermal/thermal_thresholds.c
235
guard(thermal_zone)(tz);
drivers/thermal/thermal_thresholds.c
25
struct list_head *thresholds = &tz->user_thresholds;
drivers/thermal/thermal_thresholds.c
34
void thermal_thresholds_flush(struct thermal_zone_device *tz)
drivers/thermal/thermal_thresholds.c
36
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_thresholds.c
38
__thermal_thresholds_flush(tz);
drivers/thermal/thermal_thresholds.c
40
thermal_notify_threshold_flush(tz);
drivers/thermal/thermal_thresholds.c
42
__thermal_zone_device_update(tz, THERMAL_TZ_FLUSH_THRESHOLDS);
drivers/thermal/thermal_thresholds.c
45
void thermal_thresholds_exit(struct thermal_zone_device *tz)
drivers/thermal/thermal_thresholds.c
47
__thermal_thresholds_flush(tz);
drivers/thermal/thermal_thresholds.h
11
int thermal_thresholds_init(struct thermal_zone_device *tz);
drivers/thermal/thermal_thresholds.h
12
void thermal_thresholds_exit(struct thermal_zone_device *tz);
drivers/thermal/thermal_thresholds.h
13
void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, int *high);
drivers/thermal/thermal_thresholds.h
14
void thermal_thresholds_flush(struct thermal_zone_device *tz);
drivers/thermal/thermal_thresholds.h
15
int thermal_thresholds_add(struct thermal_zone_device *tz, int temperature, int direction);
drivers/thermal/thermal_thresholds.h
16
int thermal_thresholds_delete(struct thermal_zone_device *tz, int temperature, int direction);
drivers/thermal/thermal_thresholds.h
17
int thermal_thresholds_for_each(struct thermal_zone_device *tz,
drivers/thermal/thermal_trace.h
28
TP_PROTO(struct thermal_zone_device *tz),
drivers/thermal/thermal_trace.h
30
TP_ARGS(tz),
drivers/thermal/thermal_trace.h
33
__string(thermal_zone, tz->type)
drivers/thermal/thermal_trace.h
41
__entry->id = tz->id;
drivers/thermal/thermal_trace.h
42
__entry->temp_prev = tz->last_temperature;
drivers/thermal/thermal_trace.h
43
__entry->temp = tz->temperature;
drivers/thermal/thermal_trace.h
72
TP_PROTO(struct thermal_zone_device *tz, int trip,
drivers/thermal/thermal_trace.h
75
TP_ARGS(tz, trip, trip_type),
drivers/thermal/thermal_trace.h
78
__string(thermal_zone, tz->type)
drivers/thermal/thermal_trace.h
86
__entry->id = tz->id;
drivers/thermal/thermal_trace_ipa.h
13
TP_PROTO(struct thermal_zone_device *tz, u32 total_req_power,
drivers/thermal/thermal_trace_ipa.h
16
TP_ARGS(tz, total_req_power, total_granted_power, num_actors,
drivers/thermal/thermal_trace_ipa.h
29
__entry->tz_id = tz->id;
drivers/thermal/thermal_trace_ipa.h
47
TP_PROTO(struct thermal_zone_device *tz, int actor_id, u32 req_power,
drivers/thermal/thermal_trace_ipa.h
49
TP_ARGS(tz, actor_id, req_power, granted_power),
drivers/thermal/thermal_trace_ipa.h
57
__entry->tz_id = tz->id;
drivers/thermal/thermal_trace_ipa.h
69
TP_PROTO(struct thermal_zone_device *tz, s32 err, s32 err_integral,
drivers/thermal/thermal_trace_ipa.h
71
TP_ARGS(tz, err, err_integral, p, i, d, output),
drivers/thermal/thermal_trace_ipa.h
82
__entry->tz_id = tz->id;
drivers/thermal/thermal_trip.c
27
int for_each_thermal_trip(struct thermal_zone_device *tz,
drivers/thermal/thermal_trip.c
34
for_each_trip_desc(tz, td) {
drivers/thermal/thermal_trip.c
44
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
drivers/thermal/thermal_trip.c
48
guard(thermal_zone)(tz);
drivers/thermal/thermal_trip.c
50
return for_each_thermal_trip(tz, cb, data);
drivers/thermal/thermal_trip.c
54
void thermal_zone_set_trips(struct thermal_zone_device *tz, int low, int high)
drivers/thermal/thermal_trip.c
58
lockdep_assert_held(&tz->lock);
drivers/thermal/thermal_trip.c
60
if (!tz->ops.set_trips)
drivers/thermal/thermal_trip.c
64
if (tz->prev_low_trip == low && tz->prev_high_trip == high)
drivers/thermal/thermal_trip.c
67
tz->prev_low_trip = low;
drivers/thermal/thermal_trip.c
68
tz->prev_high_trip = high;
drivers/thermal/thermal_trip.c
70
dev_dbg(&tz->device,
drivers/thermal/thermal_trip.c
77
ret = tz->ops.set_trips(tz, low, high);
drivers/thermal/thermal_trip.c
79
dev_err(&tz->device, "Failed to set trips: %d\n", ret);
drivers/thermal/thermal_trip.c
82
int thermal_zone_trip_id(const struct thermal_zone_device *tz,
drivers/thermal/thermal_trip.c
89
return trip_to_trip_desc(trip) - tz->trips;
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
112
static int __ti_thermal_get_trend(struct thermal_zone_device *tz,
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
116
struct ti_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
70
static inline int __ti_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
73
struct ti_thermal_data *data = thermal_zone_device_priv(tz);
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
90
slope = thermal_zone_get_slope(tz);
drivers/thermal/ti-soc-thermal/ti-thermal-common.c
91
constant = thermal_zone_get_offset(tz);
drivers/thermal/uniphier_thermal.c
187
static int uniphier_tm_get_temp(struct thermal_zone_device *tz, int *out_temp)
drivers/thermal/uniphier_thermal.c
189
struct uniphier_tm_dev *tdev = thermal_zone_device_priv(tz);
fs/exfat/exfat_fs.h
573
u8 tz, __le16 time, __le16 date, u8 time_cs);
fs/exfat/exfat_fs.h
577
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs);
fs/exfat/misc.c
115
*tz = EXFAT_TZ_VALID;
fs/exfat/misc.c
69
u8 tz, __le16 time, __le16 date, u8 time_cs)
fs/exfat/misc.c
85
if (tz & EXFAT_TZ_VALID)
fs/exfat/misc.c
87
exfat_adjust_tz(ts, tz & ~EXFAT_TZ_VALID);
fs/exfat/misc.c
94
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs)
fs/isofs/util.c
21
int year, month, day, hour, minute, second, tz;
fs/isofs/util.c
35
tz = p[16];
fs/isofs/util.c
45
tz = flags & ISO_DATE_HIGH_SIERRA ? 0 : p[6];
fs/isofs/util.c
54
if (tz & 0x80)
fs/isofs/util.c
55
tz |= (-1 << 8);
fs/isofs/util.c
82
if (-52 <= tz && tz <= 52)
fs/isofs/util.c
83
ts.tv_sec -= tz * 15 * 60;
include/linux/compat.h
731
struct timezone __user *tz);
include/linux/compat.h
733
struct timezone __user *tz);
include/linux/lsm_hook_defs.h
50
const struct timezone *tz)
include/linux/security.h
176
extern int cap_settime(const struct timespec64 *ts, const struct timezone *tz);
include/linux/security.h
356
int security_settime64(const struct timespec64 *ts, const struct timezone *tz);
include/linux/security.h
715
const struct timezone *tz)
include/linux/security.h
717
return cap_settime(ts, tz);
include/linux/syscalls.h
722
struct timezone __user *tz);
include/linux/syscalls.h
724
struct timezone __user *tz);
include/linux/thermal.h
199
void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz);
include/linux/thermal.h
211
struct thermal_zone_device *tz)
include/linux/thermal.h
216
int for_each_thermal_trip(struct thermal_zone_device *tz,
include/linux/thermal.h
219
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
include/linux/thermal.h
222
void thermal_zone_set_trip_temp(struct thermal_zone_device *tz,
include/linux/thermal.h
225
int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp);
include/linux/thermal.h
243
void thermal_zone_device_unregister(struct thermal_zone_device *tz);
include/linux/thermal.h
266
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
include/linux/thermal.h
267
int thermal_zone_get_slope(struct thermal_zone_device *tz);
include/linux/thermal.h
268
int thermal_zone_get_offset(struct thermal_zone_device *tz);
include/linux/thermal.h
269
bool thermal_trip_is_bound_to_cdev(struct thermal_zone_device *tz,
include/linux/thermal.h
273
int thermal_zone_device_enable(struct thermal_zone_device *tz);
include/linux/thermal.h
274
int thermal_zone_device_disable(struct thermal_zone_device *tz);
include/linux/thermal.h
275
void thermal_zone_device_critical(struct thermal_zone_device *tz);
include/linux/thermal.h
293
static inline void thermal_zone_device_unregister(struct thermal_zone_device *tz)
include/linux/thermal.h
296
static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
include/linux/thermal.h
324
struct thermal_zone_device *tz, int *temp)
include/linux/thermal.h
327
struct thermal_zone_device *tz)
include/linux/thermal.h
330
struct thermal_zone_device *tz)
include/linux/thermal.h
333
static inline void *thermal_zone_device_priv(struct thermal_zone_device *tz)
include/linux/thermal.h
348
static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
include/linux/thermal.h
351
static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
include/linux/timekeeping.h
22
const struct timezone *tz);
include/vdso/gettime.h
21
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
include/xen/interface/platform.h
136
int16_t tz;
kernel/time/time.c
141
struct timezone __user *, tz)
kernel/time/time.c
151
if (unlikely(tz != NULL)) {
kernel/time/time.c
152
if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
kernel/time/time.c
169
int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
kernel/time/time.c
177
error = security_settime64(tv, tz);
kernel/time/time.c
181
if (tz) {
kernel/time/time.c
183
if (tz->tz_minuteswest > 15*60 || tz->tz_minuteswest < -15*60)
kernel/time/time.c
186
sys_tz = *tz;
kernel/time/time.c
200
struct timezone __user *, tz)
kernel/time/time.c
215
if (tz) {
kernel/time/time.c
216
if (copy_from_user(&new_tz, tz, sizeof(*tz)))
kernel/time/time.c
220
return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
kernel/time/time.c
225
struct timezone __user *, tz)
kernel/time/time.c
235
if (tz) {
kernel/time/time.c
236
if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
kernel/time/time.c
244
struct timezone __user *, tz)
kernel/time/time.c
259
if (tz) {
kernel/time/time.c
260
if (copy_from_user(&new_tz, tz, sizeof(*tz)))
kernel/time/time.c
264
return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
lib/vdso/gettimeofday.c
364
struct __kernel_old_timeval *tv, struct timezone *tz)
lib/vdso/gettimeofday.c
372
return gettimeofday_fallback(tv, tz);
lib/vdso/gettimeofday.c
378
if (unlikely(tz != NULL)) {
lib/vdso/gettimeofday.c
383
tz->tz_minuteswest = vd[CS_HRES_COARSE].tz_minuteswest;
lib/vdso/gettimeofday.c
384
tz->tz_dsttime = vd[CS_HRES_COARSE].tz_dsttime;
lib/vdso/gettimeofday.c
391
__cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
lib/vdso/gettimeofday.c
393
return __cvdso_gettimeofday_data(__arch_get_vdso_u_time_data(), tv, tz);
samples/timers/hpet_example.c
138
struct timezone tz;
samples/timers/hpet_example.c
183
gettimeofday(&stv, &tz);
samples/timers/hpet_example.c
189
gettimeofday(&etv, &tz);
security/commoncap.c
142
int cap_settime(const struct timespec64 *ts, const struct timezone *tz)
security/security.c
692
int security_settime64(const struct timespec64 *ts, const struct timezone *tz)
security/security.c
694
return call_int_hook(settime, ts, tz);
tools/include/nolibc/sys/time.h
23
int sys_gettimeofday(struct timeval *tv, struct timezone *tz)
tools/include/nolibc/sys/time.h
25
(void) tz; /* Non-NULL tz is undefined behaviour */
tools/include/nolibc/sys/time.h
40
int gettimeofday(struct timeval *tv, struct timezone *tz)
tools/include/nolibc/sys/time.h
42
return __sysret(sys_gettimeofday(tv, tz));
tools/lib/thermal/commands.c
118
static int parse_tz_get_trip(struct genl_info *info, struct thermal_zone *tz)
tools/lib/thermal/commands.c
151
tz->trip = __tt;
tools/lib/thermal/commands.c
156
static int parse_tz_get_temp(struct genl_info *info, struct thermal_zone *tz)
tools/lib/thermal/commands.c
163
if (tz->id != id)
tools/lib/thermal/commands.c
167
tz->temp = nla_get_u32(info->attrs[THERMAL_GENL_ATTR_TZ_TEMP]);
tools/lib/thermal/commands.c
172
static int parse_tz_get_gov(struct genl_info *info, struct thermal_zone *tz)
tools/lib/thermal/commands.c
179
if (tz->id != id)
tools/lib/thermal/commands.c
183
nla_strlcpy(tz->governor,
tools/lib/thermal/commands.c
191
static int parse_threshold_get(struct genl_info *info, struct thermal_zone *tz)
tools/lib/thermal/commands.c
228
tz->thresholds = __tt;
tools/lib/thermal/commands.c
404
thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th, struct thermal_zone **tz)
tools/lib/thermal/commands.c
407
NLM_F_DUMP | NLM_F_ACK, tz);
tools/lib/thermal/commands.c
416
thermal_error_t thermal_cmd_get_trip(struct thermal_handler *th, struct thermal_zone *tz)
tools/lib/thermal/commands.c
418
struct cmd_param p = { .tz_id = tz->id };
tools/lib/thermal/commands.c
421
THERMAL_GENL_CMD_TZ_GET_TRIP, 0, tz);
tools/lib/thermal/commands.c
424
thermal_error_t thermal_cmd_get_governor(struct thermal_handler *th, struct thermal_zone *tz)
tools/lib/thermal/commands.c
426
struct cmd_param p = { .tz_id = tz->id };
tools/lib/thermal/commands.c
429
THERMAL_GENL_CMD_TZ_GET_GOV, 0, tz);
tools/lib/thermal/commands.c
432
thermal_error_t thermal_cmd_get_temp(struct thermal_handler *th, struct thermal_zone *tz)
tools/lib/thermal/commands.c
434
struct cmd_param p = { .tz_id = tz->id };
tools/lib/thermal/commands.c
437
THERMAL_GENL_CMD_TZ_GET_TEMP, 0, tz);
tools/lib/thermal/commands.c
44
static int parse_tz_get(struct genl_info *info, struct thermal_zone **tz)
tools/lib/thermal/commands.c
441
struct thermal_zone *tz)
tools/lib/thermal/commands.c
443
struct cmd_param p = { .tz_id = tz->id };
tools/lib/thermal/commands.c
446
THERMAL_GENL_CMD_THRESHOLD_GET, 0, tz);
tools/lib/thermal/commands.c
450
struct thermal_zone *tz,
tools/lib/thermal/commands.c
454
struct cmd_param p = { .tz_id = tz->id, .temp = temperature, .direction = direction };
tools/lib/thermal/commands.c
457
THERMAL_GENL_CMD_THRESHOLD_ADD, 0, tz);
tools/lib/thermal/commands.c
461
struct thermal_zone *tz,
tools/lib/thermal/commands.c
465
struct cmd_param p = { .tz_id = tz->id, .temp = temperature, .direction = direction };
tools/lib/thermal/commands.c
468
THERMAL_GENL_CMD_THRESHOLD_DELETE, 0, tz);
tools/lib/thermal/commands.c
472
struct thermal_zone *tz)
tools/lib/thermal/commands.c
474
struct cmd_param p = { .tz_id = tz->id };
tools/lib/thermal/commands.c
477
THERMAL_GENL_CMD_THRESHOLD_FLUSH, 0, tz);
tools/lib/thermal/commands.c
73
*tz = __tz;
tools/lib/thermal/include/thermal.h
107
LIBTHERMAL_API struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz,
tools/lib/thermal/include/thermal.h
110
LIBTHERMAL_API struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id);
tools/lib/thermal/include/thermal.h
137
struct thermal_zone **tz);
tools/lib/thermal/include/thermal.h
143
struct thermal_zone *tz);
tools/lib/thermal/include/thermal.h
146
struct thermal_zone *tz);
tools/lib/thermal/include/thermal.h
149
struct thermal_zone *tz);
tools/lib/thermal/include/thermal.h
152
struct thermal_zone *tz);
tools/lib/thermal/include/thermal.h
155
struct thermal_zone *tz,
tools/lib/thermal/include/thermal.h
160
struct thermal_zone *tz,
tools/lib/thermal/include/thermal.h
165
struct thermal_zone *tz);
tools/lib/thermal/include/thermal.h
99
LIBTHERMAL_API int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg);
tools/lib/thermal/thermal.c
100
if (thermal_cmd_get_governor(th, tz))
tools/lib/thermal/thermal.c
108
struct thermal_zone *tz;
tools/lib/thermal/thermal.c
110
if (thermal_cmd_get_tz(th, &tz) < 0)
tools/lib/thermal/thermal.c
113
if (for_each_thermal_zone(tz, __thermal_zone_discover, th))
tools/lib/thermal/thermal.c
116
return tz;
tools/lib/thermal/thermal.c
48
int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg)
tools/lib/thermal/thermal.c
52
if (!tz)
tools/lib/thermal/thermal.c
55
for (i = 0; tz[i].id != -1; i++)
tools/lib/thermal/thermal.c
56
ret |= cb(&tz[i], arg);
tools/lib/thermal/thermal.c
61
struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz,
tools/lib/thermal/thermal.c
66
if (!tz || !name)
tools/lib/thermal/thermal.c
69
for (i = 0; tz[i].id != -1; i++) {
tools/lib/thermal/thermal.c
70
if (!strcmp(tz[i].name, name))
tools/lib/thermal/thermal.c
71
return &tz[i];
tools/lib/thermal/thermal.c
77
struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id)
tools/lib/thermal/thermal.c
81
if (!tz || id < 0)
tools/lib/thermal/thermal.c
84
for (i = 0; tz[i].id != -1; i++) {
tools/lib/thermal/thermal.c
85
if (tz[i].id == id)
tools/lib/thermal/thermal.c
86
return &tz[i];
tools/lib/thermal/thermal.c
92
static int __thermal_zone_discover(struct thermal_zone *tz, void *th)
tools/lib/thermal/thermal.c
94
if (thermal_cmd_get_trip(th, tz) < 0)
tools/lib/thermal/thermal.c
97
if (thermal_cmd_threshold_get(th, tz))
tools/testing/selftests/nolibc/nolibc-test.c
1332
struct timezone tz;
tools/testing/selftests/nolibc/nolibc-test.c
1414
CASE_TEST(gettimeofday_tv_tz);EXPECT_SYSZR(1, gettimeofday(&tv, &tz)); break;
tools/testing/selftests/timers/set-tz.c
30
struct timezone tz;
tools/testing/selftests/timers/set-tz.c
32
tz.tz_minuteswest = min;
tools/testing/selftests/timers/set-tz.c
33
tz.tz_dsttime = dst;
tools/testing/selftests/timers/set-tz.c
35
return settimeofday(0, &tz);
tools/testing/selftests/timers/set-tz.c
40
struct timezone tz;
tools/testing/selftests/timers/set-tz.c
43
memset(&tz, 0, sizeof(tz));
tools/testing/selftests/timers/set-tz.c
44
gettimeofday(&tv, &tz);
tools/testing/selftests/timers/set-tz.c
45
return tz.tz_minuteswest;
tools/testing/selftests/timers/set-tz.c
50
struct timezone tz;
tools/testing/selftests/timers/set-tz.c
53
memset(&tz, 0, sizeof(tz));
tools/testing/selftests/timers/set-tz.c
54
gettimeofday(&tv, &tz);
tools/testing/selftests/timers/set-tz.c
55
return tz.tz_dsttime;
tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
38
typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
tools/testing/selftests/vDSO/vdso_test_abi.c
35
typedef long (*vdso_gettimeofday_t)(struct timeval *tv, struct timezone *tz);
tools/testing/selftests/vDSO/vdso_test_correctness.c
167
static inline int sys_gettimeofday(struct timeval *tv, struct timezone *tz)
tools/testing/selftests/vDSO/vdso_test_correctness.c
169
return syscall(__NR_gettimeofday, tv, tz);
tools/testing/selftests/vDSO/vdso_test_correctness.c
60
typedef long (*vgtod_t)(struct timeval *tv, struct timezone *tz);
tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
38
typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
tools/testing/selftests/x86/test_vsyscall.c
52
typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
tools/testing/selftests/x86/test_vsyscall.c
95
static inline long sys_gtod(struct timeval *tv, struct timezone *tz)
tools/testing/selftests/x86/test_vsyscall.c
97
return syscall(SYS_gettimeofday, tv, tz);
tools/thermal/thermal-engine/thermal-engine.c
104
if (thermal_cmd_threshold_add(th, tz, thresholds[i],
tools/thermal/thermal-engine/thermal-engine.c
131
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
133
INFO("Thermal zone %d ('%s') disabled\n", tz_id, tz->name);
tools/thermal/thermal-engine/thermal-engine.c
141
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
143
INFO("Thermal zone %d ('%s') enabled\n", tz_id, tz->name);
tools/thermal/thermal-engine/thermal-engine.c
151
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
154
tz_id, tz->name, trip_id, temp);
tools/thermal/thermal-engine/thermal-engine.c
162
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
165
tz_id, tz->name, trip_id, temp);
tools/thermal/thermal-engine/thermal-engine.c
189
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
194
tz->trip[trip_id].type = type;
tools/thermal/thermal-engine/thermal-engine.c
195
tz->trip[trip_id].temp = temp;
tools/thermal/thermal-engine/thermal-engine.c
196
tz->trip[trip_id].hyst = hyst;
tools/thermal/thermal-engine/thermal-engine.c
225
struct thermal_zone *tz = thermal_zone_find_by_id(td->tz, tz_id);
tools/thermal/thermal-engine/thermal-engine.c
227
INFO("%s: governor changed %s -> %s\n", tz->name, tz->governor, name);
tools/thermal/thermal-engine/thermal-engine.c
229
strcpy(tz->governor, name);
tools/thermal/thermal-engine/thermal-engine.c
37
struct thermal_zone *tz;
tools/thermal/thermal-engine/thermal-engine.c
392
td.tz = thermal_zone_discover(td.th);
tools/thermal/thermal-engine/thermal-engine.c
393
if (!td.tz) {
tools/thermal/thermal-engine/thermal-engine.c
398
for_each_thermal_zone(td.tz, set_threshold, td.th);
tools/thermal/thermal-engine/thermal-engine.c
400
for_each_thermal_zone(td.tz, show_tz, td.th);
tools/thermal/thermal-engine/thermal-engine.c
57
static int show_temp(struct thermal_zone *tz, __maybe_unused void *arg)
tools/thermal/thermal-engine/thermal-engine.c
59
thermal_cmd_get_temp(arg, tz);
tools/thermal/thermal-engine/thermal-engine.c
61
INFO("temperature: %d\n", tz->temp);
tools/thermal/thermal-engine/thermal-engine.c
66
static int show_governor(struct thermal_zone *tz, __maybe_unused void *arg)
tools/thermal/thermal-engine/thermal-engine.c
68
thermal_cmd_get_governor(arg, tz);
tools/thermal/thermal-engine/thermal-engine.c
70
INFO("governor: '%s'\n", tz->governor);
tools/thermal/thermal-engine/thermal-engine.c
75
static int show_tz(struct thermal_zone *tz, __maybe_unused void *arg)
tools/thermal/thermal-engine/thermal-engine.c
77
INFO("thermal zone '%s', id=%d\n", tz->name, tz->id);
tools/thermal/thermal-engine/thermal-engine.c
79
for_each_thermal_trip(tz->trip, show_trip, NULL);
tools/thermal/thermal-engine/thermal-engine.c
81
for_each_thermal_threshold(tz->thresholds, show_threshold, NULL);
tools/thermal/thermal-engine/thermal-engine.c
83
show_temp(tz, arg);
tools/thermal/thermal-engine/thermal-engine.c
85
show_governor(tz, arg);
tools/thermal/thermal-engine/thermal-engine.c
90
static int set_threshold(struct thermal_zone *tz, __maybe_unused void *arg)
tools/thermal/thermal-engine/thermal-engine.c
96
INFO("Setting threshold for thermal zone '%s', id=%d\n", tz->name, tz->id);
tools/thermal/thermal-engine/thermal-engine.c
98
if (thermal_cmd_threshold_flush(th, tz)) {
tools/thermal/thermometer/thermometer.c
105
config_setting_t *tz;
tools/thermal/thermometer/thermometer.c
127
tz = config_lookup(&cfg, "thermal-zones");
tools/thermal/thermometer/thermometer.c
128
if (!tz) {
tools/thermal/thermometer/thermometer.c
133
length = config_setting_length(tz);
tools/thermal/thermometer/thermometer.c
143
node = config_setting_get_elem(tz, i);
tools/thermal/thermometer/thermometer.c
262
struct tz *tz;
tools/thermal/thermometer/thermometer.c
272
tz = realloc(thermometer->tz, sizeof(*thermometer->tz) * (thermometer->nr_tz + 1));
tools/thermal/thermometer/thermometer.c
273
if (!tz) {
tools/thermal/thermometer/thermometer.c
278
thermometer->tz = tz;
tools/thermal/thermometer/thermometer.c
279
thermometer->tz[thermometer->nr_tz].fd_temp = fd;
tools/thermal/thermometer/thermometer.c
280
thermometer->tz[thermometer->nr_tz].name = strdup(name);
tools/thermal/thermometer/thermometer.c
281
thermometer->tz[thermometer->nr_tz].polling = polling;
tools/thermal/thermometer/thermometer.c
344
struct tz *tz = arg;
tools/thermal/thermometer/thermometer.c
347
pread(tz->fd_temp, buf, sizeof(buf), 0);
tools/thermal/thermometer/thermometer.c
349
fprintf(tz->file_out, "%ld %s", getuptimeofday_ms(), buf);
tools/thermal/thermometer/thermometer.c
374
thermometer->tz[i].name, options->postfix);
tools/thermal/thermometer/thermometer.c
387
fprintf(f, "timestamp(ms) %s(°mC)\n", thermometer->tz[i].name);
tools/thermal/thermometer/thermometer.c
389
thermometer->tz[i].file_out = f;
tools/thermal/thermometer/thermometer.c
391
DEBUG("Created '%s' file for thermal zone '%s'\n", path, thermometer->tz[i].name);
tools/thermal/thermometer/thermometer.c
396
thermometer->tz[i].fd_timer = timerfd_create(CLOCK_MONOTONIC, 0);
tools/thermal/thermometer/thermometer.c
397
if (thermometer->tz[i].fd_timer < 0) {
tools/thermal/thermometer/thermometer.c
399
thermometer->tz[i].name);
tools/thermal/thermometer/thermometer.c
404
thermometer->tz[i].name, thermometer->tz[i].polling);
tools/thermal/thermometer/thermometer.c
407
msec_to_timespec(thermometer->tz[i].polling);
tools/thermal/thermometer/thermometer.c
409
if (timerfd_settime(thermometer->tz[i].fd_timer, 0,
tools/thermal/thermometer/thermometer.c
413
if (mainloop_add(thermometer->tz[i].fd_timer,
tools/thermal/thermometer/thermometer.c
415
&thermometer->tz[i]))
tools/thermal/thermometer/thermometer.c
528
fclose(thermometer->tz[i].file_out);
tools/thermal/thermometer/thermometer.c
66
struct tz *tz;
tools/thermal/tmon/tui.c
549
static void draw_tp_line(int tz, int y)
tools/thermal/tmon/tui.c
554
for (j = 0; j < ptdata.tzi[tz].nr_trip_pts; j++) {
tools/thermal/tmon/tui.c
555
x = ptdata.tzi[tz].tp[j].temp / 1000;
tools/thermal/tmon/tui.c
557
"%c%d", trip_type_to_char(ptdata.tzi[tz].tp[j].type),
tools/thermal/tmon/tui.c
560
tz, j, ptdata.tzi[tz].tp[j].temp);