#include "adv7511.h"
+#define HPD_ENABLE 0
+
static struct adv7511 *encoder_to_adv7511(struct drm_encoder *encoder)
{
return to_encoder_slave(encoder)->slave_priv;
* Interrupt and hotplug detection
*/
+#if HPD_ENABLE
static bool adv7511_hpd(struct adv7511 *adv7511)
{
unsigned int irq0;
return false;
}
+#endif
static int adv7511_irq_process(struct adv7511 *adv7511, bool process_hpd)
{
{
enum drm_connector_status status;
unsigned int val;
+#if HPD_ENABLE
bool hpd;
+#endif
int ret;
ret = regmap_read(adv7511->regmap, ADV7511_REG_STATUS, &val);
else
status = connector_status_disconnected;
+#if HPD_ENABLE
hpd = adv7511_hpd(adv7511);
/* The chip resets itself when the cable is disconnected, so in case
ADV7511_REG_POWER2_HDP_SRC_MASK,
ADV7511_REG_POWER2_HDP_SRC_BOTH);
}
+#endif
adv7511->status = status;
return status;
{
struct adv7511 *adv = bridge_to_adv7511(bridge);
+#if HPD_ENABLE
+ if (!adv7511->powered)
+ return;
+#endif
+
adv7511_power_off(adv);
}
return -ENODEV;
}
+#if HPD_ENABLE
adv->connector.polled = DRM_CONNECTOR_POLL_HPD;
+#endif
+
ret = drm_connector_init(bridge->dev, &adv->connector,
&adv7533_connector_funcs, DRM_MODE_CONNECTOR_HDMIA);
if (ret) {
drm_connector_register(&adv->connector);
drm_mode_connector_attach_encoder(&adv->connector, adv->encoder);
+#if HPD_ENABLE
drm_helper_hpd_irq_event(adv->connector.dev);
+#endif
adv7533_attach_dsi(adv);