summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge/adv7511/adv7533.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2016-09-05 22:43:17 +0300
committerArchit Taneja <architt@codeaurora.org>2016-09-12 13:20:43 +0530
commitd25a4cbba4b9da7c2d674b2f8ecf84af1b24988e (patch)
tree75820a5ee36f32a68a54d2933be42379555c0de9 /drivers/gpu/drm/bridge/adv7511/adv7533.c
parentdec90ea1456b5a5d990d94ade2e45a2457cfd149 (diff)
drm/bridge: adv7511: add support for the 2nd chip
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. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1580212.O1LYdJFM97@wasted.cogentembedded.com
Diffstat (limited to 'drivers/gpu/drm/bridge/adv7511/adv7533.c')
-rw-r--r--drivers/gpu/drm/bridge/adv7511/adv7533.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c
index 5eebd15899b1..d7f7b7ce8ebe 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7533.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c
@@ -149,13 +149,12 @@ void adv7533_uninit_cec(struct adv7511 *adv)
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;