diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-27 20:06:09 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-02-27 20:06:09 +0100 |
commit | ef5e52021856647afdbf2f88b5564cb22250290b (patch) | |
tree | 066a0a5ba8a5e5051ce91868dc830c39ceab7624 /linux/include/media | |
parent | 89332c1ec9b859922645e86f2fef316ebdc3ff28 (diff) | |
download | mediapointer-dvb-s2-ef5e52021856647afdbf2f88b5564cb22250290b.tar.gz mediapointer-dvb-s2-ef5e52021856647afdbf2f88b5564cb22250290b.tar.bz2 |
Improve VIDIOC_G_CHIP_IDENT (better diagnostics)
From: Hans Verkuil <hverkuil@xs4all.nl>
Simplify the VIDIOC_G_CHIP_IDENT implementation by adding a single
common function. The ident can now also return NONE: not found, UNKNOWN:
found, but we don't know what chip it is, and AMBIGUOUS: multiple
chips were matched so the match values were too general.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include/media')
-rw-r--r-- | linux/include/media/v4l2-chip-ident.h | 4 | ||||
-rw-r--r-- | linux/include/media/v4l2-common.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/linux/include/media/v4l2-chip-ident.h b/linux/include/media/v4l2-chip-ident.h index 5698fcd1d..7d0c65413 100644 --- a/linux/include/media/v4l2-chip-ident.h +++ b/linux/include/media/v4l2-chip-ident.h @@ -27,7 +27,9 @@ /* VIDIOC_G_CHIP_IDENT: identifies the actual chip installed on the board */ enum { /* general idents: reserved range 0-49 */ - V4L2_IDENT_UNKNOWN = 0, + V4L2_IDENT_NONE = 0, /* No chip matched */ + V4L2_IDENT_AMBIGUOUS = 1, /* Match too general, multiple chips matched */ + V4L2_IDENT_UNKNOWN = 2, /* Chip found, but cannot identify */ /* module saa7110: just ident= 100 */ V4L2_IDENT_SAA7110 = 100, diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index cc2ab055a..579835f92 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -104,6 +104,8 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); struct i2c_client; /* forward reference */ int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); +int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip, + u32 ident, u32 revision); int v4l2_chip_match_host(u32 id_type, u32 chip_id); /* ------------------------------------------------------------------------- */ |