diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-05-12 18:12:29 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 18:49:33 +0800 |
commit | 489db6a662af5ca1b6574bae2d974017346bb983 (patch) | |
tree | 0673fe3e849f588adc98acdb143ab0c825b5413f /arch/arm/mach-pxa/em-x270.c | |
parent | a48c24a696f0d93c49f913b7818e9819612b1f4e (diff) | |
download | linux-489db6a662af5ca1b6574bae2d974017346bb983.tar.gz linux-489db6a662af5ca1b6574bae2d974017346bb983.tar.bz2 linux-489db6a662af5ca1b6574bae2d974017346bb983.zip |
[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/em-x270.c')
-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) return 0; } -static struct soc_camera_link iclink = { - .bus_id = 0, - .power = em_x270_sensor_power, -}; - static struct i2c_board_info em_x270_i2c_cam_info[] = { { I2C_BOARD_INFO("mt9m111", 0x48), + }, +}; + +static struct soc_camera_link iclink = { + .bus_id = 0, + .power = em_x270_sensor_power, + .board_info = &em_x270_i2c_cam_info[0], + .i2c_adapter_id = 0, + .module_name = "mt9m111", +}; + +static struct platform_device em_x270_camera = { + .name = "soc-camera-pdrv", + .id = -1, + .dev = { .platform_data = &iclink, }, }; static void __init em_x270_init_camera(void) { - i2c_register_board_info(0, ARRAY_AND_SIZE(em_x270_i2c_cam_info)); pxa_set_camera_info(&em_x270_camera_platform_data); + platform_device_register(&em_x270_camera); } #else static inline void em_x270_init_camera(void) {} |