diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-05-12 12:12:29 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 06:49:33 -0400 |
commit | 489db6a662af5ca1b6574bae2d974017346bb983 (patch) | |
tree | 0673fe3e849f588adc98acdb143ab0c825b5413f /arch/arm/mach-pxa | |
parent | a48c24a696f0d93c49f913b7818e9819612b1f4e (diff) |
[ARM] pxa/em-x270: convert em-x270 to soc-camera as platform-device
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/em-x270.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index e0121f4fcaf4..2ed1dfe194b3 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -1025,22 +1025,32 @@ static int em_x270_sensor_power(struct device *dev, int on) | |||
1025 | return 0; | 1025 | return 0; |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | static struct soc_camera_link iclink = { | ||
1029 | .bus_id = 0, | ||
1030 | .power = em_x270_sensor_power, | ||
1031 | }; | ||
1032 | |||
1033 | static struct i2c_board_info em_x270_i2c_cam_info[] = { | 1028 | static struct i2c_board_info em_x270_i2c_cam_info[] = { |
1034 | { | 1029 | { |
1035 | I2C_BOARD_INFO("mt9m111", 0x48), | 1030 | I2C_BOARD_INFO("mt9m111", 0x48), |
1031 | }, | ||
1032 | }; | ||
1033 | |||
1034 | static struct soc_camera_link iclink = { | ||
1035 | .bus_id = 0, | ||
1036 | .power = em_x270_sensor_power, | ||
1037 | .board_info = &em_x270_i2c_cam_info[0], | ||
1038 | .i2c_adapter_id = 0, | ||
1039 | .module_name = "mt9m111", | ||
1040 | }; | ||
1041 | |||
1042 | static struct platform_device em_x270_camera = { | ||
1043 | .name = "soc-camera-pdrv", | ||
1044 | .id = -1, | ||
1045 | .dev = { | ||
1036 | .platform_data = &iclink, | 1046 | .platform_data = &iclink, |
1037 | }, | 1047 | }, |
1038 | }; | 1048 | }; |
1039 | 1049 | ||
1040 | static void __init em_x270_init_camera(void) | 1050 | static void __init em_x270_init_camera(void) |
1041 | { | 1051 | { |
1042 | i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info)); | ||
1043 | pxa_set_camera_info(&em_x270_camera_platform_data); | 1052 | pxa_set_camera_info(&em_x270_camera_platform_data); |
1053 | platform_device_register(&em_x270_camera); | ||
1044 | } | 1054 | } |
1045 | #else | 1055 | #else |
1046 | static inline void em_x270_init_camera(void) {} | 1056 | static inline void em_x270_init_camera(void) {} |