From: Benjamin Larsson <benjamin@southpole.se>
To: Antti Palosaari <crope@iki.fi>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] mn88472: implement lock for all delivery systems
Date: Wed, 17 Dec 2014 01:18:46 +0100 [thread overview]
Message-ID: <5490CBE6.2030004@southpole.se> (raw)
In-Reply-To: <548FA852.50004@iki.fi>
Hello.
On 12/16/2014 04:34 AM, Antti Palosaari wrote:
> Moikka!
>
> On 12/16/2014 01:40 AM, Benjamin Larsson wrote:
>> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
>> ---
>> drivers/staging/media/mn88472/mn88472.c | 23 ++++++++++++++++++++---
>> 1 file changed, 20 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/staging/media/mn88472/mn88472.c
>> b/drivers/staging/media/mn88472/mn88472.c
>> index 68f5036..426f0ed 100644
>> --- a/drivers/staging/media/mn88472/mn88472.c
>> +++ b/drivers/staging/media/mn88472/mn88472.c
>> @@ -238,6 +238,7 @@ static int mn88472_read_status(struct
>> dvb_frontend *fe, fe_status_t *status)
>> struct dtv_frontend_properties *c = &fe->dtv_property_cache;
>> int ret;
>> unsigned int utmp;
>> + int lock = 0;
>>
>> *status = 0;
>>
>> @@ -248,21 +249,37 @@ static int mn88472_read_status(struct
>> dvb_frontend *fe, fe_status_t *status)
>>
>> switch (c->delivery_system) {
>> case SYS_DVBT:
>> + ret = regmap_read(dev->regmap[0], 0x7F, &utmp);
>> + if (ret)
>> + goto err;
>> + if ((utmp&0xF) > 8)
>
> You didn't read Kernel coding style doc?
>
> around line 206 Documentation/CodingStyle
> ---------------------------
> Use one space around (on each side of) most binary and ternary operators,
> such as any of these:
>
> = + - < > * / % | & ^ <= >= == != ? :
> ---------------------------
Fixed.
>
>> + lock = 1;
>> + break;
>> case SYS_DVBT2:
>> - /* FIXME: implement me */
>> - utmp = 0x08; /* DVB-C lock value */
>> + msleep(150);
>
> This sleep does not look correct. Why it is here? In order to provide
> more time for lock waiting? In that case you must increase
> .get_tune_settings() timeout. On some other case you will need to add
> comment why such strange thing is needed.
Increased.
>
>> + ret = regmap_read(dev->regmap[2], 0x92, &utmp);
>> + if (ret)
>> + goto err;
>> + if ((utmp&0xF) >= 0x07)
>> + *status |= FE_HAS_SIGNAL;
>> + if ((utmp&0xF) >= 0x0a)
>> + *status |= FE_HAS_CARRIER;
>> + if ((utmp&0xF) >= 0x0d)
>> + *status |= FE_HAS_VITERBI | FE_HAS_SYNC | FE_HAS_LOCK;
>> break;
>> case SYS_DVBC_ANNEX_A:
>> ret = regmap_read(dev->regmap[1], 0x84, &utmp);
>> if (ret)
>> goto err;
>> + if ((utmp&0xF) > 7)
>> + lock = 1;
>> break;
>> default:
>> ret = -EINVAL;
>> goto err;
>> }
>>
>> - if (utmp == 0x08)
>> + if (lock)
>> *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI |
>> FE_HAS_SYNC | FE_HAS_LOCK;
>
> Antti
>
Sent v2 patch.
MvH
Benjamin Larsson
prev parent reply other threads:[~2014-12-17 0:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 23:40 [PATCH] mn88472: implement lock for all delivery systems Benjamin Larsson
2014-12-16 3:34 ` Antti Palosaari
2014-12-17 0:18 ` Benjamin Larsson [this message]
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=5490CBE6.2030004@southpole.se \
--to=benjamin@southpole.se \
--cc=crope@iki.fi \
--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.