From c07951d8437107912925e407867a266c35317eb1 Mon Sep 17 00:00:00 2001 From: ddl Date: Wed, 10 Apr 2013 17:59:37 +0800 Subject: [PATCH] add new_camera struct in each board file --- arch/arm/mach-rk29/board-rk29-ddr3sdk.c | 37 ++++++++++++++++++ arch/arm/mach-rk29/board-rk29-k97.c | 37 ++++++++++++++++++ .../mach-rk2928/board-rk2928-a720-camera.c | 37 ++++++++++++++++++ arch/arm/mach-rk2928/board-rk2928-camera.c | 37 ++++++++++++++++++ .../board-rk2928-phonepad-760-camera.c | 37 ++++++++++++++++++ .../arm/mach-rk2928/board-rk2928-sdk-camera.c | 37 ++++++++++++++++++ arch/arm/mach-rk2928/board-rk2928-tb-camera.c | 37 ++++++++++++++++++ .../arm/mach-rk30/board-rk3066b-m701-camera.c | 39 +++++++++++++++++++ arch/arm/mach-rk30/board-rk3066b-sdk-camera.c | 38 ++++++++++++++++++ arch/arm/mach-rk30/board-rk3168-86v-camera.c | 38 ++++++++++++++++++ .../arm/mach-rk30/board-rk3168-LR097-camera.c | 37 ++++++++++++++++++ .../mach-rk30/board-rk3168-ds1006h-camera.c | 37 ++++++++++++++++++ arch/arm/mach-rk30/board-rk3168-tb-camera.c | 37 ++++++++++++++++++ .../mach-rk3188/board-rk3188-u30gt2-camera.c | 37 ++++++++++++++++++ drivers/media/video/rk30_camera.c | 6 ++- 15 files changed, 526 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c index f035a5265460..89d4cb12f771 100755 --- a/arch/arm/mach-rk29/board-rk29-ddr3sdk.c +++ b/arch/arm/mach-rk29/board-rk29-ddr3sdk.c @@ -70,6 +70,43 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor 0 */ diff --git a/arch/arm/mach-rk29/board-rk29-k97.c b/arch/arm/mach-rk29/board-rk29-k97.c index 8135e530cda4..4933e1879d4e 100755 --- a/arch/arm/mach-rk29/board-rk29-k97.c +++ b/arch/arm/mach-rk29/board-rk29-k97.c @@ -67,6 +67,43 @@ #include "../../../drivers/cir/bu92747guw_cir.h" #endif #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #ifdef CONFIG_SOC_CAMERA_OV2655 diff --git a/arch/arm/mach-rk2928/board-rk2928-a720-camera.c b/arch/arm/mach-rk2928/board-rk2928-a720-camera.c index ccb65c2195c5..c0b69f2679b7 100644 --- a/arch/arm/mach-rk2928/board-rk2928-a720-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-a720-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ diff --git a/arch/arm/mach-rk2928/board-rk2928-camera.c b/arch/arm/mach-rk2928/board-rk2928-camera.c index 2d182b1edb0f..6138033980c6 100755 --- a/arch/arm/mach-rk2928/board-rk2928-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-camera.c @@ -1,5 +1,42 @@ #include #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 BACK_SENSOR_0 /* back camera sensor 0 */ diff --git a/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c b/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c index 997ae2426ba7..a87323fe7f72 100755 --- a/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-phonepad-760-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_GC2035 /* back camera sensor */ diff --git a/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c b/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c index b8ff7918b3ce..1ae48b0deb87 100755 --- a/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-sdk-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ diff --git a/arch/arm/mach-rk2928/board-rk2928-tb-camera.c b/arch/arm/mach-rk2928/board-rk2928-tb-camera.c index ad549249f5c2..5dc0edc3e40e 100644 --- a/arch/arm/mach-rk2928/board-rk2928-tb-camera.c +++ b/arch/arm/mach-rk2928/board-rk2928-tb-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3066b-m701-camera.c b/arch/arm/mach-rk30/board-rk3066b-m701-camera.c index 19e4cff0fe4f..2264a81a3146 100644 --- a/arch/arm/mach-rk30/board-rk3066b-m701-camera.c +++ b/arch/arm/mach-rk30/board-rk3066b-m701-camera.c @@ -1,4 +1,43 @@ #ifdef CONFIG_VIDEO_RK29 + +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; + /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_HI253 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c b/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c index 3d0ea57b77e5..66c32c19d924 100755 --- a/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c +++ b/arch/arm/mach-rk30/board-rk3066b-sdk-camera.c @@ -1,4 +1,42 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; + /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3168-86v-camera.c b/arch/arm/mach-rk30/board-rk3168-86v-camera.c index 3b58c7203ce6..f61ea0e32908 100755 --- a/arch/arm/mach-rk30/board-rk3168-86v-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-86v-camera.c @@ -1,4 +1,42 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; + /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c index a7281382fdc0..a4ee55222985 100644 --- a/arch/arm/mach-rk30/board-rk3168-LR097-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-LR097-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV2659 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c b/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c index cfde4270fae0..4ac0a2a2d097 100644 --- a/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-ds1006h-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5640 /* back camera sensor */ diff --git a/arch/arm/mach-rk30/board-rk3168-tb-camera.c b/arch/arm/mach-rk30/board-rk3168-tb-camera.c index 5846de7f65ad..322013d93f5f 100755 --- a/arch/arm/mach-rk30/board-rk3168-tb-camera.c +++ b/arch/arm/mach-rk30/board-rk3168-tb-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5642 /* back camera sensor */ diff --git a/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c b/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c index 8a209ba7eace..30fc9258b34b 100755 --- a/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c +++ b/arch/arm/mach-rk3188/board-rk3188-u30gt2-camera.c @@ -1,4 +1,41 @@ #ifdef CONFIG_VIDEO_RK29 +#include +/* Notes: + +Simple camera device registration: + + new_camera_device(sensor_name,\ // sensor name, it is equal to CONFIG_SENSOR_X + face,\ // sensor face information, it can be back or front + pwdn_io,\ // power down gpio configuration, it is equal to CONFIG_SENSOR_POWERDN_PIN_XX + flash_attach,\ // sensor is attach flash or not + mir,\ // sensor image mirror and flip control information + i2c_chl,\ // i2c channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_IIC_ADAPTER_ID_X + cif_chl) \ // cif channel which the sensor attached in hardware, it is equal to CONFIG_SENSOR_CIF_INDEX_X + +Comprehensive camera device registration: + + new_camera_device_ex(sensor_name,\ + face,\ + ori,\ // sensor orientation, it is equal to CONFIG_SENSOR_ORIENTATION_X + pwr_io,\ // sensor power gpio configuration, it is equal to CONFIG_SENSOR_POWER_PIN_XX + pwr_active,\ // sensor power active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + rst_io,\ // sensor reset gpio configuration, it is equal to CONFIG_SENSOR_RESET_PIN_XX + rst_active,\ // sensor reset active level, is equal to CONFIG_SENSOR_RESETACTIVE_LEVEL_X + pwdn_io,\ + pwdn_active,\ // sensor power down active level, is equal to CONFIG_SENSOR_POWERDNACTIVE_LEVEL_X + flash_attach,\ + res,\ // sensor resolution, this is real resolution or resoltuion after interpolate + mir,\ + i2c_chl,\ + i2c_spd,\ // i2c speed , 100000 = 100KHz + i2c_addr,\ // the i2c slave device address for sensor + cif_chl,\ + mclk)\ // sensor input clock rate, 24 or 48 + +*/ +static struct rkcamera_platform_data new_camera[] = { + new_camera_device_end +}; /*---------------- Camera Sensor Macro Define Begin ------------------------*/ /*---------------- Camera Sensor Configuration Macro Begin ------------------------*/ #define CONFIG_SENSOR_0 RK29_CAM_SENSOR_OV5640 /* back camera sensor */ diff --git a/drivers/media/video/rk30_camera.c b/drivers/media/video/rk30_camera.c index b5ca10be2f78..9fbf07b9a4e0 100755 --- a/drivers/media/video/rk30_camera.c +++ b/drivers/media/video/rk30_camera.c @@ -1070,14 +1070,16 @@ static int rk_register_camera_devices(void) new_camera++; } } - + #if RK_SUPPORT_CIF0 if (host_registered_0) { platform_device_register(&rk_device_camera_host_0); } - + #endif + #if RK_SUPPORT_CIF1 if (host_registered_1) { platform_device_register(&rk_device_camera_host_1); } + #endif for (i=0; i