From: Jean Delvare <khali@linux-fr.org>
To: LMML <linux-media@vger.kernel.org>
Subject: [PATCH] saa7134: Complete the IR address list
Date: Fri, 2 Oct 2009 14:48:04 +0200 [thread overview]
Message-ID: <20091002144804.56b0b908@hyperion.delvare> (raw)
Google is pretty clear that the HVR 1110 IR chip is always at address
0x71 and the BeholdTV IR chip is always at address 0x2d. This
completes the list of IR device addresses for the SAA7134-based
adapters, and we no longer need to probe any of them.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
Note: this goes on top of the other saa7134 patches I've sent earlier
today.
linux/drivers/media/video/saa7134/saa7134-input.c | 25 ++++++---------------
1 file changed, 8 insertions(+), 17 deletions(-)
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-input.c 2009-10-02 13:50:12.000000000 +0200
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-input.c 2009-10-02 14:29:07.000000000 +0200
@@ -746,10 +746,6 @@ void saa7134_probe_i2c_ir(struct saa7134
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
struct i2c_board_info info;
- const unsigned short addr_list[] = {
- 0x47, 0x71, 0x2d,
- I2C_CLIENT_END
- };
struct i2c_msg msg_msi = {
.addr = 0x50,
@@ -846,6 +842,7 @@ void saa7134_probe_i2c_ir(struct saa7134
dev->init_data.name = "HVR 1110";
dev->init_data.get_key = get_key_hvr1110;
dev->init_data.ir_codes = &ir_codes_hauppauge_new_table;
+ info.addr = 0x71;
#endif
break;
case SAA7134_BOARD_BEHOLD_607FM_MK3:
@@ -869,30 +866,24 @@ void saa7134_probe_i2c_ir(struct saa7134
dev->init_data.name = "BeholdTV";
dev->init_data.get_key = get_key_beholdm6xx;
dev->init_data.ir_codes = &ir_codes_behold_table;
+ info.addr = 0x2d;
#endif
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
- default:
- dprintk("Shouldn't get here: Unknown board %x for I2C IR?\n",dev->board);
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
case SAA7134_BOARD_AVERMEDIA_CARDBUS_501:
case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
info.addr = 0x40;
-#endif
break;
+#endif
+ default:
+ dprintk("No I2C IR support for board %x\n", dev->board);
+ return;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
if (dev->init_data.name)
info.platform_data = &dev->init_data;
- /* No need to probe if address is known */
- if (info.addr) {
- i2c_new_device(&dev->i2c_adap, &info);
- return;
- }
-
- /* Address not known, fallback to probing */
- i2c_new_probed_device(&dev->i2c_adap, &info, addr_list);
+ i2c_new_device(&dev->i2c_adap, &info);
#endif
}
--
Jean Delvare
reply other threads:[~2009-10-02 12:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091002144804.56b0b908@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox