From: ddl Date: Mon, 15 Apr 2013 07:26:28 +0000 (+0800) Subject: camera: update board-rk30-ds975.c for new_camera struct X-Git-Tag: firefly_0821_release~7273 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4a4960b9c5a5867b2cb43869e8b11a8d108940df;p=firefly-linux-kernel-4.4.55.git camera: update board-rk30-ds975.c for new_camera struct --- diff --git a/arch/arm/mach-rk30/board-rk30-ds975.c b/arch/arm/mach-rk30/board-rk30-ds975.c index 5b821b2609ec..303256212149 100755 --- a/arch/arm/mach-rk30/board-rk30-ds975.c +++ b/arch/arm/mach-rk30/board-rk30-ds975.c @@ -194,10 +194,61 @@ struct rk29_keys_platform_data rk29_keys_pdata = { #define RK30_IPP_MEM_SIZE 8*SZ_1M #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(RK29_CAM_SENSOR_OV2659, + back, + RK30_PIN1_PD6, + 0, + 0, + 3, + 0), + new_camera_device(RK29_CAM_SENSOR_OV2659, + front, + RK30_PIN1_PB7, + 0, + 0, + 3, + 0), + 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 */ -#define CONFIG_SENSOR_IIC_ADDR_0 0x60 +#define CONFIG_SENSOR_IIC_ADDR_0 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_0 3 #define CONFIG_SENSOR_CIF_INDEX_0 0 #define CONFIG_SENSOR_ORIENTATION_0 90 @@ -266,7 +317,7 @@ struct rk29_keys_platform_data rk29_keys_pdata = { #define CONFIG_SENSOR_720P_FPS_FIXED_02 30000 #define CONFIG_SENSOR_1 RK29_CAM_SENSOR_OV2659 /* front camera sensor 0 */ -#define CONFIG_SENSOR_IIC_ADDR_1 0x60 +#define CONFIG_SENSOR_IIC_ADDR_1 0x00 #define CONFIG_SENSOR_IIC_ADAPTER_ID_1 3 #define CONFIG_SENSOR_CIF_INDEX_1 0 #define CONFIG_SENSOR_ORIENTATION_1 270