From: "Hans-Frieder Vogt" <hfvogt@gmx.net>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: [PATCH][GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 i2c read fix
Date: Sun, 1 Apr 2012 20:11:29 +0200 [thread overview]
Message-ID: <201204012011.29830.hfvogt@gmx.net> (raw)
In-Reply-To: <4F788F49.202@iki.fi>
Antti,
attached is the i2c read fix (necessary e.g. for mxl5007t tuner, because it
sends a 2 bytes for a read request, thus msg[0].len != msg[1].len).
Am Sonntag, 1. April 2012 schrieb Antti Palosaari:
> On 01.04.2012 20:15, Hans-Frieder Vogt wrote:
> > Support of AVerMedia AVerTV HD Volar, with tuner MxL5007t (needs the i2c
> > read bug fixed patch send earlier).
>
> Could you sent separate patch for I2C read fix?
>
> The only functional comment I has is about ADC frequency. There is
> Xtal/ADC lookup table already in af9033_priv.h. You could use it instead
> of adding new configuration parameter. Demodulator driver generally
> needs only Xtal frequency as a parameter, other can be usually
> discovered by driver.
>
> But if you would not like to fix it, I will apply that as it is. It is
> not so important issue after all.
>
> regards
> Antti
Enable i2c read requests.
Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
drivers/media/dvb/dvb-usb/af9035.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff -Nupr a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-
usb/af9035.c
--- a/drivers/media/dvb/dvb-usb/af9035.c 2012-04-01 16:41:53.694103691 +0200
+++ b/drivers/media/dvb/dvb-usb/af9035.c 2012-04-01 18:22:25.026930784 +0200
@@ -209,24 +209,15 @@ static int af9035_i2c_master_xfer(struct
msg[1].len);
} else {
/* I2C */
-#if 0
- /*
- * FIXME: Keep that code. It should work but as it is
- * not tested I left it disabled and return -EOPNOTSUPP
- * for the sure.
- */
u8 buf[4 + msg[0].len];
struct usb_req req = { CMD_I2C_RD, 0, sizeof(buf),
buf, msg[1].len, msg[1].buf };
- buf[0] = msg[0].len;
+ buf[0] = msg[1].len;
buf[1] = msg[0].addr << 1;
buf[2] = 0x01;
buf[3] = 0x00;
memcpy(&buf[4], msg[0].buf, msg[0].len);
ret = af9035_ctrl_msg(d->udev, &req);
-#endif
- pr_debug("%s: I2C operation not supported\n", __func__);
- ret = -EOPNOTSUPP;
}
} else if (num == 1 && !(msg[0].flags & I2C_M_RD)) {
if (msg[0].len > 40) {
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
next prev parent reply other threads:[~2012-04-01 18:11 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 12:33 [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 => TerraTec Cinergy T Stick [0ccd:0093] Antti Palosaari
2012-03-30 21:45 ` Michael Büsch
2012-03-30 22:00 ` Antti Palosaari
2012-03-30 22:14 ` Michael Büsch
2012-03-31 14:04 ` Michael Büsch
2012-03-31 14:28 ` Antti Palosaari
2012-03-31 16:29 ` Michael Büsch
2012-03-31 16:34 ` Antti Palosaari
2012-03-31 16:48 ` Antti Palosaari
2012-03-31 16:52 ` Michael Büsch
2012-04-01 4:51 ` Antti Palosaari
2012-04-01 8:33 ` Michael Büsch
2012-04-01 12:19 ` Michael Büsch
2012-04-01 12:29 ` Antti Palosaari
2012-04-01 13:11 ` Michael Büsch
2012-04-01 13:19 ` Antti Palosaari
2012-04-01 14:42 ` Hans-Frieder Vogt
2012-04-01 14:56 ` Michael Büsch
2012-04-01 16:24 ` Hans-Frieder Vogt
2012-04-01 16:36 ` Michael Büsch
2012-04-01 16:15 ` Michael Büsch
2012-04-01 16:20 ` Antti Palosaari
2012-04-01 16:32 ` Michael Büsch
2012-04-01 16:39 ` Antti Palosaari
2012-04-01 16:44 ` Michael Büsch
2012-04-01 9:56 ` Gianluca Gennari
2012-04-01 10:27 ` Hans-Frieder Vogt
2012-04-01 12:31 ` Antti Palosaari
2012-04-01 14:31 ` Hans-Frieder Vogt
2012-04-01 15:00 ` Antti Palosaari
2012-04-01 15:04 ` Hans-Frieder Vogt
2012-04-01 12:53 ` Antti Palosaari
2012-04-01 17:15 ` [PATCH][GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 support for AverTV A867R (mxl5007t tuner) Hans-Frieder Vogt
2012-04-01 17:24 ` Antti Palosaari
2012-04-01 18:11 ` Hans-Frieder Vogt [this message]
2012-04-01 18:16 ` [PATCH][GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 i2c read fix Antti Palosaari
2012-04-01 21:07 ` [PATCH][GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 support for AverTV A867R (mxl5007t), version 2 Hans-Frieder Vogt
2012-04-01 21:19 ` [PATCH] AF9033 read_ber and read_ucblocks implementation Hans-Frieder Vogt
2012-04-01 21:56 ` Antti Palosaari
2012-04-01 22:11 ` Antti Palosaari
2012-04-01 21:32 ` [PATCH][GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 support for AverTV A867R (mxl5007t), version 2 Antti Palosaari
2012-04-02 17:02 ` Hans-Frieder Vogt
2012-03-31 16:49 ` [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 => TerraTec Cinergy T Stick [0ccd:0093] Michael Büsch
2012-04-06 11:11 ` Antti Palosaari
2012-05-07 18:44 ` [GIT PULL FOR 3.5] AF9035/AF9033 Antti Palosaari
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=201204012011.29830.hfvogt@gmx.net \
--to=hfvogt@gmx.net \
--cc=crope@iki.fi \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.