/kernel/linux/linux-5.10/drivers/pwm/ |
D | pwm-cros-ec.c | 33 u16 duty_cycle; member 120 u16 duty_cycle; in cros_ec_pwm_apply() local 131 duty_cycle = state->enabled ? state->duty_cycle : 0; in cros_ec_pwm_apply() 133 ret = cros_ec_pwm_set_duty(ec_pwm->ec, pwm->hwpwm, duty_cycle); in cros_ec_pwm_apply() 137 channel->duty_cycle = state->duty_cycle; in cros_ec_pwm_apply() 167 if (ret == 0 && channel->duty_cycle > 0) in cros_ec_pwm_get_state() 168 state->duty_cycle = channel->duty_cycle; in cros_ec_pwm_get_state() 170 state->duty_cycle = ret; in cros_ec_pwm_get_state()
|
D | core.c | 497 s2.duty_cycle = s1.period - s1.duty_cycle; in pwm_apply_state_debug() 505 state->duty_cycle < state->period) in pwm_apply_state_debug() 524 last->duty_cycle > s2.duty_cycle && in pwm_apply_state_debug() 525 last->duty_cycle <= state->duty_cycle) in pwm_apply_state_debug() 528 state->duty_cycle, state->period, in pwm_apply_state_debug() 529 s2.duty_cycle, s2.period, in pwm_apply_state_debug() 530 last->duty_cycle, last->period); in pwm_apply_state_debug() 532 if (state->enabled && state->duty_cycle < s2.duty_cycle) in pwm_apply_state_debug() 535 state->duty_cycle, state->period, in pwm_apply_state_debug() 536 s2.duty_cycle, s2.period); in pwm_apply_state_debug() [all …]
|
D | pwm-twl-led.c | 61 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; in twl4030_pwmled_config() local 76 if (duty_cycle == 1) in twl4030_pwmled_config() 77 duty_cycle = 2; in twl4030_pwmled_config() 78 else if (duty_cycle > TWL4030_LED_MAX) in twl4030_pwmled_config() 79 duty_cycle = 1; in twl4030_pwmled_config() 83 pwm_config[1] = duty_cycle; in twl4030_pwmled_config() 143 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; in twl6030_pwmled_config() local 147 on_time = duty_cycle & 0xff; in twl6030_pwmled_config()
|
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)) 106 state->duty_cycle = SL28CPLD_PWM_TO_DUTY_CYCLE(reg); in sl28cpld_pwm_get_state() 117 state->duty_cycle = min(state->duty_cycle, state->period); in sl28cpld_pwm_get_state() 147 cycle = SL28CPLD_PWM_FROM_DUTY_CYCLE(state->duty_cycle); in sl28cpld_pwm_apply()
|
D | pwm-iqs620a.c | 49 unsigned int duty_cycle; in iqs620_pwm_apply() local 74 duty_cycle = min_t(u64, state->duty_cycle, IQS620_PWM_PERIOD_NS); in iqs620_pwm_apply() 75 duty_scale = duty_cycle * 256 / IQS620_PWM_PERIOD_NS; in iqs620_pwm_apply() 129 state->duty_cycle = DIV_ROUND_UP((iqs620_pwm->duty_val + 1) * in iqs620_pwm_get_state()
|
D | pwm-twl.c | 63 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1; in twl_pwm_config() local 78 if (duty_cycle == 1) in twl_pwm_config() 79 duty_cycle = 2; in twl_pwm_config() 80 else if (duty_cycle > TWL_PWM_MAX) in twl_pwm_config() 81 duty_cycle = 1; in twl_pwm_config() 85 pwm_config[1] = duty_cycle; in twl_pwm_config()
|
D | pwm-sifive.c | 122 state->duty_cycle = in pwm_sifive_get_state() 151 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()
|
D | pwm-imx-tpm.c | 122 real_state->duty_cycle = 0; in pwm_imx_tpm_round_state() 124 real_state->duty_cycle = state->duty_cycle; in pwm_imx_tpm_round_state() 126 tmp = (u64)p->mod * real_state->duty_cycle; in pwm_imx_tpm_round_state() 152 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_get_state() 222 if (state->duty_cycle != c.duty_cycle) { in pwm_imx_tpm_apply_hw()
|
D | pwm-imx27.c | 93 unsigned int duty_cycle; member 167 val = imx->duty_cycle; in pwm_imx27_get_state() 170 state->duty_cycle = DIV_ROUND_UP_ULL(tmp, pwm_clk); in pwm_imx27_get_state() 237 c = clkrate * state->duty_cycle; in pwm_imx27_apply() 272 imx->duty_cycle = duty_cycles; in pwm_imx27_apply()
|
D | pwm-zx.c | 94 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state() 165 state->duty_cycle != cstate.duty_cycle) { in zx_pwm_apply() 166 ret = zx_pwm_config(chip, pwm, state->duty_cycle, in zx_pwm_apply()
|
D | pwm-crc.c | 77 if (pwm_get_duty_cycle(pwm) != state->duty_cycle || in crc_pwm_apply() 79 u64 level = state->duty_cycle * PWM_MAX_LEVEL; in crc_pwm_apply() 148 state->duty_cycle = in crc_pwm_get_state()
|
D | pwm-hibvt.c | 145 state->duty_cycle = div_u64(value * 1000, freq); in hibvt_pwm_get_state() 160 state->duty_cycle != pwm->state.duty_cycle) { in hibvt_pwm_apply() 161 hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period); in hibvt_pwm_apply()
|
/kernel/linux/linux-5.10/drivers/media/rc/ |
D | pwm-ir-tx.c | 21 unsigned int duty_cycle; member 30 static int pwm_ir_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in pwm_ir_set_duty_cycle() argument 34 pwm_ir->duty_cycle = duty_cycle; in pwm_ir_set_duty_cycle() 61 duty = DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * period, 100); in pwm_ir_tx() 99 pwm_ir->duty_cycle = 50; in pwm_ir_probe()
|
D | gpio-ir-tx.c | 21 unsigned int duty_cycle; member 30 static int gpio_ir_tx_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in gpio_ir_tx_set_duty_cycle() argument 34 gpio_ir->duty_cycle = duty_cycle; in gpio_ir_tx_set_duty_cycle() 103 pulse = DIV_ROUND_CLOSEST(gpio_ir->duty_cycle * (NSEC_PER_SEC / 100), in gpio_ir_tx_modulated() 105 space = DIV_ROUND_CLOSEST((100 - gpio_ir->duty_cycle) * in gpio_ir_tx_modulated() 187 gpio_ir->duty_cycle = 50; in gpio_ir_tx_probe()
|
D | rc-loopback.c | 62 static int loop_set_tx_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in loop_set_tx_duty_cycle() argument 66 if (duty_cycle < 1 || duty_cycle > 99) { in loop_set_tx_duty_cycle() 67 dprintk("invalid duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle() 71 dprintk("setting duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle() 72 lodev->txduty = duty_cycle; in loop_set_tx_duty_cycle()
|
D | ir-rx51.c | 27 unsigned int duty_cycle; /* carrier duty cycle */ member 48 duty = DIV_ROUND_CLOSEST(ir_rx51->duty_cycle * period, 100); in init_timing_params() 172 .duty_cycle = 50, 180 ir_rx51->duty_cycle = duty; in ir_rx51_set_duty_cycle()
|
/kernel/linux/linux-5.10/include/linux/ |
D | pwm.h | 60 u64 duty_cycle; member 128 pwm->state.duty_cycle = duty; in pwm_set_duty_cycle() 137 return state.duty_cycle; in pwm_get_duty_cycle() 185 state->duty_cycle = 0; in pwm_init_state() 207 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale, in pwm_get_relative_duty_cycle() 230 pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, in pwm_set_relative_duty_cycle() argument 233 if (!scale || duty_cycle > scale) in pwm_set_relative_duty_cycle() 236 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle * in pwm_set_relative_duty_cycle() 311 unsigned int duty_cycle; member 341 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config() [all …]
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | pwm.h | 20 __field(u64, duty_cycle) 28 __entry->duty_cycle = state->duty_cycle; 34 __entry->pwm, __entry->period, __entry->duty_cycle,
|
/kernel/linux/linux-5.10/drivers/leds/ |
D | leds-lp3944.c | 133 u8 duty_cycle) in lp3944_dim_set_dutycycle() argument 147 if (duty_cycle > LP3944_DUTY_CYCLE_MAX) in lp3944_dim_set_dutycycle() 150 pwm_value = (duty_cycle * 255) / LP3944_DUTY_CYCLE_MAX; in lp3944_dim_set_dutycycle() 229 u8 duty_cycle; in lp3944_led_set_blink() local 248 duty_cycle = 100 * (*delay_on) / period; in lp3944_led_set_blink() 254 duty_cycle = 100 - duty_cycle; in lp3944_led_set_blink() 267 err = lp3944_dim_set_dutycycle(led->client, LP3944_DIM0, duty_cycle); in lp3944_led_set_blink()
|
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()
|
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath9k/ |
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 …]
|
/kernel/linux/linux-5.10/drivers/video/backlight/ |
D | pwm_bl.c | 82 state.duty_cycle = 0; in pwm_backlight_power_off() 93 u64 duty_cycle; in compute_duty_cycle() local 98 duty_cycle = pb->levels[brightness]; in compute_duty_cycle() 100 duty_cycle = brightness; in compute_duty_cycle() 102 duty_cycle *= state.period - lth; in compute_duty_cycle() 103 do_div(duty_cycle, pb->scale); in compute_duty_cycle() 105 return duty_cycle + lth; in compute_duty_cycle() 119 state.duty_cycle = compute_duty_cycle(pb, brightness); in pwm_backlight_update_status()
|
/kernel/linux/linux-5.10/Documentation/userspace-api/media/rc/ |
D | lirc-set-send-duty-cycle.rst | 21 ``int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle)`` 29 ``duty_cycle``
|
/kernel/linux/linux-5.10/drivers/hwmon/ |
D | tc654.c | 126 u8 duty_cycle; /* The DUTY_CYCLE register is a 4-bit read/ member 177 data->duty_cycle = ret & 0x0f; in tc654_update_client() 377 pwm = tc654_pwm_map[data->duty_cycle]; in pwm_show() 402 data->duty_cycle = find_closest(val, tc654_pwm_map, in pwm_store() 410 data->duty_cycle); in pwm_store()
|
/kernel/linux/linux-5.10/drivers/media/i2c/cx25840/ |
D | cx25840-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() 789 p->duty_cycle = 50; in cx25840_ir_rx_s_parameters() 790 o->duty_cycle = p->duty_cycle; in cx25840_ir_rx_s_parameters() 975 p->duty_cycle = cduty_tx_s_duty_cycle(c, p->duty_cycle); in cx25840_ir_tx_s_parameters() 976 o->duty_cycle = p->duty_cycle; in cx25840_ir_tx_s_parameters() 1201 .duty_cycle = 25, /* 25 % - RC-5 carrier */
|