Home
last modified time | relevance | path

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

12

/drivers/pwm/
Dpwm-omap-dmtimer.c96 int duty_ns, int period_ns) in pwm_omap_dmtimer_config() argument
106 duty_ns, period_ns); in pwm_omap_dmtimer_config()
109 if (duty_ns == pwm_get_duty_cycle(pwm) && in pwm_omap_dmtimer_config()
147 duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns); in pwm_omap_dmtimer_config()
159 duty_ns, clk_rate); in pwm_omap_dmtimer_config()
165 duty_ns, period_ns, clk_rate); in pwm_omap_dmtimer_config()
Dpwm-pca9685.c83 int duty_ns; member
250 int duty_ns, int period_ns) in pca9685_pwm_config() argument
286 pca->duty_ns = duty_ns; in pca9685_pwm_config()
288 if (duty_ns < 1) { in pca9685_pwm_config()
299 if (duty_ns == period_ns) { in pca9685_pwm_config()
326 duty = PCA9685_COUNTER_RANGE * (unsigned long long)duty_ns; in pca9685_pwm_config()
463 pca->duty_ns = 0; in pca9685_pwm_probe()
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()
150 int duty_ns, int period_ns) in rcar_pwm_config() argument
164 if (!pwm_is_enabled(pwm) && !duty_ns && !pwm->state.duty_cycle) in rcar_pwm_config()
169 ret = rcar_pwm_set_counter(rp, div, duty_ns, period_ns); in rcar_pwm_config()
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-samsung.c69 u32 duty_ns; member
307 int duty_ns, int period_ns, bool force_period) in __pwm_samsung_config() argument
335 duty_ns, period_ns, period); in __pwm_samsung_config()
350 tcmp = duty_ns / tin_ns; in __pwm_samsung_config()
382 chan->duty_ns = duty_ns; in __pwm_samsung_config()
388 int duty_ns, int period_ns) in pwm_samsung_config() argument
390 return __pwm_samsung_config(chip, pwm, duty_ns, period_ns, false); in pwm_samsung_config()
622 __pwm_samsung_config(chip, pwm, chan->duty_ns, in pwm_samsung_resume()
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-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-fsl-ftm.c220 unsigned long duty_ns) in fsl_pwm_calculate_duty() argument
226 duty = (unsigned long long)duty_ns * (val + 1); in fsl_pwm_calculate_duty()
233 int duty_ns, int period_ns) in fsl_pwm_config() argument
253 if (!fpc->period_ns && duty_ns) { in fsl_pwm_config()
270 duty = fsl_pwm_calculate_duty(fpc, period_ns, duty_ns); in fsl_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-bfin.c66 int duty_ns, int period_ns) in bfin_pwm_config() argument
76 val = (unsigned long long)period * duty_ns; in bfin_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-jz4740.c80 int duty_ns, int period_ns) in jz4740_pwm_config() argument
101 tmp = (unsigned long long)period * duty_ns; in jz4740_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-mxs.c51 int duty_ns, int period_ns) in mxs_pwm_config() argument
72 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-spear.c78 int duty_ns, int period_ns) in spear_pwm_config() argument
101 val = clk_rate * duty_ns; in spear_pwm_config()
Dpwm-mediatek.c117 int duty_ns, int period_ns) in mtk_pwm_config() argument
143 mtk_pwm_writel(pc, pwm->hwpwm, PWMTHRES, duty_ns / resolution); in mtk_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-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()
/drivers/staging/iio/trigger/
Diio-trig-bfin-timer.h22 unsigned int duty_ns; member

12