Message ID | 1426460275-3766-7-git-send-email-benjamin@southpole.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 03/16/2015 12:57 AM, Benjamin Larsson wrote: > Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Applied with same comments that mn88472 patch. regards Antti > --- > drivers/staging/media/mn88473/mn88473.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c > index 84bd4fa..607ce4d 100644 > --- a/drivers/staging/media/mn88473/mn88473.c > +++ b/drivers/staging/media/mn88473/mn88473.c > @@ -192,6 +192,7 @@ static int mn88473_init(struct dvb_frontend *fe) > int ret, len, remaining; > const struct firmware *fw = NULL; > u8 *fw_file = MN88473_FIRMWARE; > + unsigned int tmp; > > dev_dbg(&client->dev, "\n"); > > @@ -227,6 +228,20 @@ static int mn88473_init(struct dvb_frontend *fe) > } > } > > + /* parity check of firmware */ > + ret = regmap_read(dev->regmap[0], 0xf8, &tmp); > + if (ret) { > + dev_err(&client->dev, > + "parity reg read failed=%d\n", ret); > + goto err; > + } > + if (tmp & 0x10) { > + dev_err(&client->dev, > + "firmware parity check failed=0x%x\n", tmp); > + goto err; > + } > + dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp); > + > ret = regmap_write(dev->regmap[0], 0xf5, 0x00); > if (ret) > goto err; >
diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c index 84bd4fa..607ce4d 100644 --- a/drivers/staging/media/mn88473/mn88473.c +++ b/drivers/staging/media/mn88473/mn88473.c @@ -192,6 +192,7 @@ static int mn88473_init(struct dvb_frontend *fe) int ret, len, remaining; const struct firmware *fw = NULL; u8 *fw_file = MN88473_FIRMWARE; + unsigned int tmp; dev_dbg(&client->dev, "\n"); @@ -227,6 +228,20 @@ static int mn88473_init(struct dvb_frontend *fe) } } + /* parity check of firmware */ + ret = regmap_read(dev->regmap[0], 0xf8, &tmp); + if (ret) { + dev_err(&client->dev, + "parity reg read failed=%d\n", ret); + goto err; + } + if (tmp & 0x10) { + dev_err(&client->dev, + "firmware parity check failed=0x%x\n", tmp); + goto err; + } + dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp); + ret = regmap_write(dev->regmap[0], 0xf5, 0x00); if (ret) goto err;
Signed-off-by: Benjamin Larsson <benjamin@southpole.se> --- drivers/staging/media/mn88473/mn88473.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)