Home
last modified time | relevance | path

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

/u-boot/test/dm/
A Dpanel.c26 uint duty_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()
43 ut_asserteq(170 * 1000 / 255, duty_ns); in dm_test_panel()
50 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel()
52 ut_asserteq(64 * 1000 / 255, duty_ns); in dm_test_panel()
55 ut_assertok(sandbox_pwm_get_config(pwm, 0, &period_ns, &duty_ns, in dm_test_panel()
57 ut_asserteq(255 * 1000 / 255, duty_ns); in dm_test_panel()
62 ut_asserteq(0 * 1000 / 255, duty_ns); in dm_test_panel()
69 ut_asserteq(170 * 1000 / 255, duty_ns); in dm_test_panel()
[all …]
/u-boot/drivers/pwm/
A Dsandbox_pwm.c27 uint duty_ns; member
46 *duty_nsp = chan->duty_ns; in sandbox_pwm_get_config()
54 uint period_ns, uint duty_ns) in sandbox_pwm_set_config() argument
63 chan->duty_ns = duty_ns; in sandbox_pwm_set_config()
A Dpwm-imx-util.c48 int pwm_imx_get_parms(int period_ns, int duty_ns, unsigned long *period_c, in pwm_imx_get_parms() argument
66 c = *period_c * (unsigned long long)duty_ns; in pwm_imx_get_parms()
A Dpwm-imx.c47 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 Dpwm-uclass.c22 uint duty_ns) in pwm_set_config() argument
29 return ops->set_config(dev, channel, period_ns, duty_ns); in pwm_set_config()
A Dexynos_pwm.c20 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()
44 tcmp = duty_ns / rate_ns; in exynos_pwm_set_config()
A Dsunxi_pwm.c68 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()
100 duty = lldiv(best_scaled_freq * duty_ns, nsecs_per_sec); in sunxi_pwm_set_config()
A Dpwm-sifive.c61 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()
88 num = (u64)duty_ns * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_set_config()
A Dtegra_pwm.c19 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 Dpwm-imx-util.h13 int pwm_imx_get_parms(int period_ns, int duty_ns, unsigned long *period_c,
A Dpwm-meson.c79 uint duty_ns; member
100 uint period_ns, uint duty_ns) in meson_pwm_set_config() argument
116 duty = period_ns - duty_ns; in meson_pwm_set_config()
118 duty = duty_ns; in meson_pwm_set_config()
170 channel->duty_ns = duty_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 Drk_pwm.c58 uint duty_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()
79 duty = lldiv((uint64_t)priv->freq * duty_ns, in rk_pwm_set_config()
A Dpwm-mtk.c58 uint period_ns, uint duty_ns) in mtk_pwm_set_config() argument
100 cnt_duty = DIV_ROUND_CLOSEST_ULL((u64)duty_ns * 1000, resolution); in mtk_pwm_set_config()
A Dpwm-ti-ehrpwm.c210 uint period_ns, uint duty_ns) in ti_ehrpwm_set_config() argument
234 c = c * duty_ns; in ti_ehrpwm_set_config()
240 channel, period_ns, duty_ns); in ti_ehrpwm_set_config()
/u-boot/include/
A Dpwm.h27 uint duty_ns);
61 uint duty_ns);
86 int pwm_config (int pwm_id, int duty_ns, int period_ns);
/u-boot/cmd/
A Dpwm.c27 u32 channel, pwm_enable, pwm_dev, period_ns = 0, duty_ns = 0; in do_pwm() local
92 duty_ns = simple_strtoul(str_duty, NULL, 10); in do_pwm()
94 ret = pwm_set_config(dev, channel, period_ns, duty_ns); in do_pwm()
/u-boot/arch/arm/cpu/armv7/s5p-common/
A Dpwm.c95 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()
136 tcmp = duty_ns / tin_ns; in pwm_config()

Completed in 20 milliseconds