diff options
Diffstat (limited to 'arch/arm/mach-mmp/include/mach/pxa910.h')
-rw-r--r-- | arch/arm/mach-mmp/include/mach/pxa910.h | 20 |
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; | |||
9 | extern struct pxa_device_desc pxa910_device_uart2; | 9 | extern struct pxa_device_desc pxa910_device_uart2; |
10 | extern struct pxa_device_desc pxa910_device_twsi0; | 10 | extern struct pxa_device_desc pxa910_device_twsi0; |
11 | extern struct pxa_device_desc pxa910_device_twsi1; | 11 | extern struct pxa_device_desc pxa910_device_twsi1; |
12 | extern struct pxa_device_desc pxa910_device_pwm1; | ||
13 | extern struct pxa_device_desc pxa910_device_pwm2; | ||
14 | extern struct pxa_device_desc pxa910_device_pwm3; | ||
15 | extern struct pxa_device_desc pxa910_device_pwm4; | ||
12 | 16 | ||
13 | static inline int pxa910_add_uart(int id) | 17 | static inline int pxa910_add_uart(int id) |
14 | { | 18 | { |
@@ -44,4 +48,20 @@ static inline int pxa910_add_twsi(int id, struct i2c_pxa_platform_data *data, | |||
44 | 48 | ||
45 | return pxa_register_device(d, data, sizeof(*data)); | 49 | return pxa_register_device(d, data, sizeof(*data)); |
46 | } | 50 | } |
51 | |||
52 | static inline int pxa910_add_pwm(int id) | ||
53 | { | ||
54 | struct pxa_device_desc *d = NULL; | ||
55 | |||
56 | switch (id) { | ||
57 | case 1: d = &pxa910_device_pwm1; break; | ||
58 | case 2: d = &pxa910_device_pwm2; break; | ||
59 | case 3: d = &pxa910_device_pwm3; break; | ||
60 | case 4: d = &pxa910_device_pwm4; break; | ||
61 | default: | ||
62 | return -EINVAL; | ||
63 | } | ||
64 | |||
65 | return pxa_register_device(d, NULL, 0); | ||
66 | } | ||
47 | #endif /* __ASM_MACH_PXA910_H */ | 67 | #endif /* __ASM_MACH_PXA910_H */ |