Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271735
b: refs/heads/master
c: bdfe91f
h: refs/heads/master
i:
  271733: 6e2d3cd
  271731: e4d1f45
  271727: 78d5493
v: v3
  • Loading branch information
Joe Perches authored and Mauro Carvalho Chehab committed Sep 4, 2011
1 parent 6bbbeed commit c45e130
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 75 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d650fc30c0328eceb0e48f348e01e073b5a7f1f6
refs/heads/master: bdfe91f411bd05392952efc1afdce8bda1923517
9 changes: 5 additions & 4 deletions trunk/drivers/media/video/gspca/m5602/m5602_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "m5602_ov9650.h"
#include "m5602_ov7660.h"
#include "m5602_mt9m111.h"
Expand Down Expand Up @@ -192,10 +194,9 @@ static void m5602_dump_bridge(struct sd *sd)
for (i = 0; i < 0x80; i++) {
unsigned char val = 0;
m5602_read_bridge(sd, i, &val);
info("ALi m5602 address 0x%x contains 0x%x", i, val);
pr_info("ALi m5602 address 0x%x contains 0x%x\n", i, val);
}
info("Warning: The ALi m5602 webcam probably won't work "
"until it's power cycled");
pr_info("Warning: The ALi m5602 webcam probably won't work until it's power cycled\n");
}

static int m5602_probe_sensor(struct sd *sd)
Expand Down Expand Up @@ -231,7 +232,7 @@ static int m5602_probe_sensor(struct sd *sd)
return 0;

/* More sensor probe function goes here */
info("Failed to find a sensor");
pr_info("Failed to find a sensor\n");
sd->sensor = NULL;
return -ENODEV;
}
Expand Down
28 changes: 15 additions & 13 deletions trunk/drivers/media/video/gspca/m5602/m5602_mt9m111.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "m5602_mt9m111.h"

static int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
Expand Down Expand Up @@ -163,7 +165,7 @@ int mt9m111_probe(struct sd *sd)

if (force_sensor) {
if (force_sensor == MT9M111_SENSOR) {
info("Forcing a %s sensor", mt9m111.name);
pr_info("Forcing a %s sensor\n", mt9m111.name);
goto sensor_found;
}
/* If we want to force another sensor, don't try to probe this
Expand Down Expand Up @@ -191,7 +193,7 @@ int mt9m111_probe(struct sd *sd)
return -ENODEV;

if ((data[0] == 0x14) && (data[1] == 0x3a)) {
info("Detected a mt9m111 sensor");
pr_info("Detected a mt9m111 sensor\n");
goto sensor_found;
}

Expand Down Expand Up @@ -612,34 +614,34 @@ static void mt9m111_dump_registers(struct sd *sd)
{
u8 address, value[2] = {0x00, 0x00};

info("Dumping the mt9m111 register state");
pr_info("Dumping the mt9m111 register state\n");

info("Dumping the mt9m111 sensor core registers");
pr_info("Dumping the mt9m111 sensor core registers\n");
value[1] = MT9M111_SENSOR_CORE;
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
for (address = 0; address < 0xff; address++) {
m5602_read_sensor(sd, address, value, 2);
info("register 0x%x contains 0x%x%x",
address, value[0], value[1]);
pr_info("register 0x%x contains 0x%x%x\n",
address, value[0], value[1]);
}

info("Dumping the mt9m111 color pipeline registers");
pr_info("Dumping the mt9m111 color pipeline registers\n");
value[1] = MT9M111_COLORPIPE;
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
for (address = 0; address < 0xff; address++) {
m5602_read_sensor(sd, address, value, 2);
info("register 0x%x contains 0x%x%x",
address, value[0], value[1]);
pr_info("register 0x%x contains 0x%x%x\n",
address, value[0], value[1]);
}

info("Dumping the mt9m111 camera control registers");
pr_info("Dumping the mt9m111 camera control registers\n");
value[1] = MT9M111_CAMERA_CONTROL;
m5602_write_sensor(sd, MT9M111_PAGE_MAP, value, 2);
for (address = 0; address < 0xff; address++) {
m5602_read_sensor(sd, address, value, 2);
info("register 0x%x contains 0x%x%x",
address, value[0], value[1]);
pr_info("register 0x%x contains 0x%x%x\n",
address, value[0], value[1]);
}

info("mt9m111 register state dump complete");
pr_info("mt9m111 register state dump complete\n");
}
21 changes: 11 additions & 10 deletions trunk/drivers/media/video/gspca/m5602/m5602_ov7660.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "m5602_ov7660.h"

static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
Expand Down Expand Up @@ -149,7 +151,7 @@ int ov7660_probe(struct sd *sd)

if (force_sensor) {
if (force_sensor == OV7660_SENSOR) {
info("Forcing an %s sensor", ov7660.name);
pr_info("Forcing an %s sensor\n", ov7660.name);
goto sensor_found;
}
/* If we want to force another sensor,
Expand Down Expand Up @@ -180,10 +182,10 @@ int ov7660_probe(struct sd *sd)
if (m5602_read_sensor(sd, OV7660_VER, &ver_id, 1))
return -ENODEV;

info("Sensor reported 0x%x%x", prod_id, ver_id);
pr_info("Sensor reported 0x%x%x\n", prod_id, ver_id);

if ((prod_id == 0x76) && (ver_id == 0x60)) {
info("Detected a ov7660 sensor");
pr_info("Detected a ov7660 sensor\n");
goto sensor_found;
}
return -ENODEV;
Expand Down Expand Up @@ -457,17 +459,16 @@ static int ov7660_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
static void ov7660_dump_registers(struct sd *sd)
{
int address;
info("Dumping the ov7660 register state");
pr_info("Dumping the ov7660 register state\n");
for (address = 0; address < 0xa9; address++) {
u8 value;
m5602_read_sensor(sd, address, &value, 1);
info("register 0x%x contains 0x%x",
address, value);
pr_info("register 0x%x contains 0x%x\n", address, value);
}

info("ov7660 register state dump complete");
pr_info("ov7660 register state dump complete\n");

info("Probing for which registers that are read/write");
pr_info("Probing for which registers that are read/write\n");
for (address = 0; address < 0xff; address++) {
u8 old_value, ctrl_value;
u8 test_value[2] = {0xff, 0xff};
Expand All @@ -477,9 +478,9 @@ static void ov7660_dump_registers(struct sd *sd)
m5602_read_sensor(sd, address, &ctrl_value, 1);

if (ctrl_value == test_value[0])
info("register 0x%x is writeable", address);
pr_info("register 0x%x is writeable\n", address);
else
info("register 0x%x is read only", address);
pr_info("register 0x%x is read only\n", address);

/* Restore original value */
m5602_write_sensor(sd, address, &old_value, 1);
Expand Down
19 changes: 10 additions & 9 deletions trunk/drivers/media/video/gspca/m5602/m5602_ov9650.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "m5602_ov9650.h"

static int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
Expand Down Expand Up @@ -299,7 +301,7 @@ int ov9650_probe(struct sd *sd)

if (force_sensor) {
if (force_sensor == OV9650_SENSOR) {
info("Forcing an %s sensor", ov9650.name);
pr_info("Forcing an %s sensor\n", ov9650.name);
goto sensor_found;
}
/* If we want to force another sensor,
Expand Down Expand Up @@ -330,7 +332,7 @@ int ov9650_probe(struct sd *sd)
return -ENODEV;

if ((prod_id == 0x96) && (ver_id == 0x52)) {
info("Detected an ov9650 sensor");
pr_info("Detected an ov9650 sensor\n");
goto sensor_found;
}
return -ENODEV;
Expand Down Expand Up @@ -850,17 +852,16 @@ static int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val)
static void ov9650_dump_registers(struct sd *sd)
{
int address;
info("Dumping the ov9650 register state");
pr_info("Dumping the ov9650 register state\n");
for (address = 0; address < 0xa9; address++) {
u8 value;
m5602_read_sensor(sd, address, &value, 1);
info("register 0x%x contains 0x%x",
address, value);
pr_info("register 0x%x contains 0x%x\n", address, value);
}

info("ov9650 register state dump complete");
pr_info("ov9650 register state dump complete\n");

info("Probing for which registers that are read/write");
pr_info("Probing for which registers that are read/write\n");
for (address = 0; address < 0xff; address++) {
u8 old_value, ctrl_value;
u8 test_value[2] = {0xff, 0xff};
Expand All @@ -870,9 +871,9 @@ static void ov9650_dump_registers(struct sd *sd)
m5602_read_sensor(sd, address, &ctrl_value, 1);

if (ctrl_value == test_value[0])
info("register 0x%x is writeable", address);
pr_info("register 0x%x is writeable\n", address);
else
info("register 0x%x is read only", address);
pr_info("register 0x%x is read only\n", address);

/* Restore original value */
m5602_write_sensor(sd, address, &old_value, 1);
Expand Down
21 changes: 11 additions & 10 deletions trunk/drivers/media/video/gspca/m5602/m5602_po1030.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "m5602_po1030.h"

static int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
Expand Down Expand Up @@ -197,7 +199,7 @@ int po1030_probe(struct sd *sd)

if (force_sensor) {
if (force_sensor == PO1030_SENSOR) {
info("Forcing a %s sensor", po1030.name);
pr_info("Forcing a %s sensor\n", po1030.name);
goto sensor_found;
}
/* If we want to force another sensor, don't try to probe this
Expand All @@ -221,7 +223,7 @@ int po1030_probe(struct sd *sd)
return -ENODEV;

if (dev_id_h == 0x30) {
info("Detected a po1030 sensor");
pr_info("Detected a po1030 sensor\n");
goto sensor_found;
}
return -ENODEV;
Expand Down Expand Up @@ -267,7 +269,7 @@ int po1030_init(struct sd *sd)
break;

default:
info("Invalid stream command, exiting init");
pr_info("Invalid stream command, exiting init\n");
return -EINVAL;
}
}
Expand Down Expand Up @@ -733,16 +735,15 @@ static void po1030_dump_registers(struct sd *sd)
int address;
u8 value = 0;

info("Dumping the po1030 sensor core registers");
pr_info("Dumping the po1030 sensor core registers\n");
for (address = 0; address < 0x7f; address++) {
m5602_read_sensor(sd, address, &value, 1);
info("register 0x%x contains 0x%x",
address, value);
pr_info("register 0x%x contains 0x%x\n", address, value);
}

info("po1030 register state dump complete");
pr_info("po1030 register state dump complete\n");

info("Probing for which registers that are read/write");
pr_info("Probing for which registers that are read/write\n");
for (address = 0; address < 0xff; address++) {
u8 old_value, ctrl_value;
u8 test_value[2] = {0xff, 0xff};
Expand All @@ -752,9 +753,9 @@ static void po1030_dump_registers(struct sd *sd)
m5602_read_sensor(sd, address, &ctrl_value, 1);

if (ctrl_value == test_value[0])
info("register 0x%x is writeable", address);
pr_info("register 0x%x is writeable\n", address);
else
info("register 0x%x is read only", address);
pr_info("register 0x%x is read only\n", address);

/* Restore original value */
m5602_write_sensor(sd, address, &old_value, 1);
Expand Down
Loading

0 comments on commit c45e130

Please sign in to comment.