All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: adv7604: CP CSC uses a different register on adv7604 and adv7611
@ 2015-01-26 13:52 Jean-Michel Hautbois
  2015-02-02 10:26 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Michel Hautbois @ 2015-01-26 13:52 UTC (permalink / raw)
  To: linux-media; +Cc: linux-kernel, hans.verkuil, m.chehab, Jean-Michel Hautbois

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;
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: adv7604: CP CSC uses a different register on adv7604 and adv7611
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2015-02-02 10:26 UTC (permalink / raw)
  To: Jean-Michel Hautbois, linux-media; +Cc: linux-kernel, hans.verkuil, m.chehab

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-02 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.