summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cs53l32a.c4
-rw-r--r--linux/drivers/media/video/msp3400-driver.c5
-rw-r--r--linux/drivers/media/video/msp3400-driver.h1
-rw-r--r--linux/drivers/media/video/tvaudio.c4
-rw-r--r--linux/drivers/media/video/upd64031a.c4
-rw-r--r--linux/drivers/media/video/upd64083.c5
-rw-r--r--linux/drivers/media/video/wm8739.c4
-rw-r--r--linux/drivers/media/video/wm8775.c4
8 files changed, 31 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c
index 07644a97d..f0240e079 100644
--- a/linux/drivers/media/video/cs53l32a.c
+++ b/linux/drivers/media/video/cs53l32a.c
@@ -28,6 +28,7 @@
#include <linux/i2c-id.h>
#include <linux/videodev.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#include <linux/slab.h>
@@ -115,6 +116,9 @@ static int cs53l32a_command(struct i2c_client *client, unsigned int cmd,
cs53l32a_write(client, 0x05, (u8) ctrl->value);
break;
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_CS53l32A, 0);
+
case VIDIOC_LOG_STATUS:
{
u8 v = cs53l32a_read(client, 0x01);
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 9958e2570..0e21a5b57 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -817,6 +817,9 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
break;
}
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, state->ident, (state->rev1 << 16) | state->rev2);
+
default:
/* unknown */
return -EINVAL;
@@ -944,6 +947,8 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
snprintf(client->name, sizeof(client->name), "MSP%d4%02d%c-%c%d",
msp_family, msp_product,
msp_revision, msp_hard, msp_rom);
+ /* Rev B=2, C=3, D=4, G=7 */
+ state->ident = msp_family * 10000 + 4000 + msp_product * 10 + msp_revision - '@';
/* Has NICAM support: all mspx41x and mspx45x products have NICAM */
state->has_nicam = msp_prod_hi == 1 || msp_prod_hi == 5;
diff --git a/linux/drivers/media/video/msp3400-driver.h b/linux/drivers/media/video/msp3400-driver.h
index a783277ab..cbd4a91f5 100644
--- a/linux/drivers/media/video/msp3400-driver.h
+++ b/linux/drivers/media/video/msp3400-driver.h
@@ -50,6 +50,7 @@ extern int msp_stereo_thresh;
struct msp_state {
int rev1, rev2;
+ int ident;
u8 has_nicam;
u8 has_radio;
u8 has_headphones;
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index e08484fd2..cc885951e 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -40,6 +40,7 @@
#endif
#include <media/tvaudio.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#include <media/i2c-addr.h>
@@ -1814,6 +1815,9 @@ static int chip_command(struct i2c_client *client,
/* the thread will call checkmode() later */
}
break;
+
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_TVAUDIO, 0);
}
return 0;
}
diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c
index 3a7db9f7a..bd6a50ec7 100644
--- a/linux/drivers/media/video/upd64031a.c
+++ b/linux/drivers/media/video/upd64031a.c
@@ -27,6 +27,7 @@
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#include <media/upd64031a.h>
#include "compat.h"
@@ -187,6 +188,9 @@ static int upd64031a_command(struct i2c_client *client, unsigned int cmd, void *
}
#endif
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_UPD64031A, 0);
+
default:
break;
}
diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c
index 317baed46..ccf340a5b 100644
--- a/linux/drivers/media/video/upd64083.c
+++ b/linux/drivers/media/video/upd64083.c
@@ -26,6 +26,7 @@
#include <linux/i2c.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#include <media/upd64083.h>
#include "compat.h"
@@ -163,6 +164,10 @@ static int upd64083_command(struct i2c_client *client, unsigned int cmd, void *a
break;
}
#endif
+
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_UPD64083, 0);
+
default:
break;
}
diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c
index 4b4e5277f..da14fa401 100644
--- a/linux/drivers/media/video/wm8739.c
+++ b/linux/drivers/media/video/wm8739.c
@@ -29,6 +29,7 @@
#include <linux/i2c-id.h>
#include <linux/videodev.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#include <linux/slab.h>
@@ -248,6 +249,9 @@ static int wm8739_command(struct i2c_client *client, unsigned int cmd, void *arg
return -EINVAL;
}
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_WM8739, 0);
+
case VIDIOC_LOG_STATUS:
v4l_info(client, "Frequency: %u Hz\n", state->clock_freq);
v4l_info(client, "Volume L: %02x%s\n", state->vol_l & 0x1f,
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c
index d64f9c534..4727cbd6d 100644
--- a/linux/drivers/media/video/wm8775.c
+++ b/linux/drivers/media/video/wm8775.c
@@ -33,6 +33,7 @@
#include <linux/i2c-id.h>
#include <linux/videodev.h>
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#include <linux/slab.h>
@@ -132,6 +133,9 @@ static int wm8775_command(struct i2c_client *client, unsigned int cmd,
wm8775_write(client, R21, 0x100 + state->input);
break;
+ case VIDIOC_G_CHIP_IDENT:
+ return v4l2_chip_ident_i2c_client(client, arg, V4L2_IDENT_WM8775, 0);
+
case VIDIOC_LOG_STATUS:
v4l_info(client, "Input: %d%s\n", state->input,
state->muted ? " (muted)" : "");