/u-boot/test/dm/ |
A D | panel.c | 26 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 D | sandbox_pwm.c | 27 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 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 66 c = *period_c * (unsigned long long)duty_ns; in pwm_imx_get_parms()
|
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-uclass.c | 22 uint duty_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() 44 tcmp = duty_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() 100 duty = lldiv(best_scaled_freq * duty_ns, nsecs_per_sec); in sunxi_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() 88 num = (u64)duty_ns * (1U << PWM_SIFIVE_CMPWIDTH); in pwm_sifive_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 | 79 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 D | rk_pwm.c | 58 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 D | pwm-mtk.c | 58 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 D | pwm-ti-ehrpwm.c | 210 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 D | pwm.h | 27 uint duty_ns); 61 uint duty_ns); 86 int pwm_config (int pwm_id, int duty_ns, int period_ns);
|
/u-boot/cmd/ |
A D | pwm.c | 27 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 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() 136 tcmp = duty_ns / tin_ns; in pwm_config()
|