Add linux-next specific files for 20110831
[linux-2.6/next.git] / arch / arm / plat-samsung / dev-pwm.c
blob09a524b6d6ced4d73b8cc638e8f9458a0027bc0e
1 /* linux/arch/arm/plat-samsung/dev-pwm.c
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Copyright (c) 2007 Ben Dooks
7 * Copyright (c) 2008 Simtec Electronics
8 * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org>
10 * S3C series device definition for the PWM timer
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
17 #include <linux/kernel.h>
18 #include <linux/platform_device.h>
19 #include <linux/export.h>
21 #include <mach/irqs.h>
23 #include <plat/devs.h>
25 #define TIMER_RESOURCE_SIZE (1)
27 #define TIMER_RESOURCE(_tmr, _irq) \
28 (struct resource [TIMER_RESOURCE_SIZE]) { \
29 [0] = { \
30 .start = _irq, \
31 .end = _irq, \
32 .flags = IORESOURCE_IRQ \
33 } \
36 #define DEFINE_S3C_TIMER(_tmr_no, _irq) \
37 .name = "s3c24xx-pwm", \
38 .id = _tmr_no, \
39 .num_resources = TIMER_RESOURCE_SIZE, \
40 .resource = TIMER_RESOURCE(_tmr_no, _irq), \
43 * since we already have an static mapping for the timer,
44 * we do not bother setting any IO resource for the base.
47 struct platform_device s3c_device_timer[] = {
48 [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) },
49 [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) },
50 [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) },
51 [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) },
52 [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) },
54 EXPORT_SYMBOL(s3c_device_timer);