/Linux-v4.19/drivers/pwm/ |
D | pwm-stmpe.c | 104 int duty_ns, int period_ns) in stmpe_24xx_pwm_config() argument 157 pwm->hwpwm, duty_ns, period_ns); in stmpe_24xx_pwm_config() 159 if (duty_ns == 0) { in stmpe_24xx_pwm_config() 167 } else if (duty_ns == period_ns) { in stmpe_24xx_pwm_config() 190 duty = duty_ns * 256; in stmpe_24xx_pwm_config()
|
D | pwm-omap-dmtimer.c | 97 int duty_ns, int period_ns) in pwm_omap_dmtimer_config() argument 107 duty_ns, period_ns); in pwm_omap_dmtimer_config() 110 if (duty_ns == pwm_get_duty_cycle(pwm) && in pwm_omap_dmtimer_config() 148 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config() 160 duty_ns, clk_rate); in pwm_omap_dmtimer_config() 166 duty_ns, period_ns, clk_rate); in pwm_omap_dmtimer_config()
|
D | pwm-pca9685.c | 83 int duty_ns; member 255 int duty_ns, int period_ns) in pca9685_pwm_config() argument 291 pca->duty_ns = duty_ns; in pca9685_pwm_config() 293 if (duty_ns < 1) { in pca9685_pwm_config() 304 if (duty_ns == period_ns) { in pca9685_pwm_config() 331 duty = PCA9685_COUNTER_RANGE * (unsigned long long)duty_ns; in pca9685_pwm_config() 468 pca->duty_ns = 0; in pca9685_pwm_probe()
|
D | pwm-ab8500.c | 28 int duty_ns, int period_ns) in ab8500_pwm_config() argument 38 lower_val = duty_ns & 0x00FF; in ab8500_pwm_config() 43 higher_val = ((duty_ns & 0x0300) >> 8); in ab8500_pwm_config()
|
D | pwm-rcar.c | 108 static int rcar_pwm_set_counter(struct rcar_pwm_chip *rp, int div, int duty_ns, in rcar_pwm_set_counter() argument 122 tmp = duty_ns * 100ULL; in rcar_pwm_set_counter() 146 int duty_ns, int period_ns) in rcar_pwm_config() argument 160 if (!pwm_is_enabled(pwm) && !duty_ns && !pwm->state.duty_cycle) in rcar_pwm_config() 165 ret = rcar_pwm_set_counter(rp, div, duty_ns, period_ns); in rcar_pwm_config()
|
D | pwm-samsung.c | 69 u32 duty_ns; member 308 int duty_ns, int period_ns, bool force_period) in __pwm_samsung_config() argument 336 duty_ns, period_ns, period); in __pwm_samsung_config() 351 tcmp = duty_ns / tin_ns; in __pwm_samsung_config() 383 chan->duty_ns = duty_ns; in __pwm_samsung_config() 389 int duty_ns, int period_ns) in pwm_samsung_config() argument 391 return __pwm_samsung_config(chip, pwm, duty_ns, period_ns, false); in pwm_samsung_config() 623 __pwm_samsung_config(chip, pwm, chan->duty_ns, in pwm_samsung_resume()
|
D | pwm-puv3.c | 42 int duty_ns, int period_ns) in puv3_pwm_config() argument 62 if (duty_ns == period_ns) in puv3_pwm_config() 65 dc = (pv + 1) * duty_ns / period_ns; in puv3_pwm_config()
|
D | pwm-brcmstb.c | 107 int duty_ns, int period_ns) in brcmstb_pwm_config() argument 119 if (duty_ns == period_ns) { in brcmstb_pwm_config() 139 tmp = (duty_ns + 1) * rate; in brcmstb_pwm_config() 147 if (pc == PWM_PERIOD_MIN || (dc < PWM_ON_MIN && duty_ns)) in brcmstb_pwm_config()
|
D | pwm-twl-led.c | 70 int duty_ns, int period_ns) in twl4030_pwmled_config() argument 72 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; in twl4030_pwmled_config() 152 int duty_ns, int period_ns) in twl6030_pwmled_config() argument 154 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; in twl6030_pwmled_config()
|
D | pwm-pxa.c | 64 int duty_ns, int period_ns) in pxa_pwm_config() argument 87 if (duty_ns == period_ns) in pxa_pwm_config() 90 dc = (pv + 1) * duty_ns / period_ns; in pxa_pwm_config()
|
D | pwm-crc.c | 67 int duty_ns, int period_ns) in crc_pwm_config() argument 93 level = duty_ns * PWM_MAX_LEVEL / period_ns; in crc_pwm_config()
|
D | pwm-fsl-ftm.c | 244 unsigned long duty_ns) in fsl_pwm_calculate_duty() argument 250 duty = (unsigned long long)duty_ns * (val + 1); in fsl_pwm_calculate_duty() 257 int duty_ns, int period_ns) in fsl_pwm_config() argument 277 if (!fpc->period_ns && duty_ns) { in fsl_pwm_config() 294 duty = fsl_pwm_calculate_duty(fpc, period_ns, duty_ns); in fsl_pwm_config()
|
D | pwm-lpc18xx-sct.c | 166 struct pwm_device *pwm, int duty_ns) in lpc18xx_pwm_config_duty() argument 172 val = (u64)duty_ns * lpc18xx_pwm->clk_rate; in lpc18xx_pwm_config_duty() 185 int duty_ns, int period_ns) in lpc18xx_pwm_config() argument 224 lpc18xx_pwm_config_duty(chip, pwm, duty_ns); in lpc18xx_pwm_config()
|
D | pwm-clps711x.c | 69 int duty_ns, int period_ns) in clps711x_pwm_config() argument 77 duty = clps711x_get_duty(pwm, duty_ns); in clps711x_pwm_config()
|
D | pwm-lpc32xx.c | 34 int duty_ns, int period_ns) in lpc32xx_pwm_config() argument 51 duty_cycles = div64_u64((unsigned long long)(period_ns - duty_ns) * 256, in lpc32xx_pwm_config()
|
D | pwm-jz4740.c | 87 int duty_ns, int period_ns) in jz4740_pwm_config() argument 108 tmp = (unsigned long long)period * duty_ns; in jz4740_pwm_config()
|
D | pwm-mxs.c | 45 int duty_ns, int period_ns) in mxs_pwm_config() argument 66 c *= duty_ns; in mxs_pwm_config()
|
D | pwm-ep93xx.c | 71 int duty_ns, int period_ns) in ep93xx_pwm_config() argument 97 c *= duty_ns; in ep93xx_pwm_config()
|
D | pwm-renesas-tpu.c | 253 int duty_ns, int period_ns) in tpu_pwm_config() argument 283 if (duty_ns) { in tpu_pwm_config() 285 / (NSEC_PER_SEC / duty_ns); in tpu_pwm_config()
|
D | pwm-bcm2835.c | 65 int duty_ns, int period_ns) in bcm2835_pwm_config() argument 84 writel(duty_ns / scaler, pc->base + DUTY(pwm->hwpwm)); in bcm2835_pwm_config()
|
D | pwm-spear.c | 78 int duty_ns, int period_ns) in spear_pwm_config() argument 101 val = clk_rate * duty_ns; in spear_pwm_config()
|
D | pwm-lpss.c | 95 int duty_ns, int period_ns) in pwm_lpss_prepare() argument 113 on_time_div = 255ULL * duty_ns; in pwm_lpss_prepare()
|
D | pwm-tegra.c | 80 int duty_ns, int period_ns) in tegra_pwm_config() argument 83 unsigned long long c = duty_ns, hz; in tegra_pwm_config()
|
D | pwm-imx.c | 60 struct pwm_device *pwm, int duty_ns, int period_ns) in imx_pwm_config_v1() argument 82 u32 p = max * duty_ns / period_ns; in imx_pwm_config_v1()
|
/Linux-v4.19/include/linux/ |
D | pwm.h | 264 int duty_ns, int period_ns); 331 static inline int pwm_config(struct pwm_device *pwm, int duty_ns, in pwm_config() argument 339 if (duty_ns < 0 || period_ns < 0) in pwm_config() 343 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config() 346 state.duty_cycle = duty_ns; in pwm_config() 473 static inline int pwm_config(struct pwm_device *pwm, int duty_ns, in pwm_config() argument
|