All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Oleh Kravchenko <oleg@kaa.org.ua>
Cc: linux-media@vger.kernel.org, crope@iki.fi,
	Olli Salonen <olli.salonen@iki.fi>
Subject: Re: [PATCH] [media] si2157: Improve support Si2158-A20 tuner
Date: Mon, 24 Oct 2016 13:54:29 -0200	[thread overview]
Message-ID: <20161024135429.46522664@vento.lan> (raw)
In-Reply-To: <1470297242-32129-1-git-send-email-oleg@kaa.org.ua>

Em Thu,  4 Aug 2016 10:54:02 +0300
Oleh Kravchenko <oleg@kaa.org.ua> escreveu:

> Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>

What's the status of this patch? Is it still valid? If so, please re-send
with a proper description. e. g. what is it improving? why? how?

Regards,
Mauro

> ---
>  drivers/media/tuners/si2157.c      | 34 +++++++++++++++++++++++++++-------
>  drivers/media/tuners/si2157_priv.h |  1 +
>  2 files changed, 28 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
> index 57b2508..d7035a5 100644
> --- a/drivers/media/tuners/si2157.c
> +++ b/drivers/media/tuners/si2157.c
> @@ -103,12 +103,21 @@ static int si2157_init(struct dvb_frontend *fe)
>  		goto warm;
>  
>  	/* power up */
> -	if (dev->chiptype == SI2157_CHIPTYPE_SI2146) {
> -		memcpy(cmd.args, "\xc0\x05\x01\x00\x00\x0b\x00\x00\x01", 9);
> -		cmd.wlen = 9;
> -	} else {
> -		memcpy(cmd.args, "\xc0\x00\x0c\x00\x00\x01\x01\x01\x01\x01\x01\x02\x00\x00\x01", 15);
> -		cmd.wlen = 15;
> +	switch (dev->chiptype) {
> +		case SI2157_CHIPTYPE_SI2146:
> +			memcpy(cmd.args, "\xc0\x05\x01\x00\x00\x0b\x00\x00\x01", 9);
> +			cmd.wlen = 9;
> +			break;
> +
> +		case SI2157_CHIPTYPE_SI2158:
> +			memcpy(cmd.args, "\xC0\x00\x00\x00\x00\x01\x01\x01\x01\x01\x01\x02\x00\x00\x01", 15);
> +			cmd.wlen = 15;
> +			break;
> +
> +		default:
> +			memcpy(cmd.args, "\xc0\x00\x0c\x00\x00\x01\x01\x01\x01\x01\x01\x02\x00\x00\x01", 15);
> +			cmd.wlen = 15;
> +			break;
>  	}
>  	cmd.rlen = 1;
>  	ret = si2157_cmd_execute(client, &cmd);
> @@ -204,6 +213,16 @@ skip_fw_download:
>  	if (ret)
>  		goto err;
>  
> +	/* start tuner? */
> +	if (SI2157_CHIPTYPE_SI2158 == dev->chiptype) {
> +		memcpy(cmd.args, "\xC0\x00\x0C", 3);
> +		cmd.wlen = 3;
> +		cmd.rlen = 1;
> +		ret = si2157_cmd_execute(client, &cmd);
> +		if (ret)
> +			goto err;
> +	}
> +
>  	/* query firmware version */
>  	memcpy(cmd.args, "\x11", 1);
>  	cmd.wlen = 1;
> @@ -506,8 +525,9 @@ static int si2157_remove(struct i2c_client *client)
>  }
>  
>  static const struct i2c_device_id si2157_id_table[] = {
> -	{"si2157", SI2157_CHIPTYPE_SI2157},
>  	{"si2146", SI2157_CHIPTYPE_SI2146},
> +	{"si2157", SI2157_CHIPTYPE_SI2157},
> +	{"si2158", SI2157_CHIPTYPE_SI2158},
>  	{}
>  };
>  MODULE_DEVICE_TABLE(i2c, si2157_id_table);
> diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
> index d6b2c7b..677fa00 100644
> --- a/drivers/media/tuners/si2157_priv.h
> +++ b/drivers/media/tuners/si2157_priv.h
> @@ -42,6 +42,7 @@ struct si2157_dev {
>  
>  #define SI2157_CHIPTYPE_SI2157 0
>  #define SI2157_CHIPTYPE_SI2146 1
> +#define SI2157_CHIPTYPE_SI2158 2
>  
>  /* firmware command struct */
>  #define SI2157_ARGLEN      30



Thanks,
Mauro

      parent reply	other threads:[~2016-10-24 15:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  7:54 [PATCH] [media] si2157: Improve support Si2158-A20 tuner Oleh Kravchenko
     [not found] ` <CAAZRmGxM8U+PBfP4RWfnLDH0gdw+2oSuMAivzYBxRqSqTPM4FQ@mail.gmail.com>
2016-08-04 10:26   ` Oleh Kravchenko
     [not found]     ` <CAAZRmGykv5LOmBxKYNUgi07+Rt=OTN3_+Cdu7BUGT0KbY0LPiA@mail.gmail.com>
2016-08-04 12:03       ` Oleh Kravchenko
2016-08-04 14:11         ` Oleh Kravchenko
2016-08-04 20:46           ` Evromedia USB Full Hybrid Full HD works!!! Oleh Kravchenko
2016-10-24 15:54 ` Mauro Carvalho Chehab [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=20161024135429.46522664@vento.lan \
    --to=mchehab@s-opensource.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=oleg@kaa.org.ua \
    --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.