summaryrefslogtreecommitdiff
path: root/drivers/pwm
AgeCommit message (Collapse)Author
2017-11-20pwm: imx: Enable PWM support on i.MX53Martyn Welch
Add missing parts for i.MX53 PWM support Acked-by: Nandor Han <nandor.han@ge.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Stefano Babic <sbabic@denx.de>
2017-07-28dm: tegra: pwm: Convert to livetreeSimon Glass
Update the tegra pwm driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1 Tested-by: Stephen Warren <swarren@nvidia.com>
2017-07-27rockchip: pwm: add mask for config settingKever Yang
Use mask to clear old setting before direct set the new config, or else there it will mess up the config when it's not the same with default value. Fixes: 3851059 rockchip: Setup default PWM flags Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-06-09rockchip: Setup default PWM flagsSimon Glass
At present if the Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 874ee59 (rockchip: pwm: implement pwm_set_invert())
2017-06-01dm: Rename dev_addr..() functionsSimon Glass
These support the flat device tree. We want to use the dev_read_..() prefix for functions that support both flat tree and live tree. So rename the existing functions to avoid confusion. In the end we will have: 1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree only All drivers will be written to use 1. That function will in turn call either 2 or 3 depending on whether the flat or live tree is in use. Note this involves changing some dead code - the imx_lpi2c.c file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-10dm: sandbox: pwm: add test for pwm_set_invert()Kever Yang
Add test case for new interface set_invert(). Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Fix typo in subject and build error in sandbox_pwm_set_invert(): Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-10rockchip: pwm: implement pwm_set_invert()Kever Yang
Rockchip pwm need to init polarity, implement pwm_set_invert() to do it. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-05-10power: regulator: pwm: support pwm polarity settingKever Yang
The latest kernel PWM drivers enable the polarity settings. When system run from U-Boot to kerenl, if there are differences in polarity set or duty cycle, the PMW will re-init: close -> set polarity and duty cycle -> enable the PWM. The power supply controled by pwm regulator may have voltage shaking, which lead to the system not stable. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-04-27dm: sandbox: pwm: Add a basic pwm testSimon Glass
Unfortunately a test for the PWM uclass was not included when it was submitted. This was noticed when trying to add more functionality: http://patchwork.ozlabs.org/patch/748172/ Add a simple test to get us started. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-02-08pwm: remove unneeded ifdef CONFIG_DM_PWM ... endifMasahiro Yamada
Both CONFIG_PWM_TEGRA and CONFIG_PWM_EXYNOS depend on CONFIG_DM_PWM, i.e. they are already guarded by Kconfig correctly. Remove unneeded ifdef CONFIG_DM_PWM ... endif. While we are here, let's tidy up alignment and sort the lines alphabetically in Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-11-29pwm: imx: increase support up to PWM8 for i.MX6SXChristoph Fritz
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-10-06PWM: Correct misspellings of "module" in context of PWMRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Acked-by: Heiko Schocher <hs@denx.de>
2016-09-22rk_pwm: remove grf setting code from driverKever Yang
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-22rk_pwm: use clock framework API to get module clockKever Yang
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-05-25exynos: pwm: Add a driver for the exynos5 PWMSimon Glass
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-02-16tegra: video: Move LCD driver to use the DM PWM driverSimon Glass
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-16tegra: Convert CONFIG_PWM_TEGRA to KconfigSimon Glass
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-16tegra: pwm: Add a driver for the tegra PWMSimon Glass
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-01-21pwm: rockchip: Add a PWM driver for Rockchip SoCsSimon Glass
Add a simple driver which implements the standard PWM uclass interface. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-21dm: pwm: Add a PWM uclassSimon Glass
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>
2015-05-26pwm: imx: Remove unreachable codeAxel Lin
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-26pwm: imx: Prevent NULL pointer dereferenceAxel Lin
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-15bugfix i.mx6 pwm: prevent overflow of period_c * duty_nsBrecht Neyrinck
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>
2014-07-23pwm, imx6: add support for pwm modul on imx6Heiko Schocher
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>