aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-i2c.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-i2c.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-i2c.c b/drivers/media/video/cx231xx/cx231xx-i2c.c
index 4489126c48c1..f95114aa23a1 100644
--- a/drivers/media/video/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/video/cx231xx/cx231xx-i2c.c
@@ -435,18 +435,6 @@ static int attach_inform(struct i2c_client *client)
435 struct cx231xx *dev = bus->dev; 435 struct cx231xx *dev = bus->dev;
436 436
437 switch (client->addr << 1) { 437 switch (client->addr << 1) {
438 case 0x32:
439 dprintk1(1, "attach_inform: Geminit III detected.\n");
440 break;
441 case 0x02:
442 dprintk1(1, "attach_inform: Acquarius detected.\n");
443 break;
444 case 0xa0:
445 dprintk1(1, "attach_inform: eeprom detected.\n");
446 break;
447 case 0x60:
448 dprintk1(1, "attach_inform: Colibri detected.\n");
449 break;
450 case 0x8e: 438 case 0x8e:
451 { 439 {
452 struct IR_i2c *ir = i2c_get_clientdata(client); 440 struct IR_i2c *ir = i2c_get_clientdata(client);
@@ -455,28 +443,15 @@ static int attach_inform(struct i2c_client *client)
455 cx231xx_set_ir(dev, ir); 443 cx231xx_set_ir(dev, ir);
456 break; 444 break;
457 } 445 }
458 case 0x80:
459 case 0x88:
460 dprintk1(1, "attach_inform: Hammerhead detected.\n");
461 break; 446 break;
462 447
463 default: 448 default:
464 if (!dev->tuner_addr) 449 break;
465 dev->tuner_addr = client->addr;
466
467 dprintk1(1, "attach inform: detected I2C address %x\n",
468 client->addr << 1);
469 } 450 }
470 451
471 return 0; 452 return 0;
472} 453}
473 454
474static int detach_inform(struct i2c_client *client)
475{
476 dprintk1(1, "i2c detach [client=%s]\n", client->name);
477 return 0;
478}
479
480static struct i2c_algorithm cx231xx_algo = { 455static struct i2c_algorithm cx231xx_algo = {
481 .master_xfer = cx231xx_i2c_xfer, 456 .master_xfer = cx231xx_i2c_xfer,
482 .functionality = functionality, 457 .functionality = functionality,
@@ -484,12 +459,10 @@ static struct i2c_algorithm cx231xx_algo = {
484 459
485static struct i2c_adapter cx231xx_adap_template = { 460static struct i2c_adapter cx231xx_adap_template = {
486 .owner = THIS_MODULE, 461 .owner = THIS_MODULE,
487 .class = I2C_CLASS_TV_ANALOG,
488 .name = "cx231xx", 462 .name = "cx231xx",
489 .id = I2C_HW_B_CX231XX, 463 .id = I2C_HW_B_CX231XX,
490 .algo = &cx231xx_algo, 464 .algo = &cx231xx_algo,
491 .client_register = attach_inform, 465 .client_register = attach_inform,
492 .client_unregister = detach_inform,
493}; 466};
494 467
495static struct i2c_client cx231xx_client_template = { 468static struct i2c_client cx231xx_client_template = {
@@ -536,19 +509,6 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c)
536} 509}
537 510
538/* 511/*
539 * cx231xx_i2c_call_clients()
540 * send commands to all attached i2c devices
541 */
542void cx231xx_i2c_call_clients(struct cx231xx_i2c *bus, unsigned int cmd,
543 void *arg)
544{
545 /* struct cx231xx *dev = bus->dev; */
546
547 BUG_ON(NULL == bus->i2c_adap.algo_data);
548 i2c_clients_command(&bus->i2c_adap, cmd, arg);
549}
550
551/*
552 * cx231xx_i2c_register() 512 * cx231xx_i2c_register()
553 * register i2c bus 513 * register i2c bus
554 */ 514 */
@@ -571,7 +531,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
571 531
572 bus->i2c_algo.data = bus; 532 bus->i2c_algo.data = bus;
573 bus->i2c_adap.algo_data = bus; 533 bus->i2c_adap.algo_data = bus;
574 i2c_set_adapdata(&bus->i2c_adap, bus); 534 i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
575 i2c_add_adapter(&bus->i2c_adap); 535 i2c_add_adapter(&bus->i2c_adap);
576 536
577 bus->i2c_client.adapter = &bus->i2c_adap; 537 bus->i2c_client.adapter = &bus->i2c_adap;