Home
last modified time | relevance | path

Searched refs:duty_ns (Results 1 – 25 of 42) sorted by relevance

12

/Linux-v4.19/drivers/pwm/
Dpwm-stmpe.c104 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()
Dpwm-omap-dmtimer.c97 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()
Dpwm-pca9685.c83 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()
Dpwm-ab8500.c28 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()
Dpwm-rcar.c108 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()
Dpwm-samsung.c69 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()
Dpwm-puv3.c42 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()
Dpwm-brcmstb.c107 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()
Dpwm-twl-led.c70 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()
Dpwm-pxa.c64 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()
Dpwm-crc.c67 int duty_ns, int period_ns) in crc_pwm_config() argument
93 level = duty_ns * PWM_MAX_LEVEL / period_ns; in crc_pwm_config()
Dpwm-fsl-ftm.c244 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()
Dpwm-lpc18xx-sct.c166 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()
Dpwm-clps711x.c69 int duty_ns, int period_ns) in clps711x_pwm_config() argument
77 duty = clps711x_get_duty(pwm, duty_ns); in clps711x_pwm_config()
Dpwm-lpc32xx.c34 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()
Dpwm-jz4740.c87 int duty_ns, int period_ns) in jz4740_pwm_config() argument
108 tmp = (unsigned long long)period * duty_ns; in jz4740_pwm_config()
Dpwm-mxs.c45 int duty_ns, int period_ns) in mxs_pwm_config() argument
66 c *= duty_ns; in mxs_pwm_config()
Dpwm-ep93xx.c71 int duty_ns, int period_ns) in ep93xx_pwm_config() argument
97 c *= duty_ns; in ep93xx_pwm_config()
Dpwm-renesas-tpu.c253 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()
Dpwm-bcm2835.c65 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()
Dpwm-spear.c78 int duty_ns, int period_ns) in spear_pwm_config() argument
101 val = clk_rate * duty_ns; in spear_pwm_config()
Dpwm-lpss.c95 int duty_ns, int period_ns) in pwm_lpss_prepare() argument
113 on_time_div = 255ULL * duty_ns; in pwm_lpss_prepare()
Dpwm-tegra.c80 int duty_ns, int period_ns) in tegra_pwm_config() argument
83 unsigned long long c = duty_ns, hz; in tegra_pwm_config()
Dpwm-imx.c60 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/
Dpwm.h264 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

12