Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137707
b: refs/heads/master
c: 2cc3b6b
h: refs/heads/master
i:
  137705: 96c466b
  137703: 6a312cb
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 1f37433 commit 6437f50
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 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: 8ed06fd4729d25959f6af8b7ce4e3888866bfe56
refs/heads/master: 2cc3b6bff46129374ee31236f804637278c5f323
23 changes: 13 additions & 10 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@

#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)

#define OP_STANDARD 0
#define OP_AUDIOMODE 1
#define OP_BCSH 2
#define OP_VOLUME 3
#define OP_FREQ 4
#define OP_AUDIORATE 5
#define OP_CROP 6
#define OP_SIZE 7
#define OP_LOG 8
#define OP_INIT 0 /* MUST come first so it is run first */
#define OP_STANDARD 1
#define OP_AUDIOMODE 2
#define OP_BCSH 3
#define OP_VOLUME 4
#define OP_FREQ 5
#define OP_AUDIORATE 6
#define OP_CROP 7
#define OP_SIZE 8
#define OP_LOG 9

static const struct pvr2_i2c_op * const ops[] = {
[OP_INIT] = &pvr2_i2c_op_v4l2_init,
[OP_STANDARD] = &pvr2_i2c_op_v4l2_standard,
[OP_AUDIOMODE] = &pvr2_i2c_op_v4l2_audiomode,
[OP_BCSH] = &pvr2_i2c_op_v4l2_bcsh,
Expand All @@ -56,7 +58,8 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
{
int id;
id = cp->client->driver->id;
cp->ctl_mask = ((1 << OP_STANDARD) |
cp->ctl_mask = ((1 << OP_INIT) |
(1 << OP_STANDARD) |
(1 << OP_AUDIOMODE) |
(1 << OP_BCSH) |
(1 << OP_VOLUME) |
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>

static void execute_init(struct pvr2_hdw *hdw)
{
u32 dummy = 0;
pvr2_trace(PVR2_TRACE_CHIPS, "i2c v4l2 init");
pvr2_i2c_core_cmd(hdw, VIDIOC_INT_INIT, &dummy);
}


const struct pvr2_i2c_op pvr2_i2c_op_v4l2_init = {
.update = execute_init,
.name = "v4l2_init",
};


static void set_standard(struct pvr2_hdw *hdw)
{
pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_standard");
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "pvrusb2-i2c-core.h"

extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_init;
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard;
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_radio;
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_bcsh;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ int pvr2_i2c_core_check_stale(struct pvr2_hdw *hdw)
if (!(msk & pm)) continue;
pm &= ~msk;
opf = pvr2_i2c_get_op(idx);
if (!opf) continue;
if (!(opf && opf->check)) continue;
if (opf->check(hdw)) {
sm |= msk;
}
Expand Down

0 comments on commit 6437f50

Please sign in to comment.