diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-04-27 11:31:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:43:50 -0400 |
commit | 74cab31c413c8615efe818d44ff4ac83e2a138be (patch) | |
tree | 036e32f1b1a928901f6f2ab4b9921c39aa8de82c /drivers/media/video/msp3400-driver.c | |
parent | 1a0adaf37c30e89e44d1470ef604a930999a5826 (diff) |
V4L/DVB (5355): Add VIDIOC_G_CHIP_IDENT to various i2c modules
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/msp3400-driver.c')
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index ba1af3c8525e..3bb7d6634862 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -773,6 +773,9 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
773 | break; | 773 | break; |
774 | } | 774 | } |
775 | 775 | ||
776 | case VIDIOC_G_CHIP_IDENT: | ||
777 | return v4l2_chip_ident_i2c_client(client, arg, state->ident, (state->rev1 << 16) | state->rev2); | ||
778 | |||
776 | default: | 779 | default: |
777 | /* unknown */ | 780 | /* unknown */ |
778 | return -EINVAL; | 781 | return -EINVAL; |
@@ -872,6 +875,8 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) | |||
872 | snprintf(client->name, sizeof(client->name), "MSP%d4%02d%c-%c%d", | 875 | snprintf(client->name, sizeof(client->name), "MSP%d4%02d%c-%c%d", |
873 | msp_family, msp_product, | 876 | msp_family, msp_product, |
874 | msp_revision, msp_hard, msp_rom); | 877 | msp_revision, msp_hard, msp_rom); |
878 | /* Rev B=2, C=3, D=4, G=7 */ | ||
879 | state->ident = msp_family * 10000 + 4000 + msp_product * 10 + msp_revision - '@'; | ||
875 | 880 | ||
876 | /* Has NICAM support: all mspx41x and mspx45x products have NICAM */ | 881 | /* Has NICAM support: all mspx41x and mspx45x products have NICAM */ |
877 | state->has_nicam = msp_prod_hi == 1 || msp_prod_hi == 5; | 882 | state->has_nicam = msp_prod_hi == 1 || msp_prod_hi == 5; |