linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>,
	linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hans.verkuil@cisco.com,
	m.chehab@samsung.com
Subject: Re: [PATCH] media: adv7604: CP CSC uses a different register on adv7604 and adv7611
Date: Mon, 02 Feb 2015 11:26:04 +0100	[thread overview]
Message-ID: <54CF50BC.10601@xs4all.nl> (raw)
In-Reply-To: <1422280360-20461-1-git-send-email-jean-michel.hautbois@vodalys.com>

Hi Jean-Michel,

On 01/26/2015 02:52 PM, Jean-Michel Hautbois wrote:
> The bits are the same, but register is 0xf4 on ADV7611 instead of 0xfc.
> When reading back the value in log_status, differentiate both.
> 
> Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
> ---
>  drivers/media/i2c/adv7604.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index e43dd2e..32e53e0 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -2310,8 +2310,12 @@ static int adv7604_log_status(struct v4l2_subdev *sd)
>  			(reg_io_0x02 & 0x04) ? "(16-235)" : "(0-255)",
>  			((reg_io_0x02 & 0x04) ^ (reg_io_0x02 & 0x01)) ?
>  				"enabled" : "disabled");
> -	v4l2_info(sd, "Color space conversion: %s\n",
> +	if (state->info->type == ADV7604)
> +		v4l2_info(sd, "Color space conversion: %s\n",
>  			csc_coeff_sel_rb[cp_read(sd, 0xfc) >> 4]);
> +	else
> +		v4l2_info(sd, "Color space conversion: %s\n",
> +			csc_coeff_sel_rb[cp_read(sd, 0xf4) >> 4]);
>  
>  	if (!is_digital_input(sd))
>  		return 0;
> 

You need to add this register to the adv7604_chip_info struct, just like is
done for other registers that have this issue.

Regards,

	Hans

      reply	other threads:[~2015-02-02 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 13:52 [PATCH] media: adv7604: CP CSC uses a different register on adv7604 and adv7611 Jean-Michel Hautbois
2015-02-02 10:26 ` Hans Verkuil [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=54CF50BC.10601@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=jean-michel.hautbois@vodalys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).