Since commit
38b49e08, hdmi driver can notify the connection state
via extcon framework. However, if hdmi cable is already connected
before the system boot, there is no interrupt for hdmi connection,
and thus it cannot be informed to userspace. To prevent the situation
that cable is connected, but uninformed in userspace, this patch
makes hdmi driver check the plugged state and notifies it explicitly
at probing.
Change-Id: I432f30df4effef27c7f393a4659c02cc035d5e6d
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
{
struct device *dev = hdata->dev;
struct extcon_dev *edev;
+ enum drm_connector_status plug;
int ret;
edev = devm_extcon_dev_allocate(dev, extcon_cable_list);
hdata->edev = edev;
+ /* Notify the plugged state when hdmi is already connected */
+ plug = hdmi_detect(&hdata->connector, false);
+ if (plug == connector_status_connected)
+ extcon_set_cable_state(edev, "HDMI", 1);
+
return 0;
}