All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Olli Salonen <olli.salonen@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/3] si2157: Add support for Si2147-A30
Date: Tue, 23 Sep 2014 15:36:50 +0300	[thread overview]
Message-ID: <54216962.5060805@iki.fi> (raw)
In-Reply-To: <1411296799-3525-2-git-send-email-olli.salonen@iki.fi>

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


On 09/21/2014 01:53 PM, Olli Salonen wrote:
> This patch adds support for Si2147-A30 tuner. Fairly trivial, no firmware
> needed for this tuner. However, command 14 00 02 07 01 00 seems to be
> mandatory. On Si2157 and Si2158 the value 0x0100 is the default value, so this
> patch does not impact the existing tuners/devices. On Si2147 the default is
> 0x0000 and I can't get a lock with that value.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> Cc: crope@iki.fi
> ---
>   drivers/media/tuners/si2157.c      | 13 +++++++++++--
>   drivers/media/tuners/si2157.h      |  2 +-
>   drivers/media/tuners/si2157_priv.h |  2 +-
>   3 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
> index efb5cce..41965c7 100644
> --- a/drivers/media/tuners/si2157.c
> +++ b/drivers/media/tuners/si2157.c
> @@ -1,5 +1,5 @@
>   /*
> - * Silicon Labs Si2157/2158 silicon tuner driver
> + * Silicon Labs Si2147/2157/2158 silicon tuner driver
>    *
>    * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
>    *
> @@ -110,12 +110,14 @@ static int si2157_init(struct dvb_frontend *fe)
>
>   	#define SI2158_A20 ('A' << 24 | 58 << 16 | '2' << 8 | '0' << 0)
>   	#define SI2157_A30 ('A' << 24 | 57 << 16 | '3' << 8 | '0' << 0)
> +	#define SI2147_A30 ('A' << 24 | 47 << 16 | '3' << 8 | '0' << 0)
>
>   	switch (chip_id) {
>   	case SI2158_A20:
>   		fw_file = SI2158_A20_FIRMWARE;
>   		break;
>   	case SI2157_A30:
> +	case SI2147_A30:
>   		goto skip_fw_download;
>   		break;
>   	default:
> @@ -258,7 +260,14 @@ static int si2157_set_params(struct dvb_frontend *fe)
>   	if (s->inversion)
>   		cmd.args[5] = 0x01;
>   	cmd.wlen = 6;
> -	cmd.rlen = 1;
> +	cmd.rlen = 4;
> +	ret = si2157_cmd_execute(s, &cmd);
> +	if (ret)
> +		goto err;
> +
> +	memcpy(cmd.args, "\x14\x00\x02\x07\x01\x00", 6);
> +	cmd.wlen = 6;
> +	cmd.rlen = 4;
>   	ret = si2157_cmd_execute(s, &cmd);
>   	if (ret)
>   		goto err;
> diff --git a/drivers/media/tuners/si2157.h b/drivers/media/tuners/si2157.h
> index 6da4d5d..d3b19ca 100644
> --- a/drivers/media/tuners/si2157.h
> +++ b/drivers/media/tuners/si2157.h
> @@ -1,5 +1,5 @@
>   /*
> - * Silicon Labs Si2157/2158 silicon tuner driver
> + * Silicon Labs Si2147/2157/2158 silicon tuner driver
>    *
>    * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
>    *
> diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
> index 3ddab5e..02350f8 100644
> --- a/drivers/media/tuners/si2157_priv.h
> +++ b/drivers/media/tuners/si2157_priv.h
> @@ -1,5 +1,5 @@
>   /*
> - * Silicon Labs Si2157/2158 silicon tuner driver
> + * Silicon Labs Si2147/2157/2158 silicon tuner driver
>    *
>    * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
>    *
>

-- 
http://palosaari.fi/

  reply	other threads:[~2014-09-23 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 10:53 [PATCH 0/3] IT930x USB DVB-T2/C tuner Olli Salonen
2014-09-21 10:53 ` [PATCH 1/3] si2157: Add support for Si2147-A30 Olli Salonen
2014-09-23 12:36   ` Antti Palosaari [this message]
2014-09-21 10:53 ` [PATCH 2/3] af9035: Add possibility to define which I2C adapter to use Olli Salonen
2014-09-23 12:37   ` Antti Palosaari
2014-09-21 10:53 ` [PATCH 3/3] af9035: Add support for IT930x USB bridge Olli Salonen
2014-09-23 12:46   ` Antti Palosaari
2014-09-23 13:25     ` Olli Salonen

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=54216962.5060805@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=olli.salonen@iki.fi \
    /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.