mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-15 01:50:40 +09:00
camera: all sensor driver(ov3640/ov9650 exception) can be compiled success in rk30 and rk29
This commit is contained in:
@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "mt9d112.h"
|
||||
|
||||
static int debug;
|
||||
@@ -66,7 +66,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_Scene 1
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "mt9d113.h"
|
||||
|
||||
static int debug;
|
||||
@@ -69,7 +69,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_Scene 0
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
@@ -2921,7 +2921,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||
struct soc_camera_device *icd = client->dev.platform_data;
|
||||
struct sensor *sensor = to_sensor(client);
|
||||
int ret = 0;
|
||||
int ret = 0,i;
|
||||
|
||||
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
|
||||
switch (cmd)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "mt9m112.h"
|
||||
|
||||
static int debug;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "mt9p111.h"
|
||||
|
||||
static int debug;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "mt9t111.h"
|
||||
|
||||
static int debug;
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -55,7 +55,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
@@ -2824,7 +2824,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||
struct soc_camera_device *icd = client->dev.platform_data;
|
||||
struct sensor *sensor = to_sensor(client);
|
||||
int ret = 0;
|
||||
int ret = 0,i;
|
||||
|
||||
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
|
||||
switch (cmd)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "ov5640.h"
|
||||
|
||||
static int debug;
|
||||
@@ -63,7 +63,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_Scene 1
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
#ifdef CONFIG_OV5640_AUTOFOCUS
|
||||
@@ -3778,7 +3778,7 @@ static long sensor_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
|
||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||
struct soc_camera_device *icd = client->dev.platform_data;
|
||||
struct sensor *sensor = to_sensor(client);
|
||||
int ret = 0;
|
||||
int ret = 0,i;
|
||||
|
||||
SENSOR_DG("\n%s..%s..cmd:%x \n",SENSOR_NAME_STRING(),__FUNCTION__,cmd);
|
||||
switch (cmd)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include "ov5640.h"
|
||||
|
||||
static int debug = 1;
|
||||
|
||||
@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
#include <linux/delay.h>
|
||||
#include "s5k6aa.h"
|
||||
static int debug;
|
||||
|
||||
@@ -19,7 +19,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -64,7 +64,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
@@ -1800,7 +1800,6 @@ static int sensor_init(struct v4l2_subdev *sd, u32 val)
|
||||
#endif
|
||||
|
||||
#if CONFIG_SENSOR_Flash
|
||||
sensor_set_flash();
|
||||
qctrl = soc_camera_find_qctrl(&sensor_ops, V4L2_CID_FLASH);
|
||||
if (qctrl)
|
||||
sensor->info_priv.flash = qctrl->default_value;
|
||||
@@ -2049,7 +2048,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
|
||||
|
||||
if ((int)winseqe_set_addr != sensor->info_priv.winseqe_cur_addr) {
|
||||
#if CONFIG_SENSOR_Flash
|
||||
if (sensor_fmt_capturechk(sd,f) == true) { /* ddl@rock-chips.com : Capture */
|
||||
if (sensor_fmt_capturechk(sd,mf) == true) { /* ddl@rock-chips.com : Capture */
|
||||
if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) {
|
||||
sensor_ioctrl(icd, Sensor_Flash, Flash_On);
|
||||
SENSOR_DG("%s flash on in capture!\n", SENSOR_NAME_STRING());
|
||||
@@ -2065,7 +2064,7 @@ static int sensor_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
|
||||
if (ret != 0) {
|
||||
SENSOR_TR("%s set format capability failed\n", SENSOR_NAME_STRING());
|
||||
#if CONFIG_SENSOR_Flash
|
||||
if (sensor_fmt_capturechk(sd,f) == true) {
|
||||
if (sensor_fmt_capturechk(sd,mf) == true) {
|
||||
if ((sensor->info_priv.flash == 1) || (sensor->info_priv.flash == 2)) {
|
||||
sensor_ioctrl(icd, Sensor_Flash, Flash_Off);
|
||||
SENSOR_TR("%s Capture format set fail, flash off !\n", SENSOR_NAME_STRING());
|
||||
|
||||
@@ -20,7 +20,7 @@ o* Driver for MT9M001 CMOS Image Sensor from Micron
|
||||
#include <media/v4l2-common.h>
|
||||
#include <media/v4l2-chip-ident.h>
|
||||
#include <media/soc_camera.h>
|
||||
#include <mach/rk29_camera.h>
|
||||
#include <plat/rk_camera.h>
|
||||
|
||||
static int debug;
|
||||
module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
@@ -65,7 +65,7 @@ module_param(debug, int, S_IRUGO|S_IWUSR);
|
||||
#define CONFIG_SENSOR_DigitalZoom 0
|
||||
#define CONFIG_SENSOR_Focus 0
|
||||
#define CONFIG_SENSOR_Exposure 0
|
||||
#define CONFIG_SENSOR_Flash 0
|
||||
#define CONFIG_SENSOR_Flash 1
|
||||
#define CONFIG_SENSOR_Mirror 0
|
||||
#define CONFIG_SENSOR_Flip 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user