1 #ifndef __ASM_MACH_PXA910_H
2 #define __ASM_MACH_PXA910_H
5 #include <mach/devices.h>
8 extern struct pxa_device_desc pxa910_device_uart1
;
9 extern struct pxa_device_desc pxa910_device_uart2
;
10 extern struct pxa_device_desc pxa910_device_twsi0
;
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
;
17 static inline int pxa910_add_uart(int id
)
19 struct pxa_device_desc
*d
= NULL
;
22 case 1: d
= &pxa910_device_uart1
; break;
23 case 2: d
= &pxa910_device_uart2
; break;
29 return pxa_register_device(d
, NULL
, 0);
32 static inline int pxa910_add_twsi(int id
, struct i2c_pxa_platform_data
*data
,
33 struct i2c_board_info
*info
, unsigned size
)
35 struct pxa_device_desc
*d
= NULL
;
39 case 0: d
= &pxa910_device_twsi0
; break;
40 case 1: d
= &pxa910_device_twsi1
; break;
45 ret
= i2c_register_board_info(id
, info
, size
);
49 return pxa_register_device(d
, data
, sizeof(*data
));
52 static inline int pxa910_add_pwm(int id
)
54 struct pxa_device_desc
*d
= NULL
;
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;
65 return pxa_register_device(d
, NULL
, 0);
67 #endif /* __ASM_MACH_PXA910_H */