| /linux/drivers/pwm/ |
| H A D | pwm-gpio.c | 52 dividend = dest->duty_cycle; in pwm_gpio_round() 54 dest->duty_cycle -= remainder; in pwm_gpio_round() 65 if (!state->duty_cycle || state->duty_cycle == state->period) { in pwm_gpio_toggle() 71 return level ? state->duty_cycle : state->period - state->duty_cycle; in pwm_gpio_toggle() 87 new_level = !!gpwm->state.duty_cycle; in pwm_gpio_timer() 106 if (state->duty_cycle && state->duty_cycle < hrtimer_resolution) in pwm_gpio_apply() 109 if (state->duty_cycle != state->period && in pwm_gpio_apply() 110 (state->period - state->duty_cycle < hrtimer_resolution)) in pwm_gpio_apply() 144 next_toggle = pwm_gpio_toggle(gpwm, !!state->duty_cycle); in pwm_gpio_apply()
|
| H A D | pwm-sl28cpld.c | 74 #define SL28CPLD_PWM_FROM_DUTY_CYCLE(duty_cycle) \ argument 75 (DIV_ROUND_DOWN_ULL((duty_cycle), NSEC_PER_SEC / SL28CPLD_PWM_CLK)) 108 state->duty_cycle = SL28CPLD_PWM_TO_DUTY_CYCLE(reg); in sl28cpld_pwm_get_state() 119 state->duty_cycle = min(state->duty_cycle, state->period); in sl28cpld_pwm_get_state() 151 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle); in sl28cpld_pwm_apply()
|
| H A D | pwm-iqs620a.c | 71 unsigned int duty_cycle; in iqs620_pwm_apply() local 95 duty_cycle = min_t(u64, state->duty_cycle, IQS620_PWM_PERIOD_NS); in iqs620_pwm_apply() 96 duty_scale = duty_cycle * 256 / IQS620_PWM_PERIOD_NS; in iqs620_pwm_apply() 128 state->duty_cycle = DIV_ROUND_UP(iqs620_pwm->duty_scale * in iqs620_pwm_get_state()
|
| H A D | pwm-adp5585.c | 73 u64 period, duty_cycle; in pwm_adp5585_apply() local 90 duty_cycle = min(state->duty_cycle, period); in pwm_adp5585_apply() 96 on = div_u64(duty_cycle, NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ); in pwm_adp5585_apply() 141 state->duty_cycle = on * (NSEC_PER_SEC / ADP5585_PWM_OSC_FREQ_HZ); in pwm_adp5585_get_state()
|
| H A D | pwm-intel-lgm.c | 66 u32 duty_cycle, val; in lgm_pwm_apply() local 76 duty_cycle = min_t(u64, state->duty_cycle, pc->period); in lgm_pwm_apply() 77 val = duty_cycle * LGM_PWM_MAX_DUTY_CYCLE / pc->period; in lgm_pwm_apply() 100 state->duty_cycle = DIV_ROUND_UP(duty * pc->period, LGM_PWM_MAX_DUTY_CYCLE); in lgm_pwm_get_state()
|
| H A D | pwm-sifive.c | 145 state->duty_cycle = DIV_ROUND_UP_ULL((u64)duty * ddata->real_period, in pwm_sifive_get_state() 157 unsigned int duty_cycle; in pwm_sifive_apply() local 170 duty_cycle = state->duty_cycle; in pwm_sifive_apply() 172 duty_cycle = 0; in pwm_sifive_apply() 180 num = (u64)duty_cycle * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_apply()
|
| H A D | pwm-pxa.c | 106 u64 duty_cycle; in pxa_pwm_apply() local 116 duty_cycle = state->enabled ? state->duty_cycle : 0; in pxa_pwm_apply() 118 err = pxa_pwm_config(chip, pwm, duty_cycle, state->period); in pxa_pwm_apply()
|
| H A D | pwm-microchip-core.c | 143 duty_steps = mul_u64_u64_div_u64(state->duty_cycle, clk_rate, tmp); in mchp_core_pwm_calc_duty() 408 state->duty_cycle = state->period; in mchp_core_pwm_get_state() 412 state->duty_cycle = duty_steps * (prescale + 1) * NSEC_PER_SEC; in mchp_core_pwm_get_state() 413 state->duty_cycle = DIV64_U64_ROUND_UP(state->duty_cycle, rate); in mchp_core_pwm_get_state()
|
| H A D | pwm-dwc-core.c | 52 tmp = DIV_ROUND_CLOSEST_ULL(state->duty_cycle, dwc->clk_ns); in __dwc_pwm_configure_timer() 57 tmp = DIV_ROUND_CLOSEST_ULL(state->period - state->duty_cycle, in __dwc_pwm_configure_timer() 150 state->duty_cycle = duty; in dwc_pwm_get_state()
|
| H A D | pwm-crc.c | 75 if (pwm_get_duty_cycle(pwm) != state->duty_cycle || in crc_pwm_apply() 77 u64 level = state->duty_cycle * PWM_MAX_LEVEL; in crc_pwm_apply() 146 state->duty_cycle = in crc_pwm_get_state()
|
| H A D | pwm-sunplus.c | 106 if (state->duty_cycle == state->period) { in sunplus_pwm_apply() 115 duty = mul_u64_u64_div_u64(state->duty_cycle, clk_rate, in sunplus_pwm_apply() 149 state->duty_cycle = DIV64_U64_ROUND_UP((u64)dd_freq * (u64)duty * NSEC_PER_SEC, in sunplus_pwm_get_state()
|
| H A D | pwm-apple.c | 56 state->duty_cycle, NSEC_PER_SEC); in apple_pwm_apply() 90 state->duty_cycle = DIV64_U64_ROUND_UP((u64)on_cycles * NSEC_PER_SEC, fpwm->clkrate); in apple_pwm_get_state()
|
| /linux/drivers/media/rc/ |
| H A D | pwm-ir-tx.c | 26 u32 duty_cycle; member 39 static int pwm_ir_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in pwm_ir_set_duty_cycle() argument 43 pwm_ir->duty_cycle = duty_cycle; in pwm_ir_set_duty_cycle() 73 pwm_set_relative_duty_cycle(&state, pwm_ir->duty_cycle, 100); in pwm_ir_tx_sleep() 103 pwm_set_relative_duty_cycle(&state, pwm_ir->duty_cycle, 100); in pwm_ir_tx_atomic() 161 pwm_ir->duty_cycle = 50; in pwm_ir_probe()
|
| H A D | meson-ir-tx.c | 72 unsigned int duty_cycle; member 82 unsigned int pulse_cnt = DIV_ROUND_CLOSEST(cnt * ir->duty_cycle, 100); in meson_irtx_set_mod() 228 static int meson_irtx_set_duty_cycle(struct rc_dev *rc, u32 duty_cycle) in meson_irtx_set_duty_cycle() argument 232 ir->duty_cycle = duty_cycle; in meson_irtx_set_duty_cycle() 331 ir->duty_cycle = MIRTX_DEFAULT_DUTY_CYCLE; in meson_irtx_probe()
|
| H A D | serial_ir.c | 136 unsigned int duty_cycle; member 186 if (serial_ir.duty_cycle > 50) in send_pulse_irdeo() 226 pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100), in send_pulse_homebrew_softcarrier() 228 space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) * in send_pulse_homebrew_softcarrier() 568 serial_ir.duty_cycle = 50; in serial_ir_probe() 673 serial_ir.duty_cycle = cycle; in serial_ir_tx_duty_cycle()
|
| /linux/Documentation/translations/zh_CN/scheduler/ |
| H A D | sched-capacity.rst | 132 task_util(p) = duty_cycle(p) 148 可以算出 duty_cycle(p) == 25%。 157 可以算出 duty_cycle(p) == 50%,尽管两次执行中,任务的行为完全一致(也就是说,执行的工作量 162 task_util_freq_inv(p) = duty_cycle(p) * (curr_frequency(cpu) / max_frequency(cpu)) 191 - duty_cycle(p) == 25%,如果任务p在CPU0上按最大频率运行。 192 - duty_cycle(p) == 75%,如果任务p在CPU1上按最大频率运行。 196 task_util_cpu_inv(p) = duty_cycle(p) * (capacity(cpu) / max_capacity) 208 task_util_inv(p) = duty_cycle(p) * ------------------- * -------------
|
| /linux/drivers/video/backlight/ |
| H A D | pwm_bl.c | 78 u64 duty_cycle; in compute_duty_cycle() local 81 duty_cycle = pb->levels[brightness]; in compute_duty_cycle() 83 duty_cycle = brightness; in compute_duty_cycle() 85 duty_cycle *= state->period - lth; in compute_duty_cycle() 86 do_div(duty_cycle, pb->scale); in compute_duty_cycle() 88 return duty_cycle + lth; in compute_duty_cycle() 102 state.duty_cycle = compute_duty_cycle(pb, brightness, &state); in pwm_backlight_update_status() 111 state.duty_cycle = 0; in pwm_backlight_update_status() 624 state.duty_cycle = 0; in pwm_backlight_remove() 640 state.duty_cycle = 0; in pwm_backlight_shutdown() [all …]
|
| /linux/drivers/net/wireless/ath/ath9k/ |
| H A D | mci.c | 106 (100 - btcoex->duty_cycle) / 100; in ath_mci_adjust_aggr_limit() 132 btcoex->duty_cycle = ath_mci_duty_cycle[num_profile]; in ath_mci_update_scheme() 149 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 160 btcoex->duty_cycle = AR_SREV_9565(sc->sc_ah) ? 40 : 35; in ath_mci_update_scheme() 164 btcoex->duty_cycle, btcoex->btcoex_period); in ath_mci_update_scheme() 166 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 174 btcoex->duty_cycle = 30; in ath_mci_update_scheme() 178 btcoex->duty_cycle); in ath_mci_update_scheme() 199 btcoex->duty_cycle += (mci->num_bdr ? ATH_MCI_BDR_DUTY_CYCLE : 0); in ath_mci_update_scheme() 200 if (btcoex->duty_cycle > ATH_MCI_MAX_DUTY_CYCLE) in ath_mci_update_scheme() [all …]
|
| /linux/include/trace/events/ |
| H A D | pwm.h | 141 __field(u64, duty_cycle) 149 __entry->duty_cycle = state->duty_cycle; 156 __entry->period, __entry->duty_cycle,
|
| /linux/drivers/leds/ |
| H A D | leds-cpcap.c | 73 static u16 cpcap_led_val(u8 current_limit, u8 duty_cycle) in cpcap_led_val() argument 76 duty_cycle &= 0x0f; /* 4 bit */ in cpcap_led_val() 78 return current_limit << 4 | duty_cycle; in cpcap_led_val()
|
| /linux/drivers/media/i2c/cx25840/ |
| H A D | cx25840-ir.c | 439 unsigned int duty_cycle) in cduty_tx_s_duty_cycle() argument 442 n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ in cduty_tx_s_duty_cycle() 769 p->duty_cycle = 50; in cx25840_ir_rx_s_parameters() 770 o->duty_cycle = p->duty_cycle; in cx25840_ir_rx_s_parameters() 955 p->duty_cycle = cduty_tx_s_duty_cycle(c, p->duty_cycle); in cx25840_ir_tx_s_parameters() 956 o->duty_cycle = p->duty_cycle; in cx25840_ir_tx_s_parameters() 1181 .duty_cycle = 25, /* 25 % - RC-5 carrier */
|
| /linux/drivers/hwmon/ |
| H A D | pwm-fan.c | 189 state->duty_cycle = 0; in pwm_fan_power_off() 217 update = state->duty_cycle < ctx->pwm_duty_cycle_from_stopped; in __set_pwm() 219 state->duty_cycle = ctx->pwm_duty_cycle_from_stopped; in __set_pwm() 221 state->duty_cycle = DIV_ROUND_UP(pwm * (period - 1), MAX_PWM); in __set_pwm() 228 state->duty_cycle = DIV_ROUND_UP(pwm * (period - 1), MAX_PWM); in __set_pwm() 295 state->duty_cycle = 0; in pwm_fan_update_enable()
|
| H A D | aspeed-g6-pwm-tach.c | 178 state->duty_cycle = DIV_ROUND_UP_ULL(dividend, priv->clk_rate); in aspeed_pwm_get_state() 180 state->duty_cycle = clk_en ? state->period : 0; in aspeed_pwm_get_state() 198 expect_period, state->duty_cycle); in aspeed_pwm_apply() 223 duty_pt = div64_u64(state->duty_cycle * priv->clk_rate, in aspeed_pwm_apply() 226 state->duty_cycle, duty_pt); in aspeed_pwm_apply()
|
| /linux/drivers/media/pci/cx23885/ |
| H A D | cx23888-ir.c | 459 unsigned int duty_cycle) in cduty_tx_s_duty_cycle() argument 462 n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ in cduty_tx_s_duty_cycle() 748 o->duty_cycle = p->duty_cycle = 50; in cx23888_ir_rx_s_parameters() 875 p->duty_cycle = cduty_tx_s_duty_cycle(dev, p->duty_cycle); in cx23888_ir_tx_s_parameters() 876 o->duty_cycle = p->duty_cycle; in cx23888_ir_tx_s_parameters() 1133 .duty_cycle = 25, /* 25 % - RC-5 carrier */
|
| /linux/drivers/regulator/ |
| H A D | pwm-regulator.c | 162 pstate.duty_cycle = pstate.period; in pwm_regulator_get_voltage() 164 pstate.duty_cycle = 0; in pwm_regulator_get_voltage() 343 pstate.duty_cycle = pstate.period; in pwm_regulator_init_boot_on() 345 pstate.duty_cycle = 0; in pwm_regulator_init_boot_on()
|