mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
drm: bridge: adv7511: fix CEC power down control register offset
[ Upstream commit1d22b6033e] The ADV7511_REG_CEC_CTRL = 0xE2 register is part of the main register map - not the CEC register map. As such, we shouldn't apply an offset to the register address. Doing so will cause us to address a bogus register for chips with a CEC register map offset (e.g. ADV7533). Fixes:3b1b975003("drm: adv7511/33: add HDMI CEC support") Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Robert Foss <robert.foss@linaro.org> Signed-off-by: Robert Foss <robert.foss@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220612144854.2223873-2-alvin@pqrs.dk Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
29f50bcf0f
commit
7839f2b349
|
|
@ -386,10 +386,7 @@ void adv7511_cec_irq_process(struct adv7511 *adv7511, unsigned int irq1);
|
||||||
#else
|
#else
|
||||||
static inline int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
|
static inline int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
|
||||||
{
|
{
|
||||||
unsigned int offset = adv7511->type == ADV7533 ?
|
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL,
|
||||||
ADV7533_REG_CEC_OFFSET : 0;
|
|
||||||
|
|
||||||
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset,
|
|
||||||
ADV7511_CEC_CTRL_POWER_DOWN);
|
ADV7511_CEC_CTRL_POWER_DOWN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,7 @@ int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
|
||||||
goto err_cec_alloc;
|
goto err_cec_alloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset, 0);
|
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL, 0);
|
||||||
/* cec soft reset */
|
/* cec soft reset */
|
||||||
regmap_write(adv7511->regmap_cec,
|
regmap_write(adv7511->regmap_cec,
|
||||||
ADV7511_REG_CEC_SOFT_RESET + offset, 0x01);
|
ADV7511_REG_CEC_SOFT_RESET + offset, 0x01);
|
||||||
|
|
@ -343,7 +343,7 @@ int adv7511_cec_init(struct device *dev, struct adv7511 *adv7511)
|
||||||
dev_info(dev, "Initializing CEC failed with error %d, disabling CEC\n",
|
dev_info(dev, "Initializing CEC failed with error %d, disabling CEC\n",
|
||||||
ret);
|
ret);
|
||||||
err_cec_parse_dt:
|
err_cec_parse_dt:
|
||||||
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset,
|
regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL,
|
||||||
ADV7511_CEC_CTRL_POWER_DOWN);
|
ADV7511_CEC_CTRL_POWER_DOWN);
|
||||||
return ret == -EPROBE_DEFER ? ret : 0;
|
return ret == -EPROBE_DEFER ? ret : 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user