Searched refs:duty_cycles (Results 1 – 8 of 8) sorted by relevance
/Linux-v5.4/drivers/pwm/ |
D | pwm-lpc32xx.c | 34 int period_cycles, duty_cycles; in lpc32xx_pwm_config() local 47 duty_cycles = div64_u64((unsigned long long)(period_ns - duty_ns) * 256, in lpc32xx_pwm_config() 49 if (!duty_cycles) in lpc32xx_pwm_config() 50 duty_cycles = 1; in lpc32xx_pwm_config() 51 if (duty_cycles > 255) in lpc32xx_pwm_config() 52 duty_cycles = 255; in lpc32xx_pwm_config() 56 val |= (period_cycles << 8) | duty_cycles; in lpc32xx_pwm_config()
|
D | pwm-omap-dmtimer.c | 97 u32 period_cycles, duty_cycles; in pwm_omap_dmtimer_config() local 145 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config() 154 if (duty_cycles < 1) { in pwm_omap_dmtimer_config() 159 duty_cycles = 1; in pwm_omap_dmtimer_config() 160 } else if (duty_cycles >= period_cycles) { in pwm_omap_dmtimer_config() 165 duty_cycles = period_cycles - 1; in pwm_omap_dmtimer_config() 169 DIV_ROUND_CLOSEST_ULL((u64)NSEC_PER_SEC * duty_cycles, in pwm_omap_dmtimer_config() 175 match_value = load_value + duty_cycles - 1; in pwm_omap_dmtimer_config()
|
D | pwm-ep93xx.c | 68 unsigned long duty_cycles; in ep93xx_pwm_config() local 90 duty_cycles = c; in ep93xx_pwm_config() 92 if (period_cycles < 0x10000 && duty_cycles < 0x10000) { in ep93xx_pwm_config() 98 writew(duty_cycles, base + EP93XX_PWMx_DUTY_CYCLE); in ep93xx_pwm_config() 100 writew(duty_cycles, base + EP93XX_PWMx_DUTY_CYCLE); in ep93xx_pwm_config()
|
D | pwm-tiecap.c | 54 u32 period_cycles, duty_cycles; in ecap_pwm_config() local 68 duty_cycles = 1; in ecap_pwm_config() 73 duty_cycles = (u32)c; in ecap_pwm_config() 87 writel(duty_cycles, pc->mmio_base + CAP2); in ecap_pwm_config() 95 writel(duty_cycles, pc->mmio_base + CAP4); in ecap_pwm_config()
|
D | pwm-mxs.c | 49 unsigned int period_cycles, duty_cycles; in mxs_pwm_config() local 68 duty_cycles = c; in mxs_pwm_config() 80 writel(duty_cycles << 16, in mxs_pwm_config()
|
D | pwm-tiehrpwm.c | 222 u32 period_cycles, duty_cycles; in ehrpwm_pwm_config() local 237 duty_cycles = 1; in ehrpwm_pwm_config() 242 duty_cycles = (unsigned long)c; in ehrpwm_pwm_config() 282 duty_cycles = duty_cycles / ps_divval; in ehrpwm_pwm_config() 300 ehrpwm_write(pc->mmio_base, cmp_reg, duty_cycles); in ehrpwm_pwm_config()
|
D | pwm-zx.c | 101 unsigned int period_cycles, duty_cycles; in zx_pwm_config() local 127 duty_cycles = c; in zx_pwm_config() 140 zx_pwm_writel(zpc, pwm->hwpwm, ZX_PWM_DUTY, duty_cycles); in zx_pwm_config()
|
D | pwm-imx27.c | 214 unsigned long period_cycles, duty_cycles, prescale; in pwm_imx27_apply() local 235 duty_cycles = c; in pwm_imx27_apply() 261 writel(duty_cycles, imx->mmio_base + MX3_PWMSAR); in pwm_imx27_apply()
|