From: Antti Palosaari <crope@iki.fi>
To: Benjamin Larsson <benjamin@southpole.se>, mchehab@osg.samsung.com
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 06/10] mn88472: implement firmware parity check
Date: Mon, 16 Mar 2015 23:37:16 +0200 [thread overview]
Message-ID: <55074D0C.40303@iki.fi> (raw)
In-Reply-To: <1426460275-3766-6-git-send-email-benjamin@southpole.se>
On 03/16/2015 12:57 AM, Benjamin Larsson wrote:
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
> Reviewed-by: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Antti Palosaari <crope@iki.fi>
Applied!
Please don't use dev_err() logging for nothing but errors. That last
logging should be dev_dbg(), but as this is staging driver and features
really rule over minor issues I will simply apply that and fix minor
issues later.
regards
Antti
> ---
> drivers/staging/media/mn88472/mn88472.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
> index 5070c37..4a00a4d 100644
> --- a/drivers/staging/media/mn88472/mn88472.c
> +++ b/drivers/staging/media/mn88472/mn88472.c
> @@ -258,6 +258,7 @@ static int mn88472_init(struct dvb_frontend *fe)
> int ret, len, remaining;
> const struct firmware *fw = NULL;
> u8 *fw_file = MN88472_FIRMWARE;
> + unsigned int csum;
>
> dev_dbg(&client->dev, "\n");
>
> @@ -303,6 +304,20 @@ static int mn88472_init(struct dvb_frontend *fe)
> }
> }
>
> + /* parity check of firmware */
> + ret = regmap_read(dev->regmap[0], 0xf8, &csum);
> + if (ret) {
> + dev_err(&client->dev,
> + "parity reg read failed=%d\n", ret);
> + goto err;
> + }
> + if (csum & 0x10) {
> + dev_err(&client->dev,
> + "firmware parity check failed=0x%x\n", csum);
> + goto err;
> + }
> + dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", csum);
> +
> ret = regmap_write(dev->regmap[0], 0xf5, 0x00);
> if (ret)
> goto err;
>
--
http://palosaari.fi/
next prev parent reply other threads:[~2015-03-16 21:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 22:57 [PATCH 01/10] r820t: add DVBC profile in sysfreq_sel Benjamin Larsson
2015-03-15 22:57 ` [PATCH 02/10] r820t: change read_gain() code to match register layout Benjamin Larsson
2015-03-16 21:23 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 03/10] rtl28xxu: lower the rc poll time to mitigate i2c transfer errors Benjamin Larsson
2015-03-16 21:26 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 04/10] rtl28xxu: swap frontend order for slave demods Benjamin Larsson
2015-03-16 20:44 ` Benjamin Larsson
2015-03-16 21:04 ` Antti Palosaari
2015-03-16 21:22 ` Benjamin Larsson
2015-03-15 22:57 ` [PATCH 05/10] mn88472: implement lock for all delivery systems Benjamin Larsson
2015-03-16 21:30 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 06/10] mn88472: implement firmware parity check Benjamin Larsson
2015-03-16 21:37 ` Antti Palosaari [this message]
2015-03-15 22:57 ` [PATCH 07/10] mn88473: " Benjamin Larsson
2015-03-16 21:39 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 08/10] mn88473: check if firmware is already running before loading it Benjamin Larsson
2015-03-16 21:41 ` Antti Palosaari
2015-03-16 21:43 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 09/10] mn88472: " Benjamin Larsson
2015-03-16 21:45 ` Antti Palosaari
2015-03-15 22:57 ` [PATCH 10/10] mn88473: implement lock for all delivery systems Benjamin Larsson
2015-03-16 21:47 ` Antti Palosaari
2015-03-16 22:44 ` Antti Palosaari
2015-03-16 23:10 ` Benjamin Larsson
2015-03-18 21:13 ` Antti Palosaari
2015-03-18 21:40 ` Benjamin Larsson
2015-03-16 21:14 ` [PATCH 01/10] r820t: add DVBC profile in sysfreq_sel 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=55074D0C.40303@iki.fi \
--to=crope@iki.fi \
--cc=benjamin@southpole.se \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).