aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/include/mach/pxa168.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-08 17:32:24 -0400
committerDan Williams <dan.j.williams@intel.com>2009-09-08 17:32:24 -0400
commita348a7e6fdbcd2d5192a09719a479bb238fde727 (patch)
tree5ff94185f4e5a810777469d7fe7832a8ec2d3430 /arch/arm/mach-mmp/include/mach/pxa168.h
parent808347f6a31792079e345ec865e9cfcb6e8ae6b2 (diff)
parent28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff)
Merge commit 'v2.6.31-rc1' into dmaengine
Diffstat (limited to 'arch/arm/mach-mmp/include/mach/pxa168.h')
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index ef0a8a2076e9..6bf1f0eefcd1 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -1,10 +1,18 @@
1#ifndef __ASM_MACH_PXA168_H 1#ifndef __ASM_MACH_PXA168_H
2#define __ASM_MACH_PXA168_H 2#define __ASM_MACH_PXA168_H
3 3
4#include <linux/i2c.h>
4#include <mach/devices.h> 5#include <mach/devices.h>
6#include <plat/i2c.h>
5 7
6extern struct pxa_device_desc pxa168_device_uart1; 8extern struct pxa_device_desc pxa168_device_uart1;
7extern struct pxa_device_desc pxa168_device_uart2; 9extern struct pxa_device_desc pxa168_device_uart2;
10extern struct pxa_device_desc pxa168_device_twsi0;
11extern struct pxa_device_desc pxa168_device_twsi1;
12extern struct pxa_device_desc pxa168_device_pwm1;
13extern struct pxa_device_desc pxa168_device_pwm2;
14extern struct pxa_device_desc pxa168_device_pwm3;
15extern struct pxa_device_desc pxa168_device_pwm4;
8 16
9static inline int pxa168_add_uart(int id) 17static inline int pxa168_add_uart(int id)
10{ 18{
@@ -20,4 +28,40 @@ static inline int pxa168_add_uart(int id)
20 28
21 return pxa_register_device(d, NULL, 0); 29 return pxa_register_device(d, NULL, 0);
22} 30}
31
32static inline int pxa168_add_twsi(int id, struct i2c_pxa_platform_data *data,
33 struct i2c_board_info *info, unsigned size)
34{
35 struct pxa_device_desc *d = NULL;
36 int ret;
37
38 switch (id) {
39 case 0: d = &pxa168_device_twsi0; break;
40 case 1: d = &pxa168_device_twsi1; break;
41 default:
42 return -EINVAL;
43 }
44
45 ret = i2c_register_board_info(id, info, size);
46 if (ret)
47 return ret;
48
49 return pxa_register_device(d, data, sizeof(*data));
50}
51
52static inline int pxa168_add_pwm(int id)
53{
54 struct pxa_device_desc *d = NULL;
55
56 switch (id) {
57 case 1: d = &pxa168_device_pwm1; break;
58 case 2: d = &pxa168_device_pwm2; break;
59 case 3: d = &pxa168_device_pwm3; break;
60 case 4: d = &pxa168_device_pwm4; break;
61 default:
62 return -EINVAL;
63 }
64
65 return pxa_register_device(d, NULL, 0);
66}
23#endif /* __ASM_MACH_PXA168_H */ 67#endif /* __ASM_MACH_PXA168_H */