Commit Graph

14 Commits

Author SHA1 Message Date
Christoph Fritz
de19773535 pwm: imx: increase support up to PWM8 for i.MX6SX
This patch increases supported PWMs from previously PWM4 now up to PWM8
if i.MX6SX is in use.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
2016-11-29 16:34:27 +01:00
Robert P. J. Day
5052e81988 PWM: Correct misspellings of "module" in context of PWM
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Heiko Schocher <hs@denx.de>
2016-10-06 20:57:43 -04:00
Kever Yang
e2e4e14536 rk_pwm: remove grf setting code from driver
We consider the grf setting for pwm controller select as the system
operation instead of driver operation, move it to soc init, let's
remove it from pwm driver first.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-09-22 07:32:22 -06:00
Kever Yang
12406ae247 rk_pwm: use clock framework API to get module clock
This patch use clock API instead of hardcode for get pwm clock.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fix printf() to debug() nit:
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-09-22 07:32:22 -06:00
Simon Glass
5c2dd4cd7a exynos: pwm: Add a driver for the exynos5 PWM
This driver supports the standard PWM API. There are 5 PWMs. Four are used
normally and the last is normally used as a timer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2016-05-25 13:25:18 +09:00
Simon Glass
91c08afe66 tegra: video: Move LCD driver to use the DM PWM driver
Use the driver-model PWM driver in preference to the old code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16 09:17:53 -07:00
Simon Glass
41fa035ce1 tegra: Convert CONFIG_PWM_TEGRA to Kconfig
Move this option to Kconfig and clean up the header files. Adjust the only
user (the LCD driver) to work with the new driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16 09:17:53 -07:00
Simon Glass
7429b9623b tegra: pwm: Add a driver for the tegra PWM
This PWM supports four channels. The driver always uses the 32KHz clock,
and adjusts the duty cycle accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2016-02-16 09:17:50 -07:00
Simon Glass
0e23fd81a5 pwm: rockchip: Add a PWM driver for Rockchip SoCs
Add a simple driver which implements the standard PWM uclass interface.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:36 -07:00
Simon Glass
fc760cb8c4 dm: pwm: Add a PWM uclass
Add a uclass that supports Pulse Width Modulation (PWM) devices. It
provides methods to enable/disable and configure the device.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21 20:42:36 -07:00
Axel Lin
48dbc74ea5 pwm: imx: Remove unreachable code
The break after return is unreachable code, remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-26 14:13:12 +02:00
Axel Lin
16b0c0ce83 pwm: imx: Prevent NULL pointer dereference
pwm_id_to_reg() can return NULL, so add NULL testing to prevent NULL pointer
dereference.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2015-05-26 14:13:09 +02:00
Brecht Neyrinck
b2580877b5 bugfix i.mx6 pwm: prevent overflow of period_c * duty_ns
Prevent overflow by casting duty_ns to ull first. This bug came up when trying to create a 200 Hz PWM

Signed-off-by: Brecht Neyrinck <bnrn@psicontrol.com>
Acked-by: Heiko Schocher<hs@denx.de>
2015-05-15 19:20:47 +02:00
Heiko Schocher
b2f97cf279 pwm, imx6: add support for pwm modul on imx6
add basic support for the pwm modul found on imx6.
Pieces of this code are based on linux code from drivers/pwm/pwm-imx.c
Commit "cd3de83f1476 Linux 3.16-rc4"

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2014-07-23 12:25:42 +02:00