Home
last modified time | relevance | path

Searched refs:duty_cycle (Results 1 – 25 of 32) sorted by relevance

12

/linux-4.19.296/drivers/media/rc/
Dpwm-ir-tx.c29 unsigned int duty_cycle; member
38 static int pwm_ir_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in pwm_ir_set_duty_cycle() argument
42 pwm_ir->duty_cycle = duty_cycle; in pwm_ir_set_duty_cycle()
69 duty = DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * period, 100); in pwm_ir_tx()
107 pwm_ir->duty_cycle = 50; in pwm_ir_probe()
Dgpio-ir-tx.c29 unsigned int duty_cycle; member
40 static int gpio_ir_tx_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in gpio_ir_tx_set_duty_cycle() argument
44 gpio_ir->duty_cycle = duty_cycle; in gpio_ir_tx_set_duty_cycle()
76 pulse = DIV_ROUND_CLOSEST(gpio_ir->duty_cycle * (NSEC_PER_SEC / 100), in gpio_ir_tx()
78 space = DIV_ROUND_CLOSEST((100 - gpio_ir->duty_cycle) * in gpio_ir_tx()
150 gpio_ir->duty_cycle = 50; in gpio_ir_tx_probe()
Drc-loopback.c72 static int loop_set_tx_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in loop_set_tx_duty_cycle() argument
76 if (duty_cycle < 1 || duty_cycle > 99) { in loop_set_tx_duty_cycle()
77 dprintk("invalid duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle()
81 dprintk("setting duty cycle: %u\n", duty_cycle); in loop_set_tx_duty_cycle()
82 lodev->txduty = duty_cycle; in loop_set_tx_duty_cycle()
Dir-rx51.c36 unsigned int duty_cycle; /* carrier duty cycle */ member
57 duty = DIV_ROUND_CLOSEST(ir_rx51->duty_cycle * period, 100); in init_timing_params()
181 .duty_cycle = 50,
189 ir_rx51->duty_cycle = duty; in ir_rx51_set_duty_cycle()
Dserial_ir.c143 unsigned int duty_cycle; member
193 if (serial_ir.duty_cycle > 50) in send_pulse_irdeo()
233 pulse = DIV_ROUND_CLOSEST(serial_ir.duty_cycle * (NSEC_PER_SEC / 100), in send_pulse_homebrew_softcarrier()
235 space = DIV_ROUND_CLOSEST((100 - serial_ir.duty_cycle) * in send_pulse_homebrew_softcarrier()
575 serial_ir.duty_cycle = 50; in serial_ir_probe()
680 serial_ir.duty_cycle = cycle; in serial_ir_tx_duty_cycle()
Dir-spi.c95 static int ir_spi_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) in ir_spi_set_duty_cycle() argument
98 int bits = (duty_cycle * 15) / 100; in ir_spi_set_duty_cycle()
Dene_ir.c331 int carrier, duty_cycle; in ene_rx_sense_carrier() local
347 duty_cycle = (hperiod * 100) / period; in ene_rx_sense_carrier()
349 carrier, duty_cycle); in ene_rx_sense_carrier()
353 ev.duty_cycle = duty_cycle; in ene_rx_sense_carrier()
911 static int ene_set_tx_duty_cycle(struct rc_dev *rdev, u32 duty_cycle) in ene_set_tx_duty_cycle() argument
914 dbg("TX: setting duty cycle to %d%%", duty_cycle); in ene_set_tx_duty_cycle()
915 dev->tx_duty_cycle = duty_cycle; in ene_set_tx_duty_cycle()
/linux-4.19.296/include/linux/
Dpwm.h60 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()
313 unsigned int duty_cycle; member
343 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config()
[all …]
/linux-4.19.296/drivers/pwm/
Dpwm-twl-led.c72 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; in twl4030_pwmled_config() local
87 if (duty_cycle == 1) in twl4030_pwmled_config()
88 duty_cycle = 2; in twl4030_pwmled_config()
89 else if (duty_cycle > TWL4030_LED_MAX) in twl4030_pwmled_config()
90 duty_cycle = 1; in twl4030_pwmled_config()
94 pwm_config[1] = duty_cycle; in twl4030_pwmled_config()
154 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; in twl6030_pwmled_config() local
158 on_time = duty_cycle & 0xff; in twl6030_pwmled_config()
Dpwm-cros-ec.c99 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()
131 state->duty_cycle = ret; in cros_ec_pwm_get_state()
Dpwm-twl.c74 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1; in twl_pwm_config() local
89 if (duty_cycle == 1) in twl_pwm_config()
90 duty_cycle = 2; in twl_pwm_config()
91 else if (duty_cycle > TWL_PWM_MAX) in twl_pwm_config()
92 duty_cycle = 1; in twl_pwm_config()
96 pwm_config[1] = duty_cycle; in twl_pwm_config()
Dcore.c472 state->duty_cycle > state->period) in pwm_apply_state()
511 state->duty_cycle != pwm->state.duty_cycle) { in pwm_apply_state()
513 state->duty_cycle, in pwm_apply_state()
518 pwm->state.duty_cycle = state->duty_cycle; in pwm_apply_state()
591 state.duty_cycle = 0; in pwm_adjust_config()
603 u64 dutycycle = (u64)state.duty_cycle * pargs.period; in pwm_adjust_config()
606 state.duty_cycle = dutycycle; in pwm_adjust_config()
615 state.duty_cycle = state.period - state.duty_cycle; in pwm_adjust_config()
1000 seq_printf(s, " duty: %u ns", state.duty_cycle); in pwm_dbg_show()
Dpwm-zx.c97 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in zx_pwm_get_state()
168 state->duty_cycle != cstate.duty_cycle) { in zx_pwm_apply()
169 ret = zx_pwm_config(chip, pwm, state->duty_cycle, in zx_pwm_apply()
Dpwm-meson.c177 duty == channel->state.duty_cycle) in meson_pwm_calc()
326 state->duty_cycle != channel->state.duty_cycle || in meson_pwm_apply()
336 state->duty_cycle, state->period); in meson_pwm_apply()
342 channel->state.duty_cycle = state->duty_cycle; in meson_pwm_apply()
Dpwm-hibvt.c142 state->duty_cycle = div_u64(value * 1000, freq); in hibvt_pwm_get_state()
155 state->duty_cycle != pwm->state.duty_cycle) in hibvt_pwm_apply()
156 hibvt_pwm_config(chip, pwm, state->duty_cycle, state->period); in hibvt_pwm_apply()
Dpwm-sun4i.c142 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in sun4i_pwm_get_state()
191 div *= state->duty_cycle; in sun4i_pwm_calculate()
200 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(div, clk_rate); in sun4i_pwm_calculate()
229 (cstate.duty_cycle != state->duty_cycle)) { in sun4i_pwm_apply()
Dsysfs.c88 return sprintf(buf, "%u\n", state.duty_cycle); in duty_cycle_show()
107 state.duty_cycle = val; in duty_cycle_store()
223 return sprintf(buf, "%u %u\n", result.period, result.duty_cycle); in capture_show()
227 static DEVICE_ATTR_RW(duty_cycle);
Dpwm-bcm-iproc.c103 state->duty_cycle = 0; in iproc_pwmc_get_state()
119 state->duty_cycle = div64_u64(tmp, rate); in iproc_pwmc_get_state()
148 value = rate * state->duty_cycle; in iproc_pwmc_apply()
Dpwm-stm32-lp.c79 dty = prd * state->duty_cycle; in stm32_pwm_lp_apply()
186 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, rate); in stm32_pwm_lp_get_state()
Dpwm-lpss.c151 pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); in pwm_lpss_apply()
163 pwm_lpss_prepare(lpwm, pwm, state->duty_cycle, state->period); in pwm_lpss_apply()
Dpwm-rcar.c160 if (!pwm_is_enabled(pwm) && !duty_ns && !pwm->state.duty_cycle) in rcar_pwm_config()
295 rcar_pwm_config(pwm->chip, pwm, pwm->state.duty_cycle, in rcar_pwm_resume()
Dpwm-sti.c366 result->duty_cycle = 0; in sti_pwm_capture()
380 result->duty_cycle = high * NSEC_PER_SEC; in sti_pwm_capture()
381 result->duty_cycle /= effective_ticks; in sti_pwm_capture()
Dpwm-rockchip.c86 state->duty_cycle = DIV_ROUND_CLOSEST_ULL(tmp, clk_rate); in rockchip_pwm_get_state()
123 div = clk_rate * state->duty_cycle; in rockchip_pwm_config()
/linux-4.19.296/include/media/i2c/
Dir-kbd-i2c.h30 unsigned int duty_cycle; member
/linux-4.19.296/include/media/
Drc-core.h225 int (*s_tx_duty_cycle)(struct rc_dev *dev, u32 duty_cycle);
312 u8 duty_cycle; member

12