All of lore.kernel.org
 help / color / mirror / Atom feed
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 2/2] mn88472: implement firmware parity check
Date: Mon, 08 Dec 2014 22:59:34 +0200	[thread overview]
Message-ID: <54861136.8050002@iki.fi> (raw)
In-Reply-To: <1418070667-13349-2-git-send-email-benjamin@southpole.se>

Reviewed-by: Antti Palosaari <crope@iki.fi>

PS. something to say about logging levels... but as it is staging 
driver, criteria for patches is not so high yet.

regards
Antti

On 12/08/2014 10:31 PM, Benjamin Larsson wrote:
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
> ---
>   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 df7dbe9..1df85a7 100644
> --- a/drivers/staging/media/mn88472/mn88472.c
> +++ b/drivers/staging/media/mn88472/mn88472.c
> @@ -294,6 +294,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");
>
> @@ -346,6 +347,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/

  reply	other threads:[~2014-12-08 20:59 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 [this message]
2014-12-08 20:55 ` [PATCH 1/2] mn88472: fix firmware downloading Antti Palosaari
2014-12-08 20:59   ` 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=54861136.8050002@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.