summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/include/mach/pxa910.h
diff options
context:
space:
mode:
authorEric Miao2009-04-13 12:29:52 +0200
committerEric Miao2009-06-05 04:32:06 +0200
commita27ba768a11ac7a1d56688d4224cef3a802d1f89 (patch)
treeb6454495caae2103a104c0ae14232eed6e151738 /arch/arm/mach-mmp/include/mach/pxa910.h
parent[ARM] pxa: add missing IRQ_PXA910_NONE to irqs.h (diff)
downloadkernel-qcow2-linux-a27ba768a11ac7a1d56688d4224cef3a802d1f89.tar.gz
kernel-qcow2-linux-a27ba768a11ac7a1d56688d4224cef3a802d1f89.tar.xz
kernel-qcow2-linux-a27ba768a11ac7a1d56688d4224cef3a802d1f89.zip
[ARM] pxa: add PWM devices support for pxa168/910
Signed-off-by: Mingwei Wang <mingwei.wang@marvell.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-mmp/include/mach/pxa910.h')
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa910.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h
index a0f0cbee1c07..6ae1ed7a0a9f 100644
--- a/arch/arm/mach-mmp/include/mach/pxa910.h
+++ b/arch/arm/mach-mmp/include/mach/pxa910.h
@@ -9,6 +9,10 @@ extern struct pxa_device_desc pxa910_device_uart1;
extern struct pxa_device_desc pxa910_device_uart2;
extern struct pxa_device_desc pxa910_device_twsi0;
extern struct pxa_device_desc pxa910_device_twsi1;
+extern struct pxa_device_desc pxa910_device_pwm1;
+extern struct pxa_device_desc pxa910_device_pwm2;
+extern struct pxa_device_desc pxa910_device_pwm3;
+extern struct pxa_device_desc pxa910_device_pwm4;
static inline int pxa910_add_uart(int id)
{
@@ -44,4 +48,20 @@ static inline int pxa910_add_twsi(int id, struct i2c_pxa_platform_data *data,
return pxa_register_device(d, data, sizeof(*data));
}
+
+static inline int pxa910_add_pwm(int id)
+{
+ struct pxa_device_desc *d = NULL;
+
+ switch (id) {
+ case 1: d = &pxa910_device_pwm1; break;
+ case 2: d = &pxa910_device_pwm2; break;
+ case 3: d = &pxa910_device_pwm3; break;
+ case 4: d = &pxa910_device_pwm4; break;
+ default:
+ return -EINVAL;
+ }
+
+ return pxa_register_device(d, NULL, 0);
+}
#endif /* __ASM_MACH_PXA910_H */