aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda9875.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tda9875.c')
-rw-r--r--drivers/media/video/tda9875.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c
index 00c6cbe06ab0..24e2b7d2ae58 100644
--- a/drivers/media/video/tda9875.c
+++ b/drivers/media/video/tda9875.c
@@ -28,20 +28,13 @@
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/videodev2.h> 29#include <linux/videodev2.h>
30#include <media/v4l2-device.h> 30#include <media/v4l2-device.h>
31#include <media/v4l2-i2c-drv-legacy.h> 31#include <media/v4l2-i2c-drv.h>
32#include <media/i2c-addr.h> 32#include <media/i2c-addr.h>
33 33
34static int debug; /* insmod parameter */ 34static int debug; /* insmod parameter */
35module_param(debug, int, S_IRUGO | S_IWUSR); 35module_param(debug, int, S_IRUGO | S_IWUSR);
36MODULE_LICENSE("GPL"); 36MODULE_LICENSE("GPL");
37 37
38/* Addresses to scan */
39static unsigned short normal_i2c[] = {
40 I2C_ADDR_TDA9875 >> 1,
41 I2C_CLIENT_END
42};
43
44I2C_CLIENT_INSMOD;
45 38
46/* This is a superset of the TDA9875 */ 39/* This is a superset of the TDA9875 */
47struct tda9875 { 40struct tda9875 {
@@ -313,18 +306,14 @@ static int tda9875_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc)
313{ 306{
314 switch (qc->id) { 307 switch (qc->id) {
315 case V4L2_CID_AUDIO_VOLUME: 308 case V4L2_CID_AUDIO_VOLUME:
309 return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 58880);
316 case V4L2_CID_AUDIO_BASS: 310 case V4L2_CID_AUDIO_BASS:
317 case V4L2_CID_AUDIO_TREBLE: 311 case V4L2_CID_AUDIO_TREBLE:
318 return v4l2_ctrl_query_fill_std(qc); 312 return v4l2_ctrl_query_fill(qc, 0, 65535, 65535 / 100, 32768);
319 } 313 }
320 return -EINVAL; 314 return -EINVAL;
321} 315}
322 316
323static int tda9875_command(struct i2c_client *client, unsigned cmd, void *arg)
324{
325 return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
326}
327
328/* ----------------------------------------------------------------------- */ 317/* ----------------------------------------------------------------------- */
329 318
330static const struct v4l2_subdev_core_ops tda9875_core_ops = { 319static const struct v4l2_subdev_core_ops tda9875_core_ops = {
@@ -401,8 +390,6 @@ MODULE_DEVICE_TABLE(i2c, tda9875_id);
401 390
402static struct v4l2_i2c_driver_data v4l2_i2c_data = { 391static struct v4l2_i2c_driver_data v4l2_i2c_data = {
403 .name = "tda9875", 392 .name = "tda9875",
404 .driverid = I2C_DRIVERID_TDA9875,
405 .command = tda9875_command,
406 .probe = tda9875_probe, 393 .probe = tda9875_probe,
407 .remove = tda9875_remove, 394 .remove = tda9875_remove,
408 .id_table = tda9875_id, 395 .id_table = tda9875_id,