From: Antti Palosaari <crope@iki.fi>
To: Benjamin Larsson <benjamin@southpole.se>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/2] mn88472: fix firmware downloading
Date: Mon, 08 Dec 2014 22:55:41 +0200 [thread overview]
Message-ID: <5486104D.8090601@iki.fi> (raw)
In-Reply-To: <1418070667-13349-1-git-send-email-benjamin@southpole.se>
Moikka!
But that patch is rather useless :] Only thing needed is to change
existing value in file drivers/media/usb/dvb-usb-v2/rtl28xxu.c :
mn88472_config.i2c_wr_max = 22,
... and that leaves room for use even smaller values if there is an I2C
adapter which cannot write even 17 bytes.
2nd thing is to add comment mn88472.h to specify that max limit and
that's all.
regards
Antti
On 12/08/2014 10:31 PM, Benjamin Larsson wrote:
> The max amount of payload bytes in each i2c transfer when
> loading the demodulator firmware is 16 bytes.
>
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
> ---
> drivers/staging/media/mn88472/mn88472.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
> index ffee187..df7dbe9 100644
> --- a/drivers/staging/media/mn88472/mn88472.c
> +++ b/drivers/staging/media/mn88472/mn88472.c
> @@ -15,6 +15,7 @@
> */
>
> #include "mn88472_priv.h"
> +#define FW_BUF_SIZE 16
>
> static int mn88472_get_tune_settings(struct dvb_frontend *fe,
> struct dvb_frontend_tune_settings *s)
> @@ -331,10 +332,10 @@ static int mn88472_init(struct dvb_frontend *fe)
> goto err;
>
> for (remaining = fw->size; remaining > 0;
> - remaining -= (dev->i2c_wr_max - 1)) {
> + remaining -= FW_BUF_SIZE) {
> len = remaining;
> - if (len > (dev->i2c_wr_max - 1))
> - len = (dev->i2c_wr_max - 1);
> + if (len > FW_BUF_SIZE)
> + len = FW_BUF_SIZE;
>
> ret = regmap_bulk_write(dev->regmap[0], 0xf6,
> &fw->data[fw->size - remaining], len);
>
--
http://palosaari.fi/
next prev parent reply other threads:[~2014-12-08 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 20:31 [PATCH 1/2] mn88472: fix firmware downloading Benjamin Larsson
2014-12-08 20:31 ` [PATCH 2/2] mn88472: implement firmware parity check Benjamin Larsson
2014-12-08 20:59 ` Antti Palosaari
2014-12-08 20:55 ` Antti Palosaari [this message]
2014-12-08 20:59 ` [PATCH 1/2] mn88472: fix firmware downloading Benjamin Larsson
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=5486104D.8090601@iki.fi \
--to=crope@iki.fi \
--cc=benjamin@southpole.se \
--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.