Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Kieran Bingham <kbingham@kernel.org>
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] media: i2c: adv748x: Add missing CBUS page.
Date: Fri, 9 Feb 2018 16:41:33 +0100	[thread overview]
Message-ID: <20180209154133.GF7666@bigcity.dyn.berto.se> (raw)
In-Reply-To: <1518024886-842-3-git-send-email-kbingham@kernel.org>

Hi Kieran,

Thanks for your patch,

On 2018-02-07 17:34:46 +0000, Kieran Bingham wrote:
> From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 
> The ADV748x has 12 pages mapped onto I2C addresses.
> 
> In the existing implementation only 11 are mapped correctly in the page
> enumerations, which causes an off-by-one fault on pages above the
> infoframe definition due to a missing 'CBUS' page.
> 
> This causes the address for the CEC, SDP, TXA, and TXB to be incorrectly
> programmed during the iterations in adv748x_initialise_clients().
> 
> Until now this has gone un-noticed due to the fact that following the
> creation of the clients - the device is reset and the addresses are
> reprogrammed in manually by the call to "adv748x_write_regs(state,
> adv748x_set_slave_address);"
> 
> As part of moving to dynamic i2c address allocations repair this by
> providing the missing CBUS page definition.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

I would drop the '.' from the subject line, with that fixed:

Reviewed-by: Niklas S�derlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/media/i2c/adv748x/adv748x-core.c | 3 +++
>  drivers/media/i2c/adv748x/adv748x.h      | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
> index 71c69b816db2..6d62b817ed00 100644
> --- a/drivers/media/i2c/adv748x/adv748x-core.c
> +++ b/drivers/media/i2c/adv748x/adv748x-core.c
> @@ -52,6 +52,7 @@ static const struct regmap_config adv748x_regmap_cnf[] = {
>  	ADV748X_REGMAP_CONF("edid"),
>  	ADV748X_REGMAP_CONF("repeater"),
>  	ADV748X_REGMAP_CONF("infoframe"),
> +	ADV748X_REGMAP_CONF("cbus"),
>  	ADV748X_REGMAP_CONF("cec"),
>  	ADV748X_REGMAP_CONF("sdp"),
>  	ADV748X_REGMAP_CONF("txa"),
> @@ -91,6 +92,7 @@ static int adv748x_i2c_addresses[ADV748X_PAGE_MAX] = {
>  	ADV748X_I2C_EDID,
>  	ADV748X_I2C_REPEATER,
>  	ADV748X_I2C_INFOFRAME,
> +	ADV748X_I2C_CBUS,
>  	ADV748X_I2C_CEC,
>  	ADV748X_I2C_SDP,
>  	ADV748X_I2C_TXB,
> @@ -354,6 +356,7 @@ static const struct adv748x_reg_value adv748x_set_slave_address[] = {
>  	{ADV748X_PAGE_IO, 0xf6, ADV748X_I2C_EDID << 1},
>  	{ADV748X_PAGE_IO, 0xf7, ADV748X_I2C_REPEATER << 1},
>  	{ADV748X_PAGE_IO, 0xf8, ADV748X_I2C_INFOFRAME << 1},
> +	{ADV748X_PAGE_IO, 0xf9, ADV748X_I2C_CBUS << 1},
>  	{ADV748X_PAGE_IO, 0xfa, ADV748X_I2C_CEC << 1},
>  	{ADV748X_PAGE_IO, 0xfb, ADV748X_I2C_SDP << 1},
>  	{ADV748X_PAGE_IO, 0xfc, ADV748X_I2C_TXB << 1},
> diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h
> index 6789e2f3bc8c..725662edc4b8 100644
> --- a/drivers/media/i2c/adv748x/adv748x.h
> +++ b/drivers/media/i2c/adv748x/adv748x.h
> @@ -35,6 +35,7 @@
>  #define ADV748X_I2C_EDID		0x36	/* EDID Map */
>  #define ADV748X_I2C_REPEATER		0x32	/* HDMI RX Repeater Map */
>  #define ADV748X_I2C_INFOFRAME		0x31	/* HDMI RX InfoFrame Map */
> +#define ADV748X_I2C_CBUS		0x30	/* CBUS MHL Map */
>  #define ADV748X_I2C_CEC			0x41	/* CEC Map */
>  #define ADV748X_I2C_SDP			0x79	/* SDP Map */
>  #define ADV748X_I2C_TXB			0x48	/* CSI-TXB Map */
> @@ -48,6 +49,7 @@ enum adv748x_page {
>  	ADV748X_PAGE_EDID,
>  	ADV748X_PAGE_REPEATER,
>  	ADV748X_PAGE_INFOFRAME,
> +	ADV748X_PAGE_CBUS,
>  	ADV748X_PAGE_CEC,
>  	ADV748X_PAGE_SDP,
>  	ADV748X_PAGE_TXB,
> -- 
> 2.7.4
> 

-- 
Regards,
Niklas S�derlund

      reply	other threads:[~2018-02-09 15:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 17:34 [PATCH 0/2] media: i2c: adv748x: Fix CBUS page issue Kieran Bingham
2018-02-07 17:34 ` [PATCH 1/2] media: i2c: adv748x: Simplify regmap configuration Kieran Bingham
2018-02-09 15:39   ` Niklas Söderlund
2018-02-09 15:43     ` Kieran Bingham
2018-02-07 17:34 ` [PATCH 2/2] media: i2c: adv748x: Add missing CBUS page Kieran Bingham
2018-02-09 15:41   ` Niklas Söderlund [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=20180209154133.GF7666@bigcity.dyn.berto.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=kbingham@kernel.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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