diff options
author | Benjamin Larsson <benjamin@southpole.se> | 2015-03-15 19:57:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-02 21:53:18 -0300 |
commit | 567627bfb2b5837315fe467e52c1bbca634acc00 (patch) | |
tree | ca31dca1406de82dbd347cafec83a9e21a1fdc67 /drivers/staging/media | |
parent | 0f21ac7f92e8a014a3c653337fbae7af4c240c3a (diff) | |
download | op-kernel-dev-567627bfb2b5837315fe467e52c1bbca634acc00.zip op-kernel-dev-567627bfb2b5837315fe467e52c1bbca634acc00.tar.gz |
[media] mn88473: check if firmware is already running before loading it
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/mn88473/mn88473.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c index 607ce4d..a23e59e 100644 --- a/drivers/staging/media/mn88473/mn88473.c +++ b/drivers/staging/media/mn88473/mn88473.c @@ -196,8 +196,19 @@ static int mn88473_init(struct dvb_frontend *fe) dev_dbg(&client->dev, "\n"); - if (dev->warm) + /* set cold state by default */ + dev->warm = false; + + /* 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); |