Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124454
b: refs/heads/master
c: bc97430
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 30, 2008
1 parent f66da1a commit f71fff1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3ee7e21f25cdd50cccc906dc09e547f36166372
refs/heads/master: bc97430510960846b6e8f2d62c503653031991e1
16 changes: 16 additions & 0 deletions trunk/drivers/media/video/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <media/v4l2-device.h>
#include <media/tvp5150.h>
#include <media/v4l2-i2c-drv-legacy.h>
#include <media/v4l2-chip-ident.h>

#include "tvp5150_reg.h"

Expand Down Expand Up @@ -961,6 +962,20 @@ static int tvp5150_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
}


static int tvp5150_g_chip_ident(struct v4l2_subdev *sd,
struct v4l2_chip_ident *chip)
{
int rev;
struct i2c_client *client = v4l2_get_subdevdata(sd);

rev = tvp5150_read(sd, TVP5150_ROM_MAJOR_VER) << 8 |
tvp5150_read(sd, TVP5150_ROM_MINOR_VER);

return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVP5150,
rev);
}


#ifdef CONFIG_VIDEO_ADV_DEBUG
static int tvp5150_g_register(struct v4l2_subdev *sd, struct v4l2_register *reg)
{
Expand Down Expand Up @@ -1026,6 +1041,7 @@ static const struct v4l2_subdev_core_ops tvp5150_core_ops = {
.s_ctrl = tvp5150_s_ctrl,
.queryctrl = tvp5150_queryctrl,
.reset = tvp5150_reset,
.g_chip_ident = tvp5150_g_chip_ident,
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = tvp5150_g_register,
.s_register = tvp5150_s_register,
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/media/v4l2-chip-ident.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ enum {
/* module vp27smpx: just ident 2700 */
V4L2_IDENT_VP27SMPX = 2700,

/* module tvp5150 */
V4L2_IDENT_TVP5150 = 5150,

/* module cs5345: just ident 5345 */
V4L2_IDENT_CS5345 = 5345,

Expand Down

0 comments on commit f71fff1

Please sign in to comment.