diff mbox

adv7604: fix SPA register location for ADV7612

Message ID 1453205828-8814-1-git-send-email-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Ulrich Hecht Jan. 19, 2016, 12:17 p.m. UTC
SPA location LSB register is at 0x70.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 drivers/media/i2c/adv7604.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Lars-Peter Clausen Jan. 19, 2016, 12:20 p.m. UTC | #1
On 01/19/2016 01:17 PM, Ulrich Hecht wrote:
> SPA location LSB register is at 0x70.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>  drivers/media/i2c/adv7604.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
> index 3787f81..f78d36c 100644
> --- a/drivers/media/i2c/adv7604.c
> +++ b/drivers/media/i2c/adv7604.c
> @@ -2149,6 +2149,10 @@ static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
>  	if (info->type == ADV7604) {
>  		rep_write(sd, 0x76, spa_loc & 0xff);
>  		rep_write_clr_set(sd, 0x77, 0x40, (spa_loc & 0x100) >> 2);
> +	} else if (info->type == ADV7612) {
> +		/* ADV7612 Software Manual Rev. A, p. 15 */
> +		rep_write(sd, 0x70, spa_loc & 0xff);

That should just go onto the else branch and replace the FIXME.

> +		rep_write_clr_set(sd, 0x71, 0x01, (spa_loc & 0x100) >> 8);
>  	} else {
>  		/* FIXME: Where is the SPA location LSB register ? */
>  		rep_write_clr_set(sd, 0x71, 0x01, (spa_loc & 0x100) >> 8);
>
diff mbox

Patch

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 3787f81..f78d36c 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2149,6 +2149,10 @@  static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
 	if (info->type == ADV7604) {
 		rep_write(sd, 0x76, spa_loc & 0xff);
 		rep_write_clr_set(sd, 0x77, 0x40, (spa_loc & 0x100) >> 2);
+	} else if (info->type == ADV7612) {
+		/* ADV7612 Software Manual Rev. A, p. 15 */
+		rep_write(sd, 0x70, spa_loc & 0xff);
+		rep_write_clr_set(sd, 0x71, 0x01, (spa_loc & 0x100) >> 8);
 	} else {
 		/* FIXME: Where is the SPA location LSB register ? */
 		rep_write_clr_set(sd, 0x71, 0x01, (spa_loc & 0x100) >> 8);