summaryrefslogtreecommitdiff
path: root/include/clocksource/samsung_pwm.h
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-04-06 02:40:36 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:45:22 +0900
commit5e656eb7ee09c61ff91c9907b813171d005590b1 (patch)
tree69224cfdd20e937f570f1d6cc40773ffb71fa414 /include/clocksource/samsung_pwm.h
parent11ace0cd15d815d91b40aadb9de2aaed99943d27 (diff)
downloadlinux-3.10-5e656eb7ee09c61ff91c9907b813171d005590b1.tar.gz
linux-3.10-5e656eb7ee09c61ff91c9907b813171d005590b1.tar.bz2
linux-3.10-5e656eb7ee09c61ff91c9907b813171d005590b1.zip
pwm: Add new pwm-samsung driver
This patch introduces new Samsung PWM driver, which is completely rewritten to be multiplatform- and DeviceTree-aware. In addition, remaining problems of old driver are fixed, such as: - proper handling of hardware variants, - synchronization on SMP systems, - handling of boundary parameter values, - hardware sharing with PWM clocksource driver, - undefined state of PWM output after stopping PWM channel. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Mark Brown <broonie@linaro.org> Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/clocksource/samsung_pwm.h')
-rw-r--r--include/clocksource/samsung_pwm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clocksource/samsung_pwm.h b/include/clocksource/samsung_pwm.h
index 5c449c8199e..0c7d48b8b39 100644
--- a/include/clocksource/samsung_pwm.h
+++ b/include/clocksource/samsung_pwm.h
@@ -20,7 +20,14 @@
#define SAMSUNG_PWM_NUM 5
+/*
+ * Following declaration must be in an ifdef due to this symbol being static
+ * in pwm-samsung driver if the clocksource driver is not compiled in and the
+ * spinlock is not shared between both drivers.
+ */
+#ifdef CONFIG_CLKSRC_SAMSUNG_PWM
extern spinlock_t samsung_pwm_lock;
+#endif
struct samsung_pwm_variant {
u8 bits;