Home
last modified time | relevance | path

Searched refs:max_state (Results 1 – 25 of 39) sorted by relevance

12

/linux/drivers/hwmon/
H A Demc2305.c27 #define EMC2305_PWM_DUTY2STATE(duty, max_state, pwm_max) \ argument
28 DIV_ROUND_CLOSEST((duty) * (max_state), (pwm_max))
29 #define EMC2305_PWM_STATE2DUTY(state, max_state, pwm_max) \ argument
30 DIV_ROUND_CLOSEST((state) * (pwm_max), (max_state))
99 u8 max_state; member
169 *state = data->max_state; in emc2305_get_max_state()
181 val = EMC2305_PWM_STATE2DUTY(state, data->max_state, EMC2305_FAN_MAX); in __emc2305_set_cur_state()
208 if (state > data->max_state) in emc2305_set_cur_state()
281 data->cdev_data[channel].cur_state = EMC2305_PWM_DUTY2STATE(val, data->max_state, in emc2305_set_pwm()
316 EMC2305_PWM_DUTY2STATE(data->pwm_min[cdev_idx], data->max_state, in emc2305_set_single_tz()
[all …]
/linux/drivers/pmdomain/qcom/
H A Drpmpd.c60 unsigned int max_state; member
68 unsigned int max_state; member
645 .max_state = RPM_SMD_LEVEL_TURBO,
657 .max_state = MAX_CORNER_RPMPD_STATE,
674 .max_state = MAX_CORNER_RPMPD_STATE,
688 .max_state = MAX_CORNER_RPMPD_STATE,
702 .max_state = RPM_SMD_LEVEL_TURBO,
718 .max_state = RPM_SMD_LEVEL_TURBO,
732 .max_state = MAX_CORNER_RPMPD_STATE,
746 .max_state = MAX_CORNER_RPMPD_STATE,
[all …]
/linux/drivers/thermal/
H A Ddevfreq_cooling.c56 size_t max_state; member
69 *state = dfc->max_state; in devfreq_cooling_get_max_state()
99 if (state > dfc->max_state) in devfreq_cooling_set_cur_state()
103 perf_idx = dfc->max_state - state; in devfreq_cooling_set_cur_state()
217 state = dfc->max_state - dfc->capped_state; in devfreq_cooling_get_requested_power()
272 if (state > dfc->max_state) in devfreq_cooling_state2power()
275 perf_idx = dfc->max_state - state; in devfreq_cooling_state2power()
321 for (i = dfc->max_state; i > 0; i--) { in devfreq_cooling_power2state()
330 *state = dfc->max_state - i; in devfreq_cooling_power2state()
444 dfc->max_state = num_opps - 1; in of_devfreq_cooling_register_power()
H A Dthermal_sysfs.c522 return sprintf(buf, "%ld\n", cdev->max_state); in max_state_show()
553 if (state > cdev->max_state) in cur_state_store()
568 static DEVICE_ATTR_RO(max_state);
624 stats->trans_table[stats->state * (cdev->max_state + 1) + new_state]++; in thermal_cooling_device_stats_update()
674 for (i = 0; i <= cdev->max_state; i++) { in time_in_state_ms_show()
700 states = cdev->max_state + 1; in reset_store()
738 for (i = 0; i <= cdev->max_state; i++) { in trans_table_show()
750 for (i = 0; i <= cdev->max_state; i++) { in trans_table_show()
756 for (j = 0; j <= cdev->max_state; j++) { in trans_table_show()
760 stats->trans_table[i * (cdev->max_state + 1) + j]); in trans_table_show()
[all …]
H A Dthermal_core.c779 cool_spec->upper = cdev->max_state; in thermal_bind_cdev_to_trip()
785 if (cool_spec->lower > cool_spec->upper || cool_spec->upper > cdev->max_state) in thermal_bind_cdev_to_trip()
1021 ret = cdev->ops->get_max_state(cdev, &cdev->max_state); in __thermal_cooling_device_register()
1050 if (current_state <= cdev->max_state) in __thermal_cooling_device_register()
1221 if (cdev->ops->get_max_state(cdev, &cdev->max_state)) in thermal_cooling_device_update()
1227 if (ti->upper == cdev->max_state) in thermal_cooling_device_update()
1230 if (ti->upper < cdev->max_state) { in thermal_cooling_device_update()
1232 ti->upper = cdev->max_state; in thermal_cooling_device_update()
1237 ti->upper = cdev->max_state; in thermal_cooling_device_update()
1248 if (cdev->ops->get_cur_state(cdev, &state) || state > cdev->max_state) in thermal_cooling_device_update()
H A Dgov_fair_share.c88 dividend *= cdev->max_state; in fair_share_throttle()
/linux/drivers/platform/x86/
H A Dmsi-ec.c115 .max_state = 3,
195 .max_state = 3,
273 .max_state = 3,
351 .max_state = 3,
428 .max_state = 3,
507 .max_state = 3,
586 .max_state = 3,
666 .max_state = 3,
743 .max_state = 3,
820 .max_state = 3,
[all …]
H A Dmsi-ec.h103 int max_state; member
/linux/drivers/cpufreq/
H A Dcpufreq_stats.c18 unsigned int max_state; member
41 unsigned int count = stats->max_state; in cpufreq_stats_reset_table()
156 count = stats->trans_table[i * stats->max_state + j]; in show_trans_table()
188 for (index = 0; index < stats->max_state; index++) in freq_table_get_index()
242 stats->max_state = count; in cpufreq_stats_create_table()
287 stats->trans_table[old_index * stats->max_state + new_index]++; in cpufreq_stats_record_transition()
/linux/drivers/devfreq/
H A Ddevfreq.c136 if (freq_table[0] < freq_table[devfreq->max_state - 1]) { in devfreq_get_freq_range()
138 *max_freq = freq_table[devfreq->max_state - 1]; in devfreq_get_freq_range()
140 *min_freq = freq_table[devfreq->max_state - 1]; in devfreq_get_freq_range()
172 for (lev = 0; lev < devfreq->max_state; lev++) in devfreq_get_freq_level()
190 devfreq->max_state = count; in set_freq_table()
192 devfreq->max_state, in set_freq_table()
198 for (i = 0, freq = 0; i < devfreq->max_state; i++, freq++) { in set_freq_table()
245 (prev_lev * devfreq->max_state) + lev]++; in devfreq_update_status()
853 if (!devfreq->profile->max_state || !devfreq->profile->freq_table) { in devfreq_add_device()
861 devfreq->max_state = devfreq->profile->max_state; in devfreq_add_device()
[all …]
H A Dsun8i-a33-mbus.c337 unsigned int max_state; in sun8i_a33_mbus_probe() local
345 max_state = variant->max_dram_divider - variant->min_dram_divider + 1; in sun8i_a33_mbus_probe()
347 priv = devm_kzalloc(dev, struct_size(priv, freq_table, max_state), GFP_KERNEL); in sun8i_a33_mbus_probe()
405 priv->profile.max_state = max_state; in sun8i_a33_mbus_probe()
414 for (i = 0; i < max_state; ++i) { in sun8i_a33_mbus_probe()
H A Dgovernor_passive.c147 for (i = 0; i < parent_devfreq->max_state; i++) in get_target_freq_with_devfreq()
151 if (i == parent_devfreq->max_state) in get_target_freq_with_devfreq()
154 if (i < devfreq->max_state) { in get_target_freq_with_devfreq()
157 count = devfreq->max_state; in get_target_freq_with_devfreq()
H A Dexynos-bus.c380 int ret, max_state; in exynos_bus_probe() local
435 max_state = bus->devfreq->max_state; in exynos_bus_probe()
437 max_freq = (bus->devfreq->freq_table[max_state - 1] / 1000); in exynos_bus_probe()
/linux/drivers/acpi/
H A Dprocessor_thermal.c220 int max_state = 0; in acpi_processor_max_state() local
226 max_state += cpufreq_get_max_state(pr->id); in acpi_processor_max_state()
228 max_state += (pr->throttling.state_count -1); in acpi_processor_max_state()
230 return max_state; in acpi_processor_max_state()
H A Dfan_core.c155 int max_state; in fan_set_state_acpi4() local
158 max_state = 100 / fan->fif.step_size; in fan_set_state_acpi4()
160 max_state = fan->fps_count - 1; in fan_set_state_acpi4()
162 if (state > max_state) in fan_set_state_acpi4()
/linux/Documentation/hwmon/
H A Demc2305.rst34 cur_state RW file for the current cooling state of the cooling device (0..max_state)
35 max_state RO file for the maximum cooling state of the cooling device
H A Dmlxreg-fan.rst68 (0..max_state)
69 max_state RO file for maximum cooling state of the cooling device
/linux/drivers/thermal/intel/int340x_thermal/
H A Dint3403_thermal.c30 unsigned long max_state; member
117 *state = obj->max_state; in int3403_get_max_state()
179 obj->max_state = p->package.count - 1; in int3403_cdev_add()
/linux/drivers/interconnect/qcom/
H A Dosm-l3.c42 unsigned int max_state; member
141 for (index = 0; index < qp->max_state - 1; index++) { in qcom_osm_l3_set()
226 qp->max_state = i; in qcom_osm_l3_probe()
/linux/tools/lib/thermal/include/
H A Dthermal.h30 int (*cdev_add)(const char *name, int cdev_id, int max_state, void *arg);
59 int max_state; member
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore_thermal.c39 int max_state; member
87 .max_state = (4 * MLXSW_THERMAL_MAX_STATE) / 10,
91 .max_state = MLXSW_THERMAL_MAX_STATE,
95 .max_state = MLXSW_THERMAL_MAX_STATE,
180 c->upper = state->max_state; in mlxsw_thermal_should_bind()
230 c->upper = state->max_state; in mlxsw_thermal_module_should_bind()
/linux/include/linux/platform_data/
H A Demc2305.h16 u8 max_state; member
/linux/tools/thermal/tmon/
H A Dsysfs.c99 sysfs_get_ulong(path, "max_state", &cdi->max_state); in probe_cdev()
104 cdi->type, cdi->max_state, cdi->cur_state, cdi->instance); in probe_cdev()
543 if (ptdata.cdi[i].max_state < 10) { in set_ctrl_state()
548 cdev_state = state * ptdata.cdi[i].max_state/100; in set_ctrl_state()
/linux/include/linux/
H A Ddevfreq.h119 unsigned int max_state; member
192 unsigned int max_state; member
/linux/tools/thermal/thermal-engine/
H A Dthermal-engine.c167 static int cdev_add(const char *name, int cdev_id, int max_state, __maybe_unused void *arg) in cdev_add() argument
169 INFO("Cooling device '%s'/%d (max state=%d) added\n", name, cdev_id, max_state); in cdev_add()

12