/linux/drivers/pwm/ |
A D | pwm-omap-dmtimer.c | 153 int duty_ns, int period_ns) in pwm_omap_dmtimer_config() argument 162 duty_ns, period_ns); in pwm_omap_dmtimer_config() 164 if (duty_ns == pwm_get_duty_cycle(pwm) && in pwm_omap_dmtimer_config() 199 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config() 211 duty_ns, clk_rate); in pwm_omap_dmtimer_config() 217 duty_ns, period_ns, clk_rate); in pwm_omap_dmtimer_config()
|
A D | pwm-stmpe.c | 100 int duty_ns, int period_ns) in stmpe_24xx_pwm_config() argument 153 pwm->hwpwm, duty_ns, period_ns); in stmpe_24xx_pwm_config() 155 if (duty_ns == 0) { in stmpe_24xx_pwm_config() 163 } else if (duty_ns == period_ns) { in stmpe_24xx_pwm_config() 186 duty = duty_ns * 256; in stmpe_24xx_pwm_config()
|
A D | pwm-samsung.c | 66 u32 duty_ns; member 318 int duty_ns, int period_ns, bool force_period) in __pwm_samsung_config() argument 346 duty_ns, period_ns, period); in __pwm_samsung_config() 361 tcmp = duty_ns / tin_ns; in __pwm_samsung_config() 393 chan->duty_ns = duty_ns; in __pwm_samsung_config() 399 int duty_ns, int period_ns) in pwm_samsung_config() argument 401 return __pwm_samsung_config(chip, pwm, duty_ns, period_ns, false); in pwm_samsung_config() 624 __pwm_samsung_config(chip, pwm, chan->duty_ns, in pwm_samsung_resume()
|
A D | pwm-brcmstb.c | 98 int duty_ns, int period_ns) in brcmstb_pwm_config() argument 110 if (duty_ns == period_ns) { in brcmstb_pwm_config() 130 tmp = (duty_ns + 1) * rate; in brcmstb_pwm_config() 138 if (pc == PWM_PERIOD_MIN || (dc < PWM_ON_MIN && duty_ns)) in brcmstb_pwm_config()
|
A D | pwm-twl-led.c | 59 int duty_ns, int period_ns) in twl4030_pwmled_config() argument 61 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL4030_LED_MAX, period_ns) + 1; in twl4030_pwmled_config() 141 int duty_ns, int period_ns) in twl6030_pwmled_config() argument 143 int duty_cycle = (duty_ns * TWL6030_LED_MAX) / period_ns; in twl6030_pwmled_config()
|
A D | pwm-pxa.c | 61 int duty_ns, int period_ns) in pxa_pwm_config() argument 84 if (duty_ns == period_ns) in pxa_pwm_config() 87 dc = (pv + 1) * duty_ns / period_ns; in pxa_pwm_config()
|
A D | pwm-lpc18xx-sct.c | 163 struct pwm_device *pwm, int duty_ns) in lpc18xx_pwm_config_duty() argument 169 val = (u64)duty_ns * lpc18xx_pwm->clk_rate; in lpc18xx_pwm_config_duty() 182 int duty_ns, int period_ns) in lpc18xx_pwm_config() argument 221 lpc18xx_pwm_config_duty(chip, pwm, duty_ns); in lpc18xx_pwm_config()
|
A D | pwm-imx1.c | 64 struct pwm_device *pwm, int duty_ns, int period_ns) in pwm_imx1_config() argument 87 p = max * duty_ns / period_ns; in pwm_imx1_config()
|
A D | pwm-lpc32xx.c | 30 int duty_ns, int period_ns) in lpc32xx_pwm_config() argument 47 duty_cycles = div64_u64((unsigned long long)(period_ns - duty_ns) * 256, in lpc32xx_pwm_config()
|
A D | pwm-clps711x.c | 64 int duty_ns, int period_ns) in clps711x_pwm_config() argument 72 duty = clps711x_get_duty(pwm, duty_ns); in clps711x_pwm_config()
|
A D | pwm-renesas-tpu.c | 245 int duty_ns, int period_ns) in tpu_pwm_config() argument 275 if (duty_ns) { in tpu_pwm_config() 277 / (NSEC_PER_SEC / duty_ns); in tpu_pwm_config()
|
A D | pwm-rcar.c | 106 static int rcar_pwm_set_counter(struct rcar_pwm_chip *rp, int div, int duty_ns, in rcar_pwm_set_counter() argument 120 tmp = duty_ns * 100ULL; in rcar_pwm_set_counter()
|
A D | pwm-spear.c | 78 u64 duty_ns, u64 period_ns) in spear_pwm_config() argument 101 val = clk_rate * duty_ns; in spear_pwm_config()
|
A D | pwm-tegra.c | 96 int duty_ns, int period_ns) in tegra_pwm_config() argument 99 unsigned long long c = duty_ns, hz; in tegra_pwm_config()
|
A D | pwm-lpss.c | 88 int duty_ns, int period_ns) in pwm_lpss_prepare() argument 108 on_time_div = 255ULL * duty_ns; in pwm_lpss_prepare()
|
A D | pwm-bcm-kona.c | 112 int duty_ns, int period_ns) in kona_pwmc_config() argument 137 val = rate * duty_ns; in kona_pwmc_config()
|
A D | pwm-lp3943.c | 96 int duty_ns, int period_ns) in lp3943_pwm_config() argument 128 val = (u8)(duty_ns * LP3943_MAX_DUTY / period_ns); in lp3943_pwm_config()
|
A D | pwm-sprd.c | 119 int duty_ns, int period_ns) in sprd_pwm_config() argument 135 duty = duty_ns * SPRD_PWM_MOD_MAX / period_ns; in sprd_pwm_config()
|
A D | pwm-vt8500.c | 73 int duty_ns, int period_ns) in vt8500_pwm_config() argument 104 c = (unsigned long long)pv * duty_ns; in vt8500_pwm_config()
|
A D | pwm-mediatek.c | 118 int duty_ns, int period_ns) in pwm_mediatek_config() argument 162 cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); in pwm_mediatek_config()
|
A D | pwm-berlin.c | 91 u64 duty_ns, u64 period_ns) in berlin_pwm_config() argument 111 cycles *= duty_ns; in berlin_pwm_config()
|
A D | pwm-tiecap.c | 51 int duty_ns, int period_ns, int enabled) in ecap_pwm_config() argument 68 c = c * duty_ns; in ecap_pwm_config()
|
A D | pwm-sti.c | 164 int duty_ns, int period_ns) in sti_pwm_config() argument 227 value = cdata->max_pwm_cnt * duty_ns / period_ns; in sti_pwm_config() 239 prescale, period_ns, duty_ns, value); in sti_pwm_config()
|
/linux/include/linux/ |
A D | pwm.h | 282 int duty_ns, int period_ns); 340 static inline int pwm_config(struct pwm_device *pwm, int duty_ns, in pwm_config() argument 348 if (duty_ns < 0 || period_ns < 0) in pwm_config() 352 if (state.duty_cycle == duty_ns && state.period == period_ns) in pwm_config() 355 state.duty_cycle = duty_ns; in pwm_config() 453 static inline int pwm_config(struct pwm_device *pwm, int duty_ns, in pwm_config() argument
|
/linux/drivers/staging/greybus/ |
A D | pwm.c | 208 int duty_ns, int period_ns) in gb_pwm_config() argument 212 return gb_pwm_config_operation(pwmc, pwm->hwpwm, duty_ns, period_ns); in gb_pwm_config()
|