| /Linux-v5.4/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 32 static int gpio_ir_tx_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in gpio_ir_tx_set_duty_cycle() argument 36 gpio_ir->duty_cycle = duty_cycle; in gpio_ir_tx_set_duty_cycle() 68 pulse = DIV_ROUND_CLOSEST(gpio_ir->duty_cycle * (NSEC_PER_SEC / 100), in gpio_ir_tx() 70 space = DIV_ROUND_CLOSEST((100 - gpio_ir->duty_cycle) * in gpio_ir_tx() 147 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()
|
| D | serial_ir.c | 135 unsigned int duty_cycle; member 185 if (serial_ir.duty_cycle > 50) in send_pulse_irdeo() 225 pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100), in send_pulse_homebrew_softcarrier() 227 space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) * in send_pulse_homebrew_softcarrier() 567 serial_ir.duty_cycle = 50; in serial_ir_probe() 672 serial_ir.duty_cycle = cycle; in serial_ir_tx_duty_cycle()
|
| /Linux-v5.4/include/linux/ |
| D | pwm.h | 60 unsigned int duty_cycle; member 126 pwm->state.duty_cycle = duty; in pwm_set_duty_cycle() 135 return state.duty_cycle; in pwm_get_duty_cycle() 183 state->duty_cycle = 0; in pwm_init_state() 205 return DIV_ROUND_CLOSEST_ULL((u64)state->duty_cycle * scale, in pwm_get_relative_duty_cycle() 228 pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle, in pwm_set_relative_duty_cycle() argument 231 if (!scale || duty_cycle > scale) in pwm_set_relative_duty_cycle() 234 state->duty_cycle = DIV_ROUND_CLOSEST_ULL((u64)duty_cycle * in pwm_set_relative_duty_cycle() 312 unsigned int duty_cycle; member 342 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config() [all …]
|
| /Linux-v5.4/drivers/pwm/ |
| 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-cros-ec.c | 99 int duty_cycle; in cros_ec_pwm_apply() local 109 duty_cycle = state->enabled ? state->duty_cycle : 0; in cros_ec_pwm_apply() 111 return cros_ec_pwm_set_duty(ec_pwm->ec, pwm->hwpwm, duty_cycle); in cros_ec_pwm_apply() 130 state->duty_cycle = ret; in cros_ec_pwm_get_state()
|
| D | core.c | 459 state->duty_cycle > state->period) in pwm_apply_state() 465 state->duty_cycle == pwm->state.duty_cycle && in pwm_apply_state() 503 state->duty_cycle != pwm->state.duty_cycle) { in pwm_apply_state() 505 state->duty_cycle, in pwm_apply_state() 510 pwm->state.duty_cycle = state->duty_cycle; in pwm_apply_state() 583 state.duty_cycle = 0; in pwm_adjust_config() 595 u64 dutycycle = (u64)state.duty_cycle * pargs.period; in pwm_adjust_config() 598 state.duty_cycle = dutycycle; in pwm_adjust_config() 607 state.duty_cycle = state.period - state.duty_cycle; in pwm_adjust_config() 1160 seq_printf(s, " duty: %u ns", state.duty_cycle); in pwm_dbg_show()
|
| D | pwm-sifive.c | 125 state->duty_cycle = in pwm_sifive_get_state() 154 unsigned int duty_cycle; in pwm_sifive_apply() local 173 duty_cycle = state->duty_cycle; in pwm_sifive_apply() 175 duty_cycle = 0; in pwm_sifive_apply() 183 num = (u64)duty_cycle * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_apply()
|
| 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-imx-tpm.c | 124 real_state->duty_cycle = 0; in pwm_imx_tpm_round_state() 126 real_state->duty_cycle = state->duty_cycle; in pwm_imx_tpm_round_state() 128 tmp = (u64)p->mod * real_state->duty_cycle; in pwm_imx_tpm_round_state() 154 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in pwm_imx_tpm_get_state() 224 if (state->duty_cycle != c.duty_cycle) { in pwm_imx_tpm_apply_hw()
|
| D | pwm-sprd.c | 111 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, chn->clk_rate); in sprd_pwm_get_state() 184 state->duty_cycle != cstate->duty_cycle) { in sprd_pwm_apply() 185 ret = sprd_pwm_config(spc, pwm, state->duty_cycle, in sprd_pwm_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-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()
|
| D | pwm-sun4i.c | 141 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state() 190 div *= state->duty_cycle; in sun4i_pwm_calculate() 222 (cstate.duty_cycle != state->duty_cycle)) { in sun4i_pwm_apply()
|
| D | pwm-lpss.c | 138 pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); in pwm_lpss_apply() 150 pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); in pwm_lpss_apply() 185 state->duty_cycle = on_time_div; in pwm_lpss_get_state()
|
| /Linux-v5.4/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()
|
| /Linux-v5.4/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 …]
|
| /Linux-v5.4/drivers/video/backlight/ |
| D | pwm_bl.c | 83 state.duty_cycle = 0; in pwm_backlight_power_off() 94 u64 duty_cycle; in compute_duty_cycle() local 99 duty_cycle = pb->levels[brightness]; in compute_duty_cycle() 101 duty_cycle = brightness; in compute_duty_cycle() 103 duty_cycle *= state.period - lth; in compute_duty_cycle() 104 do_div(duty_cycle, pb->scale); in compute_duty_cycle() 106 return duty_cycle + lth; in compute_duty_cycle() 125 state.duty_cycle = compute_duty_cycle(pb, brightness); in pwm_backlight_update_status()
|
| /Linux-v5.4/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()
|
| /Linux-v5.4/Documentation/media/uapi/rc/ |
| D | lirc-set-send-duty-cycle.rst | 25 .. c:function:: int ioctl( int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle) 34 ``duty_cycle``
|
| /Linux-v5.4/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 */
|
| /Linux-v5.4/drivers/media/pci/cx23885/ |
| D | cx23888-ir.c | 479 unsigned int duty_cycle) in cduty_tx_s_duty_cycle() argument 482 n = DIV_ROUND_CLOSEST(duty_cycle * 100, 625); /* 16ths of 100% */ in cduty_tx_s_duty_cycle() 768 o->duty_cycle = p->duty_cycle = 50; in cx23888_ir_rx_s_parameters() 895 p->duty_cycle = cduty_tx_s_duty_cycle(dev, p->duty_cycle); in cx23888_ir_tx_s_parameters() 896 o->duty_cycle = p->duty_cycle; in cx23888_ir_tx_s_parameters() 1153 .duty_cycle = 25, /* 25 % - RC-5 carrier */
|