/kernel/linux/linux-5.10/drivers/thermal/ |
D | thermal_core.c | 75 static void bind_previous_governor(struct thermal_zone_device *tz, in bind_previous_governor() argument 78 if (tz->governor && tz->governor->bind_to_tz) { in bind_previous_governor() 79 if (tz->governor->bind_to_tz(tz)) { in bind_previous_governor() 80 dev_err(&tz->device, in bind_previous_governor() 82 failed_gov_name, tz->governor->name, tz->type); in bind_previous_governor() 83 tz->governor = NULL; in bind_previous_governor() 97 static int thermal_set_governor(struct thermal_zone_device *tz, in thermal_set_governor() argument 102 if (tz->governor && tz->governor->unbind_from_tz) in thermal_set_governor() 103 tz->governor->unbind_from_tz(tz); in thermal_set_governor() 106 ret = new_gov->bind_to_tz(tz); in thermal_set_governor() [all …]
|
D | thermal_helpers.c | 26 int get_tz_trend(struct thermal_zone_device *tz, int trip) in get_tz_trend() argument 30 if (tz->emul_temperature || !tz->ops->get_trend || in get_tz_trend() 31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend() 32 if (tz->temperature > tz->last_temperature) in get_tz_trend() 34 else if (tz->temperature < tz->last_temperature) in get_tz_trend() 45 get_thermal_instance(struct thermal_zone_device *tz, in get_thermal_instance() argument 51 mutex_lock(&tz->lock); in get_thermal_instance() 54 list_for_each_entry(pos, &tz->thermal_instances, tz_node) { in get_thermal_instance() 55 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance() 62 mutex_unlock(&tz->lock); in get_thermal_instance() [all …]
|
D | thermal_sysfs.c | 29 struct thermal_zone_device *tz = to_thermal_zone(dev); in type_show() local 31 return sprintf(buf, "%s\n", tz->type); in type_show() 37 struct thermal_zone_device *tz = to_thermal_zone(dev); in temp_show() local 40 ret = thermal_zone_get_temp(tz, &temperature); in temp_show() 51 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_show() local 52 int enabled = thermal_zone_device_is_enabled(tz); in mode_show() 61 struct thermal_zone_device *tz = to_thermal_zone(dev); in mode_store() local 65 result = thermal_zone_device_enable(tz); in mode_store() 67 result = thermal_zone_device_disable(tz); in mode_store() 81 struct thermal_zone_device *tz = to_thermal_zone(dev); in trip_point_type_show() local [all …]
|
D | gov_power_allocator.c | 86 static u32 estimate_sustainable_power(struct thermal_zone_device *tz) in estimate_sustainable_power() argument 90 struct power_allocator_params *params = tz->governor_data; in estimate_sustainable_power() 92 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in estimate_sustainable_power() 127 static void estimate_pid_constants(struct thermal_zone_device *tz, in estimate_pid_constants() argument 135 ret = tz->ops->get_trip_temp(tz, trip_switch_on, &switch_on_temp); in estimate_pid_constants() 151 if (!tz->tzp->k_po || force) in estimate_pid_constants() 152 tz->tzp->k_po = int_to_frac(sustainable_power) / in estimate_pid_constants() 155 if (!tz->tzp->k_pu || force) in estimate_pid_constants() 156 tz->tzp->k_pu = int_to_frac(2 * sustainable_power) / in estimate_pid_constants() 159 if (!tz->tzp->k_i || force) in estimate_pid_constants() [all …]
|
D | thermal_of.c | 87 static int of_thermal_get_temp(struct thermal_zone_device *tz, in of_thermal_get_temp() argument 90 struct __thermal_zone *data = tz->devdata; in of_thermal_get_temp() 98 static int of_thermal_set_trips(struct thermal_zone_device *tz, in of_thermal_set_trips() argument 101 struct __thermal_zone *data = tz->devdata; in of_thermal_set_trips() 119 int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 121 struct __thermal_zone *data = tz->devdata; in of_thermal_get_ntrips() 140 bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int trip) in of_thermal_is_trip_valid() argument 142 struct __thermal_zone *data = tz->devdata; in of_thermal_is_trip_valid() 162 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument 164 struct __thermal_zone *data = tz->devdata; in of_thermal_get_trip_points() [all …]
|
D | gov_bang_bang.c | 16 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 21 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 23 if (!tz->ops->get_trip_hyst) { in thermal_zone_trip_update() 25 "running with default hysteresis zero\n", tz->type); in thermal_zone_trip_update() 28 tz->ops->get_trip_hyst(tz, trip, &trip_hyst); in thermal_zone_trip_update() 30 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", in thermal_zone_trip_update() 31 trip, trip_temp, tz->temperature, in thermal_zone_trip_update() 34 mutex_lock(&tz->lock); in thermal_zone_trip_update() 36 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update() 55 if (instance->target == 0 && tz->temperature >= trip_temp) in thermal_zone_trip_update() [all …]
|
D | gov_fair_share.c | 22 static int get_trip_level(struct thermal_zone_device *tz) in get_trip_level() argument 28 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level() 31 for (count = 0; count < tz->trips; count++) { in get_trip_level() 32 tz->ops->get_trip_temp(tz, count, &trip_temp); in get_trip_level() 33 if (tz->temperature < trip_temp) in get_trip_level() 42 tz->ops->get_trip_type(tz, count - 1, &trip_type); in get_trip_level() 43 trace_thermal_zone_trip(tz, count - 1, trip_type); in get_trip_level() 49 static long get_target_state(struct thermal_zone_device *tz, in get_target_state() argument 56 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state() 78 static int fair_share_throttle(struct thermal_zone_device *tz, int trip) in fair_share_throttle() argument [all …]
|
D | gov_step_wise.c | 105 static void update_passive_instance(struct thermal_zone_device *tz, in update_passive_instance() argument 113 tz->passive += value; in update_passive_instance() 116 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) in thermal_zone_trip_update() argument 126 trip_temp = tz->forced_passive; in thermal_zone_trip_update() 129 tz->ops->get_trip_temp(tz, trip, &trip_temp); in thermal_zone_trip_update() 130 tz->ops->get_trip_type(tz, trip, &trip_type); in thermal_zone_trip_update() 133 trend = get_tz_trend(tz, trip); in thermal_zone_trip_update() 135 if (tz->temperature >= trip_temp) { in thermal_zone_trip_update() 137 trace_thermal_zone_trip(tz, trip, trip_type); in thermal_zone_trip_update() 140 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", in thermal_zone_trip_update() [all …]
|
D | thermal_hwmon.c | 39 struct thermal_zone_device *tz; member 58 struct thermal_zone_device *tz = temp->tz; in temp_input_show() local 60 ret = thermal_zone_get_temp(tz, &temperature); in temp_input_show() 76 struct thermal_zone_device *tz = temp->tz; in temp_crit_show() local 80 ret = tz->ops->get_crit_temp(tz, &temperature); in temp_crit_show() 89 thermal_hwmon_lookup_by_type(const struct thermal_zone_device *tz) in thermal_hwmon_lookup_by_type() argument 96 strcpy(type, tz->type); in thermal_hwmon_lookup_by_type() 111 const struct thermal_zone_device *tz) in thermal_hwmon_lookup_temp() argument 117 if (temp->tz == tz) { in thermal_hwmon_lookup_temp() 126 static bool thermal_zone_crit_temp_valid(struct thermal_zone_device *tz) in thermal_zone_crit_temp_valid() argument [all …]
|
D | gov_user_space.c | 25 static int notify_user_space(struct thermal_zone_device *tz, int trip) in notify_user_space() argument 30 mutex_lock(&tz->lock); in notify_user_space() 31 thermal_prop[0] = kasprintf(GFP_KERNEL, "NAME=%s", tz->type); in notify_user_space() 32 thermal_prop[1] = kasprintf(GFP_KERNEL, "TEMP=%d", tz->temperature); in notify_user_space() 34 thermal_prop[3] = kasprintf(GFP_KERNEL, "EVENT=%d", tz->notify_event); in notify_user_space() 36 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, thermal_prop); in notify_user_space() 39 mutex_unlock(&tz->lock); in notify_user_space()
|
D | thermal_hwmon.h | 19 int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 20 int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz); 21 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz); 24 thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_add_hwmon_sysfs() argument 30 devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) in devm_thermal_add_hwmon_sysfs() argument 36 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) in thermal_remove_hwmon_sysfs() argument
|
D | thermal_netlink.c | 360 static int __thermal_genl_cmd_tz_get_id(struct thermal_zone_device *tz, in __thermal_genl_cmd_tz_get_id() argument 365 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, tz->id) || in __thermal_genl_cmd_tz_get_id() 366 nla_put_string(msg, THERMAL_GENL_ATTR_TZ_NAME, tz->type)) in __thermal_genl_cmd_tz_get_id() 399 struct thermal_zone_device *tz; in thermal_genl_cmd_tz_get_trip() local 408 tz = thermal_zone_get_by_id(id); in thermal_genl_cmd_tz_get_trip() 409 if (!tz) in thermal_genl_cmd_tz_get_trip() 416 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_trip() 418 for (i = 0; i < tz->trips; i++) { in thermal_genl_cmd_tz_get_trip() 423 tz->ops->get_trip_type(tz, i, &type); in thermal_genl_cmd_tz_get_trip() 424 tz->ops->get_trip_temp(tz, i, &temp); in thermal_genl_cmd_tz_get_trip() [all …]
|
D | imx_thermal.c | 200 struct thermal_zone_device *tz; member 251 static int imx_get_temp(struct thermal_zone_device *tz, int *temp) in imx_get_temp() argument 253 struct imx_thermal_data *data = tz->devdata; in imx_get_temp() 267 dev_dbg(&tz->device, "temp measurement never finished\n"); in imx_get_temp() 288 dev_dbg(&tz->device, "thermal alarm off: T < %d\n", in imx_get_temp() 294 dev_dbg(&tz->device, "millicelsius: %d\n", *temp); in imx_get_temp() 309 static int imx_change_mode(struct thermal_zone_device *tz, in imx_change_mode() argument 312 struct imx_thermal_data *data = tz->devdata; in imx_change_mode() 333 static int imx_get_trip_type(struct thermal_zone_device *tz, int trip, in imx_get_trip_type() argument 341 static int imx_get_crit_temp(struct thermal_zone_device *tz, int *temp) in imx_get_crit_temp() argument [all …]
|
D | thermal_core.h | 88 int get_tz_trend(struct thermal_zone_device *tz, int trip); 91 get_thermal_instance(struct thermal_zone_device *tz, 103 struct thermal_zone_device *tz; member 135 void thermal_zone_set_trips(struct thermal_zone_device *tz); 166 static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz) in of_thermal_get_ntrips() argument 170 static inline bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, in of_thermal_is_trip_valid() argument 176 of_thermal_get_trip_points(struct thermal_zone_device *tz) in of_thermal_get_trip_points() argument 182 int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
|
D | db8500_thermal.c | 55 struct thermal_zone_device *tz; member 132 dev_dbg(&th->tz->device, in prcmu_low_irq_handler() 135 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_low_irq_handler() 155 dev_dbg(&th->tz->device, in prcmu_high_irq_handler() 161 thermal_zone_device_update(th->tz, THERMAL_EVENT_UNSPECIFIED); in prcmu_high_irq_handler() 205 th->tz = devm_thermal_zone_of_sensor_register(dev, 0, th, &thdev_ops); in db8500_thermal_probe() 206 if (IS_ERR(th->tz)) { in db8500_thermal_probe() 208 return PTR_ERR(th->tz); in db8500_thermal_probe()
|
/kernel/linux/linux-5.10/drivers/acpi/ |
D | thermal.c | 185 static int acpi_thermal_get_temperature(struct acpi_thermal *tz) in acpi_thermal_get_temperature() argument 190 if (!tz) in acpi_thermal_get_temperature() 193 tz->last_temperature = tz->temperature; in acpi_thermal_get_temperature() 195 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); in acpi_thermal_get_temperature() 199 tz->temperature = tmp; in acpi_thermal_get_temperature() 201 tz->temperature)); in acpi_thermal_get_temperature() 206 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) in acpi_thermal_get_polling_frequency() argument 211 if (!tz) in acpi_thermal_get_polling_frequency() 214 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); in acpi_thermal_get_polling_frequency() 218 tz->polling_frequency = tmp; in acpi_thermal_get_polling_frequency() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/timers/ |
D | set-tz.c | 30 struct timezone tz; in set_tz() local 32 tz.tz_minuteswest = min; in set_tz() 33 tz.tz_dsttime = dst; in set_tz() 35 return settimeofday(0, &tz); in set_tz() 40 struct timezone tz; in get_tz_min() local 43 memset(&tz, 0, sizeof(tz)); in get_tz_min() 44 gettimeofday(&tv, &tz); in get_tz_min() 45 return tz.tz_minuteswest; in get_tz_min() 50 struct timezone tz; in get_tz_dst() local 53 memset(&tz, 0, sizeof(tz)); in get_tz_dst() [all …]
|
/kernel/linux/linux-5.10/drivers/thermal/broadcom/ |
D | bcm2835_thermal.c | 67 struct thermal_zone_device *tz; member 103 thermal_zone_get_offset(data->tz), in bcm2835_thermal_get_temp() 104 thermal_zone_get_slope(data->tz)); in bcm2835_thermal_get_temp() 167 struct thermal_zone_device *tz; in bcm2835_thermal_probe() local 210 tz = thermal_zone_of_sensor_register(&pdev->dev, 0, data, in bcm2835_thermal_probe() 212 if (IS_ERR(tz)) { in bcm2835_thermal_probe() 213 err = PTR_ERR(tz); in bcm2835_thermal_probe() 230 slope = thermal_zone_get_slope(tz); in bcm2835_thermal_probe() 231 offset = thermal_zone_get_offset(tz); in bcm2835_thermal_probe() 236 err = tz->ops->get_trip_temp(tz, 0, &trip_temp); in bcm2835_thermal_probe() [all …]
|
D | ns-thermal.c | 18 struct thermal_zone_device *tz; member 25 int offset = thermal_zone_get_offset(ns_thermal->tz); in ns_thermal_get_temp() 26 int slope = thermal_zone_get_slope(ns_thermal->tz); in ns_thermal_get_temp() 63 ns_thermal->tz = devm_thermal_zone_of_sensor_register(dev, 0, in ns_thermal_probe() 66 if (IS_ERR(ns_thermal->tz)) { in ns_thermal_probe() 68 return PTR_ERR(ns_thermal->tz); in ns_thermal_probe()
|
/kernel/linux/linux-5.10/include/linux/ |
D | thermal.h | 198 int (*bind_to_tz)(struct thermal_zone_device *tz); 199 void (*unbind_from_tz)(struct thermal_zone_device *tz); 200 int (*throttle)(struct thermal_zone_device *tz, int trip); 235 int (*match) (struct thermal_zone_device *tz, 325 struct thermal_zone_device *tz); 330 struct thermal_zone_device *tz); 348 struct thermal_zone_device *tz) in thermal_zone_of_sensor_unregister() argument 361 struct thermal_zone_device *tz) in devm_thermal_zone_of_sensor_unregister() argument 394 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); 395 int thermal_zone_get_slope(struct thermal_zone_device *tz); [all …]
|
/kernel/linux/linux-5.10/fs/isofs/ |
D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 30 if (flag == 0) tz = p[6]; /* High sierra has no time zone */ in iso_date() 31 else tz = 0; in iso_date() 39 if (tz & 0x80) in iso_date() 40 tz |= (-1 << 8); in iso_date() 67 if (-52 <= tz && tz <= 52) in iso_date() 68 crtime -= tz * 15 * 60; in iso_date()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/ |
D | core_thermal.c | 144 mlxsw_thermal_module_trips_reset(struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_reset() argument 146 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = 0; in mlxsw_thermal_module_trips_reset() 147 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = 0; in mlxsw_thermal_module_trips_reset() 148 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = 0; in mlxsw_thermal_module_trips_reset() 149 tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = 0; in mlxsw_thermal_module_trips_reset() 154 struct mlxsw_thermal_module *tz) in mlxsw_thermal_module_trips_update() argument 159 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update() 165 err = mlxsw_env_module_temp_thresholds_get(core, tz->module, in mlxsw_thermal_module_trips_update() 173 tz->tzdev->type, crit_temp, emerg_temp); in mlxsw_thermal_module_trips_update() 185 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp - in mlxsw_thermal_module_trips_update() [all …]
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | thermal.h | 26 TP_PROTO(struct thermal_zone_device *tz), 28 TP_ARGS(tz), 31 __string(thermal_zone, tz->type) 38 __assign_str(thermal_zone, tz->type); 39 __entry->id = tz->id; 40 __entry->temp_prev = tz->last_temperature; 41 __entry->temp = tz->temperature; 70 TP_PROTO(struct thermal_zone_device *tz, int trip, 73 TP_ARGS(tz, trip, trip_type), 76 __string(thermal_zone, tz->type) [all …]
|
/kernel/linux/linux-5.10/kernel/time/ |
D | time.c | 141 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 151 if (unlikely(tz != NULL)) { in SYSCALL_DEFINE2() 152 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz))) in SYSCALL_DEFINE2() 169 int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz) in do_sys_settimeofday64() argument 177 error = security_settime64(tv, tz); in do_sys_settimeofday64() 181 if (tz) { in do_sys_settimeofday64() 183 if (tz->tz_minuteswest > 15*60 || tz->tz_minuteswest < -15*60) in do_sys_settimeofday64() 186 sys_tz = *tz; in do_sys_settimeofday64() 200 struct timezone __user *, tz) in SYSCALL_DEFINE2() argument 215 if (tz) { in SYSCALL_DEFINE2() [all …]
|
/kernel/linux/linux-5.10/arch/sparc/vdso/ |
D | vclock_gettime.c | 77 notrace static long vdso_fallback_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) in vdso_fallback_gettimeofday() argument 81 register long o1 __asm__("o1") = (long) tz; in vdso_fallback_gettimeofday() 307 __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) in __vdso_gettimeofday() argument 329 if (unlikely(tz != NULL)) { in __vdso_gettimeofday() 331 tz->tz_minuteswest = vvd->tz_minuteswest; in __vdso_gettimeofday() 332 tz->tz_dsttime = vvd->tz_dsttime; in __vdso_gettimeofday() 336 return vdso_fallback_gettimeofday(tv, tz); in __vdso_gettimeofday() 343 __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz) in __vdso_gettimeofday_stick() argument 365 if (unlikely(tz != NULL)) { in __vdso_gettimeofday_stick() 367 tz->tz_minuteswest = vvd->tz_minuteswest; in __vdso_gettimeofday_stick() [all …]
|