struct panel_drv_data *ddata;
struct omap_dss_device *dssdev;
struct gpio_desc *gpio;
- int r;
dev_dbg(&pdev->dev, "probe\n");
dssdev->output_type = OMAP_DISPLAY_TYPE_VENC;
dssdev->owner = THIS_MODULE;
- r = omapdss_register_output(dssdev);
- if (r) {
- dev_err(&pdev->dev, "Failed to register output\n");
- return r;
- }
+ omapdss_device_register(dssdev);
return 0;
}
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev;
- omapdss_unregister_output(&ddata->dssdev);
+ omapdss_device_unregister(&ddata->dssdev);
WARN_ON(omapdss_device_is_enabled(dssdev));
if (omapdss_device_is_enabled(dssdev))
dssdev->owner = THIS_MODULE;
dssdev->port_num = 1;
- r = omapdss_register_output(dssdev);
- if (r) {
- dev_err(&pdev->dev, "Failed to register output\n");
- return r;
- }
+ omapdss_device_register(dssdev);
return 0;
}
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev;
- omapdss_unregister_output(&ddata->dssdev);
+ omapdss_device_unregister(&ddata->dssdev);
WARN_ON(omapdss_device_is_enabled(dssdev));
if (omapdss_device_is_enabled(dssdev))
dssdev->owner = THIS_MODULE;
dssdev->port_num = 1;
- r = omapdss_register_output(dssdev);
- if (r) {
- dev_err(&pdev->dev, "Failed to register output\n");
- return r;
- }
+ omapdss_device_register(dssdev);
return 0;
}
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *dssdev = &ddata->dssdev;
- omapdss_unregister_output(&ddata->dssdev);
+ omapdss_device_unregister(&ddata->dssdev);
WARN_ON(omapdss_device_is_enabled(dssdev));
if (omapdss_device_is_enabled(dssdev))
list_add_tail(&dssdev->list, &omapdss_devices_list);
mutex_unlock(&omapdss_devices_lock);
}
+EXPORT_SYMBOL_GPL(omapdss_device_register);
void omapdss_device_unregister(struct omap_dss_device *dssdev)
{
list_del(&dssdev->list);
mutex_unlock(&omapdss_devices_lock);
}
+EXPORT_SYMBOL_GPL(omapdss_device_unregister);
static bool omapdss_device_is_registered(struct device_node *node)
{
out->ops = &dpi_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void dpi_uninit_output_port(struct device_node *port)
struct dpi_data *dpi = port->data;
struct omap_dss_device *out = &dpi->output;
- omapdss_unregister_output(out);
+ omapdss_device_unregister(out);
}
int dpi_init_port(struct dss_device *dss, struct platform_device *pdev,
out->ops = &dsi_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void dsi_uninit_output(struct dsi_data *dsi)
{
struct omap_dss_device *out = &dsi->output;
- omapdss_unregister_output(out);
+ omapdss_device_unregister(out);
}
static int dsi_probe_of(struct dsi_data *dsi)
out->ops = &hdmi_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void hdmi_uninit_output(struct omap_hdmi *hdmi)
{
struct omap_dss_device *out = &hdmi->output;
- omapdss_unregister_output(out);
+ omapdss_device_unregister(out);
}
static int hdmi_probe_of(struct omap_hdmi *hdmi)
out->ops = &hdmi_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void hdmi_uninit_output(struct omap_hdmi *hdmi)
{
struct omap_dss_device *out = &hdmi->output;
- omapdss_unregister_output(out);
+ omapdss_device_unregister(out);
}
static int hdmi_probe_of(struct omap_hdmi *hdmi)
/* OMAP DSS output specific fields */
- struct list_head output_list;
-
/* DISPC channel for this output */
enum omap_channel dispc_channel;
bool dispc_channel_connected;
int omap_dss_get_num_overlays(void);
-int omapdss_register_output(struct omap_dss_device *output);
-void omapdss_unregister_output(struct omap_dss_device *output);
-struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id);
int omapdss_output_set_device(struct omap_dss_device *out,
struct omap_dss_device *dssdev);
int omapdss_output_unset_device(struct omap_dss_device *out);
#include "omapdss.h"
-static LIST_HEAD(output_list);
static DEFINE_MUTEX(output_lock);
int omapdss_output_set_device(struct omap_dss_device *out,
}
EXPORT_SYMBOL(omapdss_output_unset_device);
-int omapdss_register_output(struct omap_dss_device *out)
-{
- list_add_tail(&out->output_list, &output_list);
- omapdss_device_register(out);
- return 0;
-}
-EXPORT_SYMBOL(omapdss_register_output);
-
-void omapdss_unregister_output(struct omap_dss_device *out)
-{
- list_del(&out->output_list);
- omapdss_device_unregister(out);
-}
-EXPORT_SYMBOL(omapdss_unregister_output);
-
-struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id)
-{
- struct omap_dss_device *out;
-
- list_for_each_entry(out, &output_list, output_list) {
- if (out->id == id)
- return out;
- }
-
- return NULL;
-}
-EXPORT_SYMBOL(omap_dss_get_output);
-
struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev)
{
while (dssdev->src)
out->ops = &sdi_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void sdi_uninit_output(struct sdi_device *sdi)
{
- omapdss_unregister_output(&sdi->output);
+ omapdss_device_unregister(&sdi->output);
}
int sdi_init_port(struct dss_device *dss, struct platform_device *pdev,
out->ops = &venc_ops;
out->owner = THIS_MODULE;
- omapdss_register_output(out);
+ omapdss_device_register(out);
}
static void venc_uninit_output(struct venc_device *venc)
{
- omapdss_unregister_output(&venc->output);
+ omapdss_device_unregister(&venc->output);
}
static int venc_probe_of(struct venc_device *venc)