|
@@ -362,12 +362,19 @@ static void adv7511_power_on(struct adv7511 *adv7511)
|
|
|
{
|
|
|
adv7511->current_edid_segment = -1;
|
|
|
|
|
|
- regmap_write(adv7511->regmap, ADV7511_REG_INT(0),
|
|
|
- ADV7511_INT0_EDID_READY);
|
|
|
- regmap_write(adv7511->regmap, ADV7511_REG_INT(1),
|
|
|
- ADV7511_INT1_DDC_ERROR);
|
|
|
regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
|
|
|
ADV7511_POWER_POWER_DOWN, 0);
|
|
|
+ if (adv7511->i2c_main->irq) {
|
|
|
+ /*
|
|
|
+ * Documentation says the INT_ENABLE registers are reset in
|
|
|
+ * POWER_DOWN mode. My 7511w preserved the bits, however.
|
|
|
+ * Still, let's be safe and stick to the documentation.
|
|
|
+ */
|
|
|
+ regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
|
|
|
+ ADV7511_INT0_EDID_READY);
|
|
|
+ regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
|
|
|
+ ADV7511_INT1_DDC_ERROR);
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* Per spec it is allowed to pulse the HDP signal to indicate that the
|
|
@@ -567,12 +574,14 @@ static int adv7511_get_modes(struct drm_encoder *encoder,
|
|
|
|
|
|
/* Reading the EDID only works if the device is powered */
|
|
|
if (!adv7511->powered) {
|
|
|
- regmap_write(adv7511->regmap, ADV7511_REG_INT(0),
|
|
|
- ADV7511_INT0_EDID_READY);
|
|
|
- regmap_write(adv7511->regmap, ADV7511_REG_INT(1),
|
|
|
- ADV7511_INT1_DDC_ERROR);
|
|
|
regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
|
|
|
ADV7511_POWER_POWER_DOWN, 0);
|
|
|
+ if (adv7511->i2c_main->irq) {
|
|
|
+ regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
|
|
|
+ ADV7511_INT0_EDID_READY);
|
|
|
+ regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
|
|
|
+ ADV7511_INT1_DDC_ERROR);
|
|
|
+ }
|
|
|
adv7511->current_edid_segment = -1;
|
|
|
}
|
|
|
|