diff options
author | Kukjin Kim | 2011-03-11 07:48:52 +0100 |
---|---|---|
committer | Kukjin Kim | 2011-03-11 07:48:52 +0100 |
commit | 6d2f42cc275ba72a47ce6933b18480163ecf2740 (patch) | |
tree | b986e612edd1d44fa64874601712060970308290 /arch/arm/plat-samsung/dev-pwm.c | |
parent | Merge branch 'next-s3c2440-gta02' into for-next (diff) | |
parent | ARM: SAMSUNG: Add PWM backlight support on Samsung S5PV210 (diff) | |
download | kernel-qcow2-linux-6d2f42cc275ba72a47ce6933b18480163ecf2740.tar.gz kernel-qcow2-linux-6d2f42cc275ba72a47ce6933b18480163ecf2740.tar.xz kernel-qcow2-linux-6d2f42cc275ba72a47ce6933b18480163ecf2740.zip |
Merge branch 'dev/pwm-backlight' into for-next
Conflicts:
arch/arm/mach-s3c64xx/mach-smdk6410.c
Diffstat (limited to 'arch/arm/plat-samsung/dev-pwm.c')
-rw-r--r-- | arch/arm/plat-samsung/dev-pwm.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/dev-pwm.c b/arch/arm/plat-samsung/dev-pwm.c new file mode 100644 index 000000000000..dab47b0e1900 --- /dev/null +++ b/arch/arm/plat-samsung/dev-pwm.c @@ -0,0 +1,53 @@ +/* linux/arch/arm/plat-samsung/dev-pwm.c + * + * Copyright (c) 2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Copyright (c) 2007 Ben Dooks + * Copyright (c) 2008 Simtec Electronics + * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org> + * + * S3C series device definition for the PWM timer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/kernel.h> +#include <linux/platform_device.h> + +#include <mach/irqs.h> + +#include <plat/devs.h> + +#define TIMER_RESOURCE_SIZE (1) + +#define TIMER_RESOURCE(_tmr, _irq) \ + (struct resource [TIMER_RESOURCE_SIZE]) { \ + [0] = { \ + .start = _irq, \ + .end = _irq, \ + .flags = IORESOURCE_IRQ \ + } \ + } + +#define DEFINE_S3C_TIMER(_tmr_no, _irq) \ + .name = "s3c24xx-pwm", \ + .id = _tmr_no, \ + .num_resources = TIMER_RESOURCE_SIZE, \ + .resource = TIMER_RESOURCE(_tmr_no, _irq), \ + +/* + * since we already have an static mapping for the timer, + * we do not bother setting any IO resource for the base. + */ + +struct platform_device s3c_device_timer[] = { + [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) }, + [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) }, + [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) }, + [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) }, + [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) }, +}; +EXPORT_SYMBOL(s3c_device_timer); |