summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/devs.c
diff options
context:
space:
mode:
authorTomasz Figa <tomasz.figa@gmail.com>2013-04-12 21:17:21 +0200
committerTomasz Figa <tomasz.figa@gmail.com>2013-08-06 01:21:45 +0200
commit95e43d4640b9891482c46470389fe8bf7267079d (patch)
tree746d3b0ce7508d121b1379fcc5278481bb6f94c4 /arch/arm/plat-samsung/devs.c
parent49d9eab595b50be74be51ce30843358cfc43bb14 (diff)
downloadop-kernel-dev-95e43d4640b9891482c46470389fe8bf7267079d.zip
op-kernel-dev-95e43d4640b9891482c46470389fe8bf7267079d.tar.gz
ARM: SAMSUNG: Add new PWM platform device
This patch adds new samsung_device_pwm platform device that represents the whole PWM/timer block and includes memory and IRQ resources. 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>
Diffstat (limited to 'arch/arm/plat-samsung/devs.c')
-rw-r--r--arch/arm/plat-samsung/devs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 0f9c3f4..bba6d78 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -58,6 +58,7 @@
#include <plat/keypad.h>
#include <linux/platform_data/mmc-s3cmci.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <plat/pwm-core.h>
#include <plat/sdhci.h>
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
@@ -1127,6 +1128,22 @@ struct platform_device s3c_device_timer[] = {
[3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) },
[4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) },
};
+
+static struct resource samsung_pwm_resource[] = {
+ DEFINE_RES_MEM(SAMSUNG_PA_TIMER, SZ_4K),
+};
+
+struct platform_device samsung_device_pwm = {
+ .name = "samsung-pwm",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(samsung_pwm_resource),
+ .resource = samsung_pwm_resource,
+};
+
+void __init samsung_pwm_set_platdata(struct samsung_pwm_variant *pd)
+{
+ samsung_device_pwm.dev.platform_data = pd;
+}
#endif /* CONFIG_SAMSUNG_DEV_PWM */
/* RTC */
OpenPOWER on IntegriCloud