/linux-4.1.27/drivers/pwm/ |
D | pwm-fsl-ftm.c | 89 int period_ns; member 149 unsigned long period_ns) in fsl_pwm_calculate_cycles() argument 154 c = c * period_ns; in fsl_pwm_calculate_cycles() 168 unsigned long period_ns, in fsl_pwm_calculate_period_cycles() argument 181 return fsl_pwm_calculate_cycles(fpc, period_ns); in fsl_pwm_calculate_period_cycles() 185 unsigned long period_ns) in fsl_pwm_calculate_period() argument 190 cycles = fsl_pwm_calculate_period_cycles(fpc, period_ns, in fsl_pwm_calculate_period() 208 cycles = fsl_pwm_calculate_period_cycles(fpc, period_ns, m0); in fsl_pwm_calculate_period() 216 return fsl_pwm_calculate_period_cycles(fpc, period_ns, m1); in fsl_pwm_calculate_period() 220 unsigned long period_ns, in fsl_pwm_calculate_duty() argument [all …]
|
D | pwm-imx.c | 59 struct pwm_device *pwm, int duty_ns, int period_ns); 66 struct pwm_device *pwm, int duty_ns, int period_ns) in imx_pwm_config_v1() argument 88 u32 p = max * duty_ns / period_ns; in imx_pwm_config_v1() 110 struct pwm_device *pwm, int duty_ns, int period_ns) in imx_pwm_config_v2() argument 152 c = c * period_ns; in imx_pwm_config_v2() 160 do_div(c, period_ns); in imx_pwm_config_v2() 203 struct pwm_device *pwm, int duty_ns, int period_ns) in imx_pwm_config() argument 212 ret = imx->config(chip, pwm, duty_ns, period_ns); in imx_pwm_config() 251 struct pwm_device *pwm, int duty_ns, int period_ns);
|
D | pwm-samsung.c | 67 u32 period_ns; member 292 int duty_ns, int period_ns) in pwm_samsung_config() argument 303 if (period_ns > NSEC_PER_SEC) in pwm_samsung_config() 306 if (period_ns == chan->period_ns && duty_ns == chan->duty_ns) in pwm_samsung_config() 316 if (chan->period_ns != period_ns) { in pwm_samsung_config() 320 period = NSEC_PER_SEC / period_ns; in pwm_samsung_config() 323 duty_ns, period_ns, period); in pwm_samsung_config() 330 tcnt = period_ns / tin_ns; in pwm_samsung_config() 368 chan->period_ns = period_ns; in pwm_samsung_config() 602 chan->period_ns = 0; in pwm_samsung_suspend()
|
D | pwm-puv3.c | 42 int duty_ns, int period_ns) in puv3_pwm_config() argument 49 c = c * period_ns; in puv3_pwm_config() 62 if (duty_ns == period_ns) in puv3_pwm_config() 65 dc = (pv + 1) * duty_ns / period_ns; in puv3_pwm_config()
|
D | pwm-tegra.c | 67 int duty_ns, int period_ns) in tegra_pwm_config() argument 80 c = duty_ns * ((1 << PWM_DUTY_WIDTH) - 1) + period_ns / 2; in tegra_pwm_config() 81 do_div(c, period_ns); in tegra_pwm_config() 90 hz = NSEC_PER_SEC / period_ns; in tegra_pwm_config()
|
D | pwm-pxa.c | 64 int duty_ns, int period_ns) in pxa_pwm_config() argument 75 c = c * period_ns; in pxa_pwm_config() 87 if (duty_ns == period_ns) in pxa_pwm_config() 90 dc = (pv + 1) * duty_ns / period_ns; in pxa_pwm_config()
|
D | pwm-lp3943.c | 99 int duty_ns, int period_ns) in lp3943_pwm_config() argument 124 period_ns = clamp(period_ns, LP3943_MIN_PERIOD, LP3943_MAX_PERIOD); in lp3943_pwm_config() 125 val = (u8)(period_ns / LP3943_MIN_PERIOD - 1); in lp3943_pwm_config() 131 val = (u8)(duty_ns * LP3943_MAX_DUTY / period_ns); in lp3943_pwm_config()
|
D | pwm-img.c | 89 int duty_ns, int period_ns) in img_pwm_config() argument 96 if (period_ns < pwm_chip->min_period_ns || in img_pwm_config() 97 period_ns > pwm_chip->max_period_ns) { in img_pwm_config() 103 output_clk_hz = DIV_ROUND_UP(NSEC_PER_SEC, period_ns); in img_pwm_config() 124 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
|
D | pwm-bcm2835.c | 66 int duty_ns, int period_ns) in bcm2835_pwm_config() argument 70 if (period_ns <= MIN_PERIOD) { in bcm2835_pwm_config() 72 period_ns, MIN_PERIOD); in bcm2835_pwm_config() 77 writel(period_ns / pc->scaler, pc->base + PERIOD(pwm->hwpwm)); in bcm2835_pwm_config()
|
D | pwm-bfin.c | 66 int duty_ns, int period_ns) in bfin_pwm_config() argument 72 val = (unsigned long long)get_sclk() * period_ns; in bfin_pwm_config() 77 do_div(val, period_ns); in bfin_pwm_config()
|
D | pwm-lpss.c | 56 int duty_ns, int period_ns) in pwm_lpss_config() argument 64 do_div(freq, period_ns); in pwm_lpss_config() 80 on_time_div = 255 - (255 * duty_ns / period_ns); in pwm_lpss_config()
|
D | pwm-atmel-hlcdc.c | 54 int duty_ns, int period_ns) in atmel_hlcdc_pwm_config() argument 76 clk_period_ns > period_ns) { in atmel_hlcdc_pwm_config() 91 if ((clk_period_ns << pres) >= period_ns) in atmel_hlcdc_pwm_config() 120 do_div(pwmcval, period_ns); in atmel_hlcdc_pwm_config()
|
D | pwm-sti.c | 116 int duty_ns, int period_ns) in sti_pwm_config() argument 129 period_same = (period_ns == pwm_get_period(cur)); in sti_pwm_config() 152 ret = sti_pwm_get_prescale(pc, period_ns, &prescale); in sti_pwm_config() 175 pwmvalx = cdata->max_pwm_cnt * duty_ns / period_ns; in sti_pwm_config() 187 prescale, period_ns, duty_ns, pwmvalx); in sti_pwm_config()
|
D | pwm-jz4740.c | 109 int duty_ns, int period_ns) in jz4740_pwm_config() argument 118 tmp = (unsigned long long)clk_get_rate(jz4740->clk) * period_ns; in jz4740_pwm_config() 131 do_div(tmp, period_ns); in jz4740_pwm_config()
|
D | pwm-lpc32xx.c | 35 int duty_ns, int period_ns) in lpc32xx_pwm_config() argument 43 c = c * period_ns; in lpc32xx_pwm_config() 67 do_div(c, period_ns); in lpc32xx_pwm_config()
|
D | pwm-mxs.c | 51 int duty_ns, int period_ns) in mxs_pwm_config() argument 62 c = c * period_ns; in mxs_pwm_config() 73 do_div(c, period_ns); in mxs_pwm_config()
|
D | pwm-ep93xx.c | 71 int duty_ns, int period_ns) in ep93xx_pwm_config() argument 92 c *= period_ns; in ep93xx_pwm_config() 98 do_div(c, period_ns); in ep93xx_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-atmel.c | 102 int duty_ns, int period_ns) in atmel_pwm_config() argument 111 if (test_bit(PWMF_ENABLED, &pwm->flags) && (period_ns != pwm->period)) { in atmel_pwm_config() 117 div = (unsigned long long)clk_get_rate(atmel_pwm->clk) * period_ns; in atmel_pwm_config() 133 do_div(div, period_ns); in atmel_pwm_config()
|
D | pwm-sun4i.c | 99 int duty_ns, int period_ns) in sun4i_pwm_config() argument 117 div = clk_rate * period_ns + NSEC_PER_SEC/2; in sun4i_pwm_config() 130 div = div * period_ns; in sun4i_pwm_config() 144 do_div(div, period_ns); in sun4i_pwm_config()
|
D | pwm-pca9685.c | 70 int duty_ns, int period_ns) in pca9685_pwm_config() argument 87 if (duty_ns == period_ns) { in pca9685_pwm_config() 99 duty = DIV_ROUND_UP_ULL(duty, period_ns); in pca9685_pwm_config()
|
D | pwm-vt8500.c | 81 int duty_ns, int period_ns) in vt8500_pwm_config() argument 96 c = c * period_ns; in vt8500_pwm_config() 113 do_div(c, period_ns); in vt8500_pwm_config()
|
D | pwm-atmel-tcb.c | 271 int duty_ns, int period_ns) in atmel_tcb_pwm_config() argument 298 if (max >= period_ns) in atmel_tcb_pwm_config() 313 if (max < period_ns) in atmel_tcb_pwm_config() 318 period = div_u64(period_ns, min); in atmel_tcb_pwm_config()
|
D | pwm-clps711x.c | 69 int duty_ns, int period_ns) in clps711x_pwm_config() argument 74 if (period_ns != pwm_get_period(pwm)) in clps711x_pwm_config()
|
D | pwm-tiecap.c | 66 int duty_ns, int period_ns) in ecap_pwm_config() argument 73 if (period_ns > NSEC_PER_SEC) in ecap_pwm_config() 77 c = c * period_ns; in ecap_pwm_config()
|
D | core.c | 406 int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) in pwm_config() argument 410 if (!pwm || duty_ns < 0 || period_ns <= 0 || duty_ns > period_ns) in pwm_config() 413 err = pwm->chip->ops->config(pwm->chip, pwm, duty_ns, period_ns); in pwm_config() 418 pwm->period = period_ns; in pwm_config()
|
D | pwm-spear.c | 78 int duty_ns, int period_ns) in spear_pwm_config() argument 99 val = clk_rate * period_ns; in spear_pwm_config()
|
D | pwm-rockchip.c | 102 int duty_ns, int period_ns) in rockchip_pwm_config() argument 116 div = clk_rate * period_ns; in rockchip_pwm_config()
|
D | pwm-bcm-kona.c | 95 int duty_ns, int period_ns) in kona_pwmc_config() argument 118 val = rate * period_ns; in kona_pwmc_config()
|
D | pwm-twl.c | 72 int duty_ns, int period_ns) in twl_pwm_config() argument 74 int duty_cycle = DIV_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1; in twl_pwm_config()
|
D | pwm-ab8500.c | 28 int duty_ns, int period_ns) in ab8500_pwm_config() argument
|
D | pwm-tiehrpwm.c | 237 int duty_ns, int period_ns) in ehrpwm_pwm_config() argument 245 if (period_ns > NSEC_PER_SEC) in ehrpwm_pwm_config() 249 c = c * period_ns; in ehrpwm_pwm_config()
|
D | pwm-renesas-tpu.c | 253 int duty_ns, int period_ns) in tpu_pwm_config() argument 273 / (NSEC_PER_SEC / period_ns); in tpu_pwm_config()
|
/linux-4.1.27/include/linux/ |
D | pwm.h | 24 int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns); 45 static inline int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) in pwm_config() argument 140 int duty_ns, int period_ns);
|
/linux-4.1.27/Documentation/backlight/ |
D | lp855x-driver.txt | 38 * period_ns : Platform specific PWM period value. unit is nano. 65 .period_ns = 1000000,
|
/linux-4.1.27/include/xen/interface/ |
D | vcpu.h | 137 uint64_t period_ns; member
|
/linux-4.1.27/drivers/video/backlight/ |
D | lp855x_bl.c | 237 unsigned int period = lp->pdata->period_ns; in lp855x_pwm_ctrl() 364 of_property_read_u32(node, "pwm-period", &pdata->period_ns); in lp855x_parse_dt() 429 if (lp->pdata->period_ns > 0) in lp855x_probe()
|
D | lp8788_bl.c | 135 period = bl->pdata->period_ns; in lp8788_pwm_ctrl()
|
/linux-4.1.27/include/linux/platform_data/ |
D | lp855x.h | 145 unsigned int period_ns; member
|
/linux-4.1.27/drivers/scsi/ |
D | wd33c93.c | 96 #define optimum_sx_per(hostdata) (hostdata)->sx_table[1].period_ns 322 for (x = 1; sx_table[x].period_ns; x++) { in round_period() 323 if ((period <= sx_table[x - 0].period_ns) && in round_period() 324 (period > sx_table[x - 1].period_ns)) { in round_period() 1882 sx_table[0].period_ns = 1; in calc_sx_table() 1885 sx_table[i].period_ns = round_4((i+1)*d / 100); in calc_sx_table() 1889 sx_table[8].period_ns = 0; in calc_sx_table() 2004 hostdata->sx_table)].period_ns; in wd33c93_init() 2096 hd->sx_table)].period_ns; in wd33c93_write_info()
|
D | wd33c93.h | 217 unsigned int period_ns; member
|
D | in2000.h | 273 unsigned int period_ns; member
|
D | in2000.c | 314 for (x = 1; sx_table[x].period_ns; x++) { in round_period() 315 if ((period <= sx_table[x - 0].period_ns) && (period > sx_table[x - 1].period_ns)) { in round_period() 2068 hostdata->default_sx_per = sx_table[round_period((unsigned int) val)].period_ns; in in2000_detect() 2194 hd->default_sx_per = sx_table[round_period((unsigned int) x)].period_ns; in in2000_write_info()
|
/linux-4.1.27/Documentation/devicetree/bindings/leds/ |
D | leds-pwm.txt | 11 specify the period time to be used: <&phandle id period_ns>;
|
/linux-4.1.27/include/linux/mfd/ |
D | lp8788.h | 249 unsigned int period_ns; member
|
/linux-4.1.27/Documentation/ |
D | pwm.txt | 45 int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns); 120 Currently a PWM can only be configured with period_ns and duty_ns. For several
|
/linux-4.1.27/drivers/staging/comedi/drivers/ |
D | ni_tio.c | 683 unsigned int period_ns) in ni_tio_set_clock_src() argument 724 counter->clock_period_ps = period_ns * 1000; in ni_tio_set_clock_src() 731 unsigned int *period_ns) in ni_tio_get_clock_src() argument 738 *period_ns = temp64; in ni_tio_get_clock_src()
|
D | ni_mio_common.c | 4841 unsigned source, unsigned period_ns) in ni_mseries_set_pll_master_clock() argument 4854 period_ns = 100; in ni_mseries_set_pll_master_clock() 4856 if (period_ns < min_period_ns || period_ns > max_period_ns) { in ni_mseries_set_pll_master_clock() 4900 retval = ni_mseries_get_pll_parameters(period_ns, in ni_mseries_set_pll_master_clock() 4926 __func__, source, period_ns); in ni_mseries_set_pll_master_clock() 4933 unsigned source, unsigned period_ns) in ni_set_master_clock() argument 4954 period_ns); in ni_set_master_clock() 4962 if (period_ns == 0) { in ni_set_master_clock() 4967 devpriv->clock_ns = period_ns; in ni_set_master_clock()
|
/linux-4.1.27/drivers/scsi/arm/ |
D | acornscsi.c | 622 unsigned int period_ns; member 645 for (i = 1; sync_xfer_table[i].period_ns; i++) in acornscsi_getperiod() 647 return sync_xfer_table[i].period_ns; in acornscsi_getperiod() 663 for (i = 1; sync_xfer_table[i].period_ns; i++) { in round_period() 664 if ((period <= sync_xfer_table[i].period_ns) && in round_period() 665 (period > sync_xfer_table[i - 1].period_ns)) in round_period()
|
/linux-4.1.27/drivers/media/rc/ |
D | ite-cir.c | 131 unsigned long period_ns, on_ns; in ite_get_pulse_width_bits() local 139 period_ns = 1000000000UL / freq; in ite_get_pulse_width_bits() 140 on_ns = period_ns * duty_cycle / 100; in ite_get_pulse_width_bits()
|