aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-meson.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * pwm: meson: Remove unneeded platform MODULE_ALIASJavier Martinez Canillas2016-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The Amlogic Meson is a DT-only platform, which means the devices are registered via OF and not using the legacy platform devices support. So there's no need to have a MODULE_ALIAS("platform:meson-pwm") since the reported uevent MODALIAS to user-space will always be the OF one. Signed-off-by: Javier Martinez Canillas <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* | pwm: meson: Add missing spin_lock_init()Axel Lin2016-10-211-0/+1
|/ | | | | | | | The driver uses the spin_lock but does not initialize it. Fix it. Signed-off-by: Axel Lin <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* pwm: meson: Handle unknown ID valuesArnd Bergmann2016-09-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with -Wmaybe-uninitialized, we get a couple of harmless warnings about three functions in this new driver that don't look safe to the compiler: drivers/pwm/pwm-meson.c: In function 'meson_pwm_get_state': drivers/pwm/pwm-meson.c:355:26: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c: In function 'meson_pwm_disable': drivers/pwm/pwm-meson.c:263:13: error: 'enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c: In function 'meson_pwm_apply': drivers/pwm/pwm-meson.c:231:13: error: 'clk_shift' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c:231:36: error: 'enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/pwm/pwm-meson.c:231:24: error: 'clk_enable' may be used uninitialized in this function [-Werror=maybe-uninitialized] Specifically, if we have a device with an ID other than 0 or 1, this would result in undefined behavior. This is currently not possible, but the compiler cannot be expected to know this. This patch adds a 'default' clause to let the compiler know what to do instead, which shuts up the warning and makes the code slightly more resiliant in case it gets extended to other identifiers. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* pwm: Add support for Meson PWM ControllerNeil Armstrong2016-09-081-0/+520
Add support for the PWM controller found in the Amlogic SoCs. This driver supports the Meson8b and GXBB SoCs. Signed-off-by: Neil Armstrong <[email protected]> Tested-by: Martin Blumenstingl <[email protected]> Tested-by: Jerome Brunet <[email protected]> Signed-off-by: Thierry Reding <[email protected]>