/u-boot/test/dm/ |
A D | panel.c | 25 uint period_ns; in dm_test_panel() local 34 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 40 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 42 ut_asserteq(1000, period_ns); in dm_test_panel() 50 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 55 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 60 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 66 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel() 72 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel()
|
/u-boot/drivers/pwm/ |
A D | sandbox_pwm.c | 26 uint period_ns; member 45 *period_nsp = chan->period_ns; in sandbox_pwm_get_config() 54 uint period_ns, uint duty_ns) in sandbox_pwm_set_config() argument 62 chan->period_ns = period_ns; in sandbox_pwm_set_config()
|
A D | pwm-imx-util.c | 48 int pwm_imx_get_parms(int period_ns, int duty_ns, unsigned long *period_c, in pwm_imx_get_parms() argument 59 c = c * period_ns; in pwm_imx_get_parms() 67 do_div(c, period_ns); in pwm_imx_get_parms()
|
A D | pwm-mtk.c | 58 uint period_ns, uint duty_ns) in mtk_pwm_set_config() argument 71 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, resolution); in mtk_pwm_set_config() 75 cnt_period = DIV_ROUND_CLOSEST_ULL((u64)period_ns * 1000, in mtk_pwm_set_config() 84 (u64)period_ns * 1000, resolution); in mtk_pwm_set_config() 89 printf("pwm period %u not supported\n", period_ns); in mtk_pwm_set_config()
|
A D | pwm-imx.c | 47 int pwm_config(int pwm_id, int duty_ns, int period_ns) in pwm_config() argument 55 pwm_imx_get_parms(period_ns, duty_ns, &period_cycles, &duty_cycles, in pwm_config() 100 uint period_ns, uint duty_ns) in imx_pwm_set_config() argument 108 pwm_imx_get_parms(period_ns, duty_ns, &period_cycles, &duty_cycles, in imx_pwm_set_config()
|
A D | pwm-sifive.c | 61 uint period_ns, uint duty_ns) in pwm_sifive_set_config() argument 69 debug("%s: period_ns=%u, duty_ns=%u\n", __func__, period_ns, duty_ns); in pwm_sifive_set_config() 78 scale_pow = lldiv((uint64_t)priv->freq * period_ns, 1000000000); in pwm_sifive_set_config() 89 frac = DIV_ROUND_CLOSEST_ULL(num, period_ns); in pwm_sifive_set_config()
|
A D | pwm-uclass.c | 21 int pwm_set_config(struct udevice *dev, uint channel, uint period_ns, in pwm_set_config() argument 29 return ops->set_config(dev, channel, period_ns, duty_ns); in pwm_set_config()
|
A D | exynos_pwm.c | 20 uint period_ns, uint duty_ns) in exynos_pwm_set_config() argument 32 __func__, dev->name, channel, period_ns, duty_ns); in exynos_pwm_set_config() 43 tcnt = period_ns / rate_ns; in exynos_pwm_set_config()
|
A D | sunxi_pwm.c | 68 uint period_ns, uint duty_ns) in sunxi_pwm_set_config() argument 77 debug("%s: period_ns=%u, duty_ns=%u\n", __func__, period_ns, duty_ns); in sunxi_pwm_set_config() 86 period = lldiv(scaled_freq * period_ns, nsecs_per_sec); in sunxi_pwm_set_config()
|
A D | tegra_pwm.c | 19 uint period_ns, uint duty_ns) in tegra_pwm_set_config() argument 32 pulse_width = duty_ns * 255 / period_ns; in tegra_pwm_set_config()
|
A D | pwm-imx-util.h | 13 int pwm_imx_get_parms(int period_ns, int duty_ns, unsigned long *period_c,
|
A D | pwm-meson.c | 78 uint period_ns; member 100 uint period_ns, uint duty_ns) in meson_pwm_set_config() argument 114 period = period_ns; in meson_pwm_set_config() 116 duty = period_ns - duty_ns; in meson_pwm_set_config() 169 channel->period_ns = period_ns; in meson_pwm_set_config() 249 return meson_pwm_set_config(dev, channeln, channel->period_ns, channel->duty_ns); in meson_pwm_set_invert()
|
A D | rk_pwm.c | 57 static int rk_pwm_set_config(struct udevice *dev, uint channel, uint period_ns, in rk_pwm_set_config() argument 65 debug("%s: period_ns=%u, duty_ns=%u\n", __func__, period_ns, duty_ns); in rk_pwm_set_config() 77 period = lldiv((uint64_t)priv->freq * period_ns, in rk_pwm_set_config()
|
A D | pwm-ti-ehrpwm.c | 210 uint period_ns, uint duty_ns) in ti_ehrpwm_set_config() argument 221 if (period_ns > NSEC_PER_SEC) in ti_ehrpwm_set_config() 225 c = c * period_ns; in ti_ehrpwm_set_config() 240 channel, period_ns, duty_ns); in ti_ehrpwm_set_config()
|
/u-boot/arch/arm/cpu/armv7/s5p-common/ |
A D | pwm.c | 95 int pwm_config(int pwm_id, int duty_ns, int period_ns) in pwm_config() argument 116 if (period_ns > NS_IN_SEC || duty_ns > NS_IN_SEC || period_ns == 0) in pwm_config() 119 if (duty_ns > period_ns) in pwm_config() 122 frequency = NS_IN_SEC / period_ns; in pwm_config() 131 tcnt = (period_ns / tin_ns) - 1; in pwm_config() 133 tcnt = period_ns / tin_ns; in pwm_config()
|
/u-boot/include/ |
A D | pwm.h | 26 int (*set_config)(struct udevice *dev, uint channel, uint period_ns, 60 int pwm_set_config(struct udevice *dev, uint channel, uint period_ns, 86 int pwm_config (int pwm_id, int duty_ns, int period_ns);
|
/u-boot/drivers/power/regulator/ |
A D | pwm_regulator.c | 25 int period_ns; member 82 priv->period_ns, (priv->period_ns / 100) * duty_cycle); in pwm_regulator_set_voltage() 105 priv->period_ns = args.args[1]; in pwm_regulator_of_to_plat()
|
/u-boot/cmd/ |
A D | pwm.c | 27 u32 channel, pwm_enable, pwm_dev, period_ns = 0, duty_ns = 0; in do_pwm() local 89 period_ns = simple_strtoul(str_period, NULL, 10); in do_pwm() 94 ret = pwm_set_config(dev, channel, period_ns, duty_ns); in do_pwm()
|
/u-boot/board/friendlyarm/nanopi2/ |
A D | onewire.c | 100 int period_ns = NSEC_PER_SEC / SAMPLE_BPS; in onewire_init_timer() local 103 period_ns -= 1525; in onewire_init_timer() 105 return pwm_config(PWM_CH, period_ns >> 1, period_ns); in onewire_init_timer()
|
/u-boot/drivers/video/ |
A D | pwm_backlight.c | 44 uint period_ns; member 65 duty_cycle = priv->period_ns * (priv->cur_level - priv->min_level) / in set_pwm() 67 ret = pwm_set_config(priv->pwm, priv->channel, priv->period_ns, in set_pwm() 219 priv->period_ns = args.args[1]; in pwm_backlight_of_to_plat()
|
/u-boot/drivers/i2c/ |
A D | designware_i2c.c | 73 static uint calc_counts(uint ic_clk, uint period_ns) in calc_counts() argument 75 return DIV_ROUND_UP(ic_clk / 1000 * period_ns, NANO_TO_KILO); in calc_counts()
|