linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mn88472: fix firmware downloading
@ 2014-12-08 20:31 Benjamin Larsson
  2014-12-08 20:31 ` [PATCH 2/2] mn88472: implement firmware parity check Benjamin Larsson
  2014-12-08 20:55 ` [PATCH 1/2] mn88472: fix firmware downloading Antti Palosaari
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Larsson @ 2014-12-08 20:31 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List

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);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-08 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 1/2] mn88472: fix firmware downloading Antti Palosaari
2014-12-08 20:59   ` Benjamin Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).