From: Archit Taneja <architt@codeaurora.org>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] drm/bridge: adv7511: add support for the 2nd chip
Date: Mon, 12 Sep 2016 13:39:38 +0530 [thread overview]
Message-ID: <57D662C2.9090304@codeaurora.org> (raw)
In-Reply-To: <1580212.O1LYdJFM97@wasted.cogentembedded.com>
On 09/06/2016 01:13 AM, Sergei Shtylyov wrote:
> The Renesas Wheat board has 2 ADV7513 chips on the same I2C bus, however
> the ADV751x driver only supports 1 chip as it tries to assign the packet/
> EDID/CEC memory I2C devices to the fixed I2C addresses. Assign these I2C
> addresses at the fixed offsets (derived from the programming guide) from
> the main register map address instead...
Looks good now. Queued to topic/drm-misc after cleaning up the spacing
in the commit message.
Thanks,
Archit
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against David Airlie's 'linux.git' repo's 'drm-next' branch.
>
> Changes in version 2:
> - added support for ADV7533 CEC alternate address.
>
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 ++++++------
> drivers/gpu/drm/bridge/adv7511/adv7533.c | 5 ++---
> 2 files changed, 8 insertions(+), 9 deletions(-)
>
> Index: linux/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> ===================================================================
> --- linux.orig/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ linux/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -922,15 +922,13 @@ static int adv7511_parse_dt(struct devic
> return 0;
> }
>
> -static const int edid_i2c_addr = 0x7e;
> -static const int packet_i2c_addr = 0x70;
> -static const int cec_i2c_addr = 0x78;
> -
> static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
> {
> struct adv7511_link_config link_config;
> struct adv7511 *adv7511;
> struct device *dev = &i2c->dev;
> + unsigned int main_i2c_addr = i2c->addr << 1;
> + unsigned int edid_i2c_addr = main_i2c_addr + 4;
> unsigned int val;
> int ret;
>
> @@ -991,8 +989,10 @@ static int adv7511_probe(struct i2c_clie
>
> regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR, edid_i2c_addr);
> regmap_write(adv7511->regmap, ADV7511_REG_PACKET_I2C_ADDR,
> - packet_i2c_addr);
> - regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR, cec_i2c_addr);
> + main_i2c_addr - 0xa);
> + regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR,
> + main_i2c_addr - 2);
> +
> adv7511_packet_disable(adv7511, 0xffff);
>
> adv7511->i2c_main = i2c;
> Index: linux/drivers/gpu/drm/bridge/adv7511/adv7533.c
> ===================================================================
> --- linux.orig/drivers/gpu/drm/bridge/adv7511/adv7533.c
> +++ linux/drivers/gpu/drm/bridge/adv7511/adv7533.c
> @@ -149,13 +149,12 @@ void adv7533_uninit_cec(struct adv7511 *
> i2c_unregister_device(adv->i2c_cec);
> }
>
> -static const int cec_i2c_addr = 0x78;
> -
> int adv7533_init_cec(struct adv7511 *adv)
> {
> int ret;
>
> - adv->i2c_cec = i2c_new_dummy(adv->i2c_main->adapter, cec_i2c_addr >> 1);
> + adv->i2c_cec = i2c_new_dummy(adv->i2c_main->adapter,
> + adv->i2c_main->addr - 1);
> if (!adv->i2c_cec)
> return -ENOMEM;
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: Archit Taneja <architt@codeaurora.org>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] drm/bridge: adv7511: add support for the 2nd chip
Date: Mon, 12 Sep 2016 13:39:38 +0530 [thread overview]
Message-ID: <57D662C2.9090304@codeaurora.org> (raw)
In-Reply-To: <1580212.O1LYdJFM97@wasted.cogentembedded.com>
On 09/06/2016 01:13 AM, Sergei Shtylyov wrote:
> The Renesas Wheat board has 2 ADV7513 chips on the same I2C bus, however
> the ADV751x driver only supports 1 chip as it tries to assign the packet/
> EDID/CEC memory I2C devices to the fixed I2C addresses. Assign these I2C
> addresses at the fixed offsets (derived from the programming guide) from
> the main register map address instead...
Looks good now. Queued to topic/drm-misc after cleaning up the spacing
in the commit message.
Thanks,
Archit
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against David Airlie's 'linux.git' repo's 'drm-next' branch.
>
> Changes in version 2:
> - added support for ADV7533 CEC alternate address.
>
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 12 ++++++------
> drivers/gpu/drm/bridge/adv7511/adv7533.c | 5 ++---
> 2 files changed, 8 insertions(+), 9 deletions(-)
>
> Index: linux/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> ===================================================================
> --- linux.orig/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ linux/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -922,15 +922,13 @@ static int adv7511_parse_dt(struct devic
> return 0;
> }
>
> -static const int edid_i2c_addr = 0x7e;
> -static const int packet_i2c_addr = 0x70;
> -static const int cec_i2c_addr = 0x78;
> -
> static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
> {
> struct adv7511_link_config link_config;
> struct adv7511 *adv7511;
> struct device *dev = &i2c->dev;
> + unsigned int main_i2c_addr = i2c->addr << 1;
> + unsigned int edid_i2c_addr = main_i2c_addr + 4;
> unsigned int val;
> int ret;
>
> @@ -991,8 +989,10 @@ static int adv7511_probe(struct i2c_clie
>
> regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR, edid_i2c_addr);
> regmap_write(adv7511->regmap, ADV7511_REG_PACKET_I2C_ADDR,
> - packet_i2c_addr);
> - regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR, cec_i2c_addr);
> + main_i2c_addr - 0xa);
> + regmap_write(adv7511->regmap, ADV7511_REG_CEC_I2C_ADDR,
> + main_i2c_addr - 2);
> +
> adv7511_packet_disable(adv7511, 0xffff);
>
> adv7511->i2c_main = i2c;
> Index: linux/drivers/gpu/drm/bridge/adv7511/adv7533.c
> ===================================================================
> --- linux.orig/drivers/gpu/drm/bridge/adv7511/adv7533.c
> +++ linux/drivers/gpu/drm/bridge/adv7511/adv7533.c
> @@ -149,13 +149,12 @@ void adv7533_uninit_cec(struct adv7511 *
> i2c_unregister_device(adv->i2c_cec);
> }
>
> -static const int cec_i2c_addr = 0x78;
> -
> int adv7533_init_cec(struct adv7511 *adv)
> {
> int ret;
>
> - adv->i2c_cec = i2c_new_dummy(adv->i2c_main->adapter, cec_i2c_addr >> 1);
> + adv->i2c_cec = i2c_new_dummy(adv->i2c_main->adapter,
> + adv->i2c_main->addr - 1);
> if (!adv->i2c_cec)
> return -ENOMEM;
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-09-12 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 19:43 [PATCH v2] drm/bridge: adv7511: add support for the 2nd chip Sergei Shtylyov
2016-09-12 8:09 ` Archit Taneja [this message]
2016-09-12 8:09 ` Archit Taneja
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=57D662C2.9090304@codeaurora.org \
--to=architt@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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 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.