return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
dev_err(dev, "Failed to connect to video source\n");
goto err_connect;
err_vc_id:
in->ops->dsi.release_vc(in, ddata->channel);
err_req_vc:
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
err_connect:
omap_dss_put_device(in);
return r;
return;
in->ops->dsi.release_vc(in, ddata->channel);
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
return NULL;
}
+int omapdss_device_connect(struct omap_dss_device *src,
+ struct omap_dss_device *dst)
+{
+ if (src->driver)
+ return src->driver->connect(src);
+ else
+ return src->ops->connect(src, dst);
+}
+EXPORT_SYMBOL_GPL(omapdss_device_connect);
+
+void omapdss_device_disconnect(struct omap_dss_device *src,
+ struct omap_dss_device *dst)
+{
+ if (src->driver)
+ src->driver->disconnect(src);
+ else
+ src->ops->disconnect(src, dst);
+}
+EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
+
/* -----------------------------------------------------------------------------
* Components Handling
*/
void omapdss_device_unregister(struct omap_dss_device *dssdev);
struct omap_dss_device *omapdss_find_device_by_port(struct device_node *src,
unsigned int port);
+int omapdss_device_connect(struct omap_dss_device *src,
+ struct omap_dss_device *dst);
+void omapdss_device_disconnect(struct omap_dss_device *src,
+ struct omap_dss_device *dst);
struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev);
void omap_dss_put_device(struct omap_dss_device *dssdev);
for (i = 0; i < priv->num_dssdevs; i++) {
struct omap_dss_device *dssdev = priv->dssdevs[i];
- dssdev->driver->disconnect(dssdev);
+ omapdss_device_disconnect(dssdev, NULL);
priv->dssdevs[i] = NULL;
omap_dss_put_device(dssdev);
}
return -EPROBE_DEFER;
for_each_dss_dev(dssdev) {
- r = dssdev->driver->connect(dssdev);
+ r = omapdss_device_connect(dssdev, NULL);
if (r == -EPROBE_DEFER) {
omap_dss_put_device(dssdev);
goto cleanup;