diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-05-13 15:51:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:11 -0400 |
commit | ec218a412bcc126d49dec002d06b24a10d0ab6cd (patch) | |
tree | f937a5ecdf873c909193e9dee4044458569f97c3 /drivers/media/video/saa7134 | |
parent | 9a4cc5ac991d3b697db4f9e5015a758621a95009 (diff) |
V4L/DVB (11847): saa7134: Simplify handling of IR on MSI TV@nywhere Plus
Now that we instantiate I2C IR devices explicitly, we can skip probing
altogether on boards where the I2C IR device address is known. The MSI
TV@nywhere Plus is one of these boards.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index a20f687f81a8..97fe6d14174a 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -691,9 +691,6 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev) | |||
691 | I2C_CLIENT_END | 691 | I2C_CLIENT_END |
692 | }; | 692 | }; |
693 | 693 | ||
694 | const unsigned short addr_list_msi[] = { | ||
695 | 0x30, I2C_CLIENT_END | ||
696 | }; | ||
697 | struct i2c_msg msg_msi = { | 694 | struct i2c_msg msg_msi = { |
698 | .addr = 0x50, | 695 | .addr = 0x50, |
699 | .flags = I2C_M_RD, | 696 | .flags = I2C_M_RD, |
@@ -747,6 +744,15 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev) | |||
747 | init_data.name = "MSI TV@nywhere Plus"; | 744 | init_data.name = "MSI TV@nywhere Plus"; |
748 | init_data.get_key = get_key_msi_tvanywhere_plus; | 745 | init_data.get_key = get_key_msi_tvanywhere_plus; |
749 | init_data.ir_codes = ir_codes_msi_tvanywhere_plus; | 746 | init_data.ir_codes = ir_codes_msi_tvanywhere_plus; |
747 | info.addr = 0x30; | ||
748 | /* MSI TV@nywhere Plus controller doesn't seem to | ||
749 | respond to probes unless we read something from | ||
750 | an existing device. Weird... | ||
751 | REVISIT: might no longer be needed */ | ||
752 | rc = i2c_transfer(&dev->i2c_adap, &msg_msi, 1); | ||
753 | dprintk(KERN_DEBUG "probe 0x%02x @ %s: %s\n", | ||
754 | msg_msi.addr, dev->i2c_adap.name, | ||
755 | (1 == rc) ? "yes" : "no"); | ||
750 | break; | 756 | break; |
751 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: | 757 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: |
752 | init_data.name = "HVR 1110"; | 758 | init_data.name = "HVR 1110"; |
@@ -773,18 +779,14 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev) | |||
773 | 779 | ||
774 | if (init_data.name) | 780 | if (init_data.name) |
775 | info.platform_data = &init_data; | 781 | info.platform_data = &init_data; |
776 | client = i2c_new_probed_device(&dev->i2c_adap, &info, addr_list); | 782 | /* No need to probe if address is known */ |
777 | if (client) | 783 | if (info.addr) { |
784 | i2c_new_device(&dev->i2c_adap, &info); | ||
778 | return; | 785 | return; |
786 | } | ||
779 | 787 | ||
780 | /* MSI TV@nywhere Plus controller doesn't seem to | 788 | /* Address not known, fallback to probing */ |
781 | respond to probes unless we read something from | 789 | client = i2c_new_probed_device(&dev->i2c_adap, &info, addr_list); |
782 | an existing device. Weird... */ | ||
783 | rc = i2c_transfer(&dev->i2c_adap, &msg_msi, 1); | ||
784 | dprintk(KERN_DEBUG "probe 0x%02x @ %s: %s\n", | ||
785 | msg_msi.addr, dev->i2c_adap.name, | ||
786 | (1 == rc) ? "yes" : "no"); | ||
787 | client = i2c_new_probed_device(&dev->i2c_adap, &info, addr_list_msi); | ||
788 | if (client) | 790 | if (client) |
789 | return; | 791 | return; |
790 | 792 | ||