All of lore.kernel.org
 help / color / mirror / Atom feed
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 09/10] mn88472: check if firmware is already running before loading it
Date: Mon, 16 Mar 2015 23:45:22 +0200	[thread overview]
Message-ID: <55074EF2.6010304@iki.fi> (raw)
In-Reply-To: <1426460275-3766-9-git-send-email-benjamin@southpole.se>

On 03/16/2015 12:57 AM, Benjamin Larsson wrote:
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>

Applied! Please try to add some commit message, even patch topic says it 
all...

regards
Antti

> ---
>   drivers/staging/media/mn88472/mn88472.c | 21 ++++++++++++++++-----
>   1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
> index 4a00a4d..c041fbf 100644
> --- a/drivers/staging/media/mn88472/mn88472.c
> +++ b/drivers/staging/media/mn88472/mn88472.c
> @@ -258,7 +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;
> +	unsigned int tmp;
>
>   	dev_dbg(&client->dev, "\n");
>
> @@ -274,6 +274,17 @@ static int mn88472_init(struct dvb_frontend *fe)
>   	if (ret)
>   		goto err;
>
> +	/* check if firmware is already running */
> +	ret = regmap_read(dev->regmap[0], 0xf5, &tmp);
> +	if (ret)
> +		goto err;
> +
> +	if (!(tmp & 0x1)) {
> +		dev_info(&client->dev, "firmware already running\n");
> +		dev->warm = true;
> +		return 0;
> +	}
> +
>   	/* request the firmware, this will block and timeout */
>   	ret = request_firmware(&fw, fw_file, &client->dev);
>   	if (ret) {
> @@ -305,18 +316,18 @@ static int mn88472_init(struct dvb_frontend *fe)
>   	}
>
>   	/* parity check of firmware */
> -	ret = regmap_read(dev->regmap[0], 0xf8, &csum);
> +	ret = regmap_read(dev->regmap[0], 0xf8, &tmp);
>   	if (ret) {
>   		dev_err(&client->dev,
>   				"parity reg read failed=%d\n", ret);
>   		goto err;
>   	}
> -	if (csum & 0x10) {
> +	if (tmp & 0x10) {
>   		dev_err(&client->dev,
> -				"firmware parity check failed=0x%x\n", csum);
> +				"firmware parity check failed=0x%x\n", tmp);
>   		goto err;
>   	}
> -	dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", csum);
> +	dev_err(&client->dev, "firmware parity check succeeded=0x%x\n", tmp);
>
>   	ret = regmap_write(dev->regmap[0], 0xf5, 0x00);
>   	if (ret)
>

-- 
http://palosaari.fi/

  reply	other threads:[~2015-03-16 21:45 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
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 [this message]
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=55074EF2.6010304@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 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.