return PTR_ERR(in);
}
- r = in->ops.atv->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.atv->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.atv->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.atv->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops.atv->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.atv->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void tvc_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.atv->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver tvc_driver = {
return PTR_ERR(in);
}
- r = in->ops.dvi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dvi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dvi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dvi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops.dvi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dvi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void dvic_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dvi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static int dvic_ddc_read(struct i2c_adapter *adapter,
return PTR_ERR(in);
}
- r = in->ops.hdmi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.hdmi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.hdmi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.hdmi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops.hdmi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.hdmi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void hdmic_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static int hdmic_read_edid(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->read_edid(in, edid, len);
+ return in->ops->hdmi.read_edid(in, edid, len);
}
static bool hdmic_detect(struct omap_dss_device *dssdev)
if (gpio_is_valid(ddata->hpd_gpio))
connected = gpio_get_value_cansleep(ddata->hpd_gpio);
else
- connected = in->ops.hdmi->detect(in);
- if (!connected && in->ops.hdmi->lost_hotplug)
- in->ops.hdmi->lost_hotplug(in);
+ connected = in->ops->hdmi.detect(in);
+ if (!connected && in->ops->hdmi.lost_hotplug)
+ in->ops->hdmi.lost_hotplug(in);
return connected;
}
ddata->hpd_cb_data = cb_data;
mutex_unlock(&ddata->hpd_lock);
return 0;
- } else if (in->ops.hdmi->register_hpd_cb) {
- return in->ops.hdmi->register_hpd_cb(in, cb, cb_data);
+ } else if (in->ops->hdmi.register_hpd_cb) {
+ return in->ops->hdmi.register_hpd_cb(in, cb, cb_data);
}
return -ENOTSUPP;
ddata->hpd_cb = NULL;
ddata->hpd_cb_data = NULL;
mutex_unlock(&ddata->hpd_lock);
- } else if (in->ops.hdmi->unregister_hpd_cb) {
- in->ops.hdmi->unregister_hpd_cb(in);
+ } else if (in->ops->hdmi.unregister_hpd_cb) {
+ in->ops->hdmi.unregister_hpd_cb(in);
}
}
mutex_lock(&ddata->hpd_lock);
ddata->hpd_enabled = true;
mutex_unlock(&ddata->hpd_lock);
- } else if (in->ops.hdmi->enable_hpd) {
- in->ops.hdmi->enable_hpd(in);
+ } else if (in->ops->hdmi.enable_hpd) {
+ in->ops->hdmi.enable_hpd(in);
}
}
mutex_lock(&ddata->hpd_lock);
ddata->hpd_enabled = false;
mutex_unlock(&ddata->hpd_lock);
- } else if (in->ops.hdmi->disable_hpd) {
- in->ops.hdmi->disable_hpd(in);
+ } else if (in->ops->hdmi.disable_hpd) {
+ in->ops->hdmi.disable_hpd(in);
}
}
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->set_hdmi_mode(in, hdmi_mode);
+ return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
}
static int hdmic_set_infoframe(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->set_infoframe(in, avi);
+ return in->ops->hdmi.set_infoframe(in, avi);
}
static const struct omap_dss_driver hdmic_driver = {
return PTR_ERR(in);
}
- r = in->ops.atv->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops.atv->disconnect(in, &ddata->dssdev);
+ in->ops->disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.atv->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.atv->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- in->ops.atv->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.atv->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static int opa362_check_timings(struct omap_dss_device *dssdev,
dev_dbg(dssdev->dev, "check_timings\n");
- return in->ops.atv->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
-static const struct omapdss_atv_ops opa362_atv_ops = {
+static const struct omap_dss_device_ops opa362_ops = {
.connect = opa362_connect,
.disconnect = opa362_disconnect,
-
.enable = opa362_enable,
.disable = opa362_disable,
-
.check_timings = opa362_check_timings,
.set_timings = opa362_set_timings,
};
ddata->enable_gpio = gpio;
dssdev = &ddata->dssdev;
- dssdev->ops.atv = &opa362_atv_ops;
+ dssdev->ops = &opa362_ops;
dssdev->dev = &pdev->dev;
dssdev->type = OMAP_DISPLAY_TYPE_VENC;
dssdev->output_type = OMAP_DISPLAY_TYPE_VENC;
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops.dpi->disconnect(in, &ddata->dssdev);
+ in->ops->disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (gpio_is_valid(ddata->pd_gpio))
gpio_set_value_cansleep(ddata->pd_gpio, 0);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static int tfp410_check_timings(struct omap_dss_device *dssdev,
tfp410_fix_timings(vm);
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
-static const struct omapdss_dvi_ops tfp410_dvi_ops = {
+static const struct omap_dss_device_ops tfp410_ops = {
.connect = tfp410_connect,
.disconnect = tfp410_disconnect,
-
.enable = tfp410_enable,
.disable = tfp410_disable,
-
.check_timings = tfp410_check_timings,
.set_timings = tfp410_set_timings,
};
}
dssdev = &ddata->dssdev;
- dssdev->ops.dvi = &tfp410_dvi_ops;
+ dssdev->ops = &tfp410_ops;
dssdev->dev = &pdev->dev;
dssdev->type = OMAP_DISPLAY_TYPE_DPI;
dssdev->output_type = OMAP_DISPLAY_TYPE_DVI;
return PTR_ERR(in);
}
- r = in->ops.hdmi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
dst->src = NULL;
dssdev->dst = NULL;
- in->ops.hdmi->disconnect(in, &ddata->dssdev);
+ in->ops->disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;
- in->ops.hdmi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.hdmi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
- in->ops.hdmi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.hdmi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static int tpd_check_timings(struct omap_dss_device *dssdev,
struct omap_dss_device *in = ddata->in;
int r;
- r = in->ops.hdmi->check_timings(in, vm);
+ r = in->ops->check_timings(in, vm);
return r;
}
if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
return -ENODEV;
- return in->ops.hdmi->read_edid(in, edid, len);
+ return in->ops->hdmi.read_edid(in, edid, len);
}
static bool tpd_detect(struct omap_dss_device *dssdev)
struct omap_dss_device *in = ddata->in;
bool connected = gpiod_get_value_cansleep(ddata->hpd_gpio);
- if (!connected && in->ops.hdmi->lost_hotplug)
- in->ops.hdmi->lost_hotplug(in);
+ if (!connected && in->ops->hdmi.lost_hotplug)
+ in->ops->hdmi.lost_hotplug(in);
return connected;
}
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->set_infoframe(in, avi);
+ return in->ops->hdmi.set_infoframe(in, avi);
}
static int tpd_set_hdmi_mode(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.hdmi->set_hdmi_mode(in, hdmi_mode);
+ return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
}
-static const struct omapdss_hdmi_ops tpd_hdmi_ops = {
+static const struct omap_dss_device_ops tpd_ops = {
.connect = tpd_connect,
.disconnect = tpd_disconnect,
-
.enable = tpd_enable,
.disable = tpd_disable,
-
.check_timings = tpd_check_timings,
.set_timings = tpd_set_timings,
- .read_edid = tpd_read_edid,
- .detect = tpd_detect,
- .register_hpd_cb = tpd_register_hpd_cb,
- .unregister_hpd_cb = tpd_unregister_hpd_cb,
- .enable_hpd = tpd_enable_hpd,
- .disable_hpd = tpd_disable_hpd,
- .set_infoframe = tpd_set_infoframe,
- .set_hdmi_mode = tpd_set_hdmi_mode,
+ .hdmi = {
+ .read_edid = tpd_read_edid,
+ .detect = tpd_detect,
+ .register_hpd_cb = tpd_register_hpd_cb,
+ .unregister_hpd_cb = tpd_unregister_hpd_cb,
+ .enable_hpd = tpd_enable_hpd,
+ .disable_hpd = tpd_disable_hpd,
+ .set_infoframe = tpd_set_infoframe,
+ .set_hdmi_mode = tpd_set_hdmi_mode,
+ },
};
static irqreturn_t tpd_hpd_isr(int irq, void *data)
return r;
dssdev = &ddata->dssdev;
- dssdev->ops.hdmi = &tpd_hdmi_ops;
+ dssdev->ops = &tpd_ops;
dssdev->dev = &pdev->dev;
dssdev->type = OMAP_DISPLAY_TYPE_HDMI;
dssdev->output_type = OMAP_DISPLAY_TYPE_HDMI;
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
r = regulator_enable(ddata->vcc_supply);
if (r) {
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
return r;
}
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
regulator_disable(ddata->vcc_supply);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver panel_dpi_ops = {
int r;
u8 buf[1];
- r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, buf, 1);
+ r = in->ops->dsi.dcs_read(in, ddata->channel, dcs_cmd, buf, 1);
if (r < 0)
return r;
static int dsicm_dcs_write_0(struct panel_drv_data *ddata, u8 dcs_cmd)
{
struct omap_dss_device *in = ddata->in;
- return in->ops.dsi->dcs_write(in, ddata->channel, &dcs_cmd, 1);
+ return in->ops->dsi.dcs_write(in, ddata->channel, &dcs_cmd, 1);
}
static int dsicm_dcs_write_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 param)
struct omap_dss_device *in = ddata->in;
u8 buf[2] = { dcs_cmd, param };
- return in->ops.dsi->dcs_write(in, ddata->channel, buf, 2);
+ return in->ops->dsi.dcs_write(in, ddata->channel, buf, 2);
}
static int dsicm_sleep_in(struct panel_drv_data *ddata)
hw_guard_wait(ddata);
cmd = MIPI_DCS_ENTER_SLEEP_MODE;
- r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, &cmd, 1);
+ r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, &cmd, 1);
if (r)
return r;
buf[3] = (x2 >> 8) & 0xff;
buf[4] = (x2 >> 0) & 0xff;
- r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
+ r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
if (r)
return r;
buf[3] = (y2 >> 8) & 0xff;
buf[4] = (y2 >> 0) & 0xff;
- r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
+ r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
if (r)
return r;
- in->ops.dsi->bta_sync(in, ddata->channel);
+ in->ops->dsi.bta_sync(in, ddata->channel);
return r;
}
if (ddata->ext_te_gpio)
disable_irq(gpiod_to_irq(ddata->ext_te_gpio));
- in->ops.dsi->disable(in, false, true);
+ in->ops->dsi.disable(in, false, true);
ddata->ulps_enabled = true;
if (!ddata->ulps_enabled)
return 0;
- r = in->ops.dsi->enable(in);
+ r = in->ops->enable(in);
if (r) {
dev_err(&ddata->pdev->dev, "failed to enable DSI\n");
goto err1;
}
- in->ops.dsi->enable_hs(in, ddata->channel, true);
+ in->ops->dsi.enable_hs(in, ddata->channel, true);
r = _dsicm_enable_te(ddata, true);
if (r) {
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
}
mutex_unlock(&ddata->lock);
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_dcs_read_1(ddata, DCS_READ_NUM_ERRORS,
&errors);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
} else {
r = -ENODEV;
}
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_get_id(ddata, &id1, &id2, &id3);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
} else {
r = -ENODEV;
}
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
if (t)
r = dsicm_enter_ulps(ddata);
else
r = dsicm_wake_up(ddata);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
}
mutex_unlock(&ddata->lock);
if (ddata->enabled) {
/* dsicm_wake_up will restart the timer */
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
}
mutex_unlock(&ddata->lock);
}
if (ddata->pin_config.num_pins > 0) {
- r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
+ r = in->ops->dsi.configure_pins(in, &ddata->pin_config);
if (r) {
dev_err(&ddata->pdev->dev,
"failed to configure DSI pins\n");
}
}
- r = in->ops.dsi->set_config(in, &dsi_config);
+ r = in->ops->dsi.set_config(in, &dsi_config);
if (r) {
dev_err(&ddata->pdev->dev, "failed to configure DSI\n");
goto err_vddi;
}
- r = in->ops.dsi->enable(in);
+ r = in->ops->enable(in);
if (r) {
dev_err(&ddata->pdev->dev, "failed to enable DSI\n");
goto err_vddi;
dsicm_hw_reset(ddata);
- in->ops.dsi->enable_hs(in, ddata->channel, false);
+ in->ops->dsi.enable_hs(in, ddata->channel, false);
r = dsicm_sleep_out(ddata);
if (r)
if (r)
goto err;
- r = in->ops.dsi->enable_video_output(in, ddata->channel);
+ r = in->ops->dsi.enable_video_output(in, ddata->channel);
if (r)
goto err;
ddata->intro_printed = true;
}
- in->ops.dsi->enable_hs(in, ddata->channel, true);
+ in->ops->dsi.enable_hs(in, ddata->channel, true);
return 0;
err:
dsicm_hw_reset(ddata);
- in->ops.dsi->disable(in, true, false);
+ in->ops->dsi.disable(in, true, false);
err_vddi:
if (ddata->vddi)
regulator_disable(ddata->vddi);
struct omap_dss_device *in = ddata->in;
int r;
- in->ops.dsi->disable_video_output(in, ddata->channel);
+ in->ops->dsi.disable_video_output(in, ddata->channel);
r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_OFF);
if (!r)
dsicm_hw_reset(ddata);
}
- in->ops.dsi->disable(in, true, false);
+ in->ops->dsi.disable(in, true, false);
if (ddata->vddi)
regulator_disable(ddata->vddi);
return PTR_ERR(in);
}
- r = in->ops.dsi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
dev_err(dev, "Failed to connect to video source\n");
goto err_connect;
}
- r = in->ops.dsi->request_vc(in, &ddata->channel);
+ r = in->ops->dsi.request_vc(in, &ddata->channel);
if (r) {
dev_err(dev, "failed to get virtual channel\n");
goto err_req_vc;
}
- r = in->ops.dsi->set_vc_id(in, ddata->channel, TCH);
+ r = in->ops->dsi.set_vc_id(in, ddata->channel, TCH);
if (r) {
dev_err(dev, "failed to set VC_ID\n");
goto err_vc_id;
return 0;
err_vc_id:
- in->ops.dsi->release_vc(in, ddata->channel);
+ in->ops->dsi.release_vc(in, ddata->channel);
err_req_vc:
- in->ops.dsi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
err_connect:
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dsi->release_vc(in, ddata->channel);
- in->ops.dsi->disconnect(in, dssdev);
+ in->ops->dsi.release_vc(in, ddata->channel);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
goto err;
}
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_power_on(ddata);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
if (r)
goto err;
dsicm_cancel_ulps_work(ddata);
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
if (omapdss_device_is_enabled(dssdev)) {
r = dsicm_wake_up(ddata);
dsicm_power_off(ddata);
}
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
struct omap_dss_device *in = ddata->in;
dev_dbg(&ddata->pdev->dev, "framedone, err %d\n", err);
- in->ops.dsi->bus_unlock(ddata->in);
+ in->ops->dsi.bus_unlock(ddata->in);
}
static irqreturn_t dsicm_te_isr(int irq, void *data)
if (old) {
cancel_delayed_work(&ddata->te_timeout_work);
- r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb,
+ r = in->ops->dsi.update(in, ddata->channel, dsicm_framedone_cb,
ddata);
if (r)
goto err;
return IRQ_HANDLED;
err:
dev_err(&ddata->pdev->dev, "start update failed\n");
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
return IRQ_HANDLED;
}
dev_err(&ddata->pdev->dev, "TE not received for 250ms!\n");
atomic_set(&ddata->do_update, 0);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
}
static int dsicm_update(struct omap_dss_device *dssdev,
dev_dbg(&ddata->pdev->dev, "update %d, %d, %d x %d\n", x, y, w, h);
mutex_lock(&ddata->lock);
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
if (r)
msecs_to_jiffies(250));
atomic_set(&ddata->do_update, 1);
} else {
- r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb,
+ r = in->ops->dsi.update(in, ddata->channel, dsicm_framedone_cb,
ddata);
if (r)
goto err;
mutex_unlock(&ddata->lock);
return 0;
err:
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
mutex_unlock(&ddata->lock);
return r;
}
dev_dbg(&ddata->pdev->dev, "sync\n");
mutex_lock(&ddata->lock);
- in->ops.dsi->bus_lock(in);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_lock(in);
+ in->ops->dsi.bus_unlock(in);
mutex_unlock(&ddata->lock);
dev_dbg(&ddata->pdev->dev, "sync done\n");
r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF);
if (!ddata->ext_te_gpio)
- in->ops.dsi->enable_te(in, enable);
+ in->ops->dsi.enable_te(in, enable);
/* possible panel bug */
msleep(100);
if (ddata->te_enabled == enable)
goto end;
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
if (ddata->enabled) {
r = dsicm_wake_up(ddata);
ddata->te_enabled = enable;
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
end:
mutex_unlock(&ddata->lock);
return 0;
err:
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
mutex_unlock(&ddata->lock);
return r;
size = min((u32)w * h * 3,
ddata->vm.hactive * ddata->vm.vactive * 3);
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
r = dsicm_wake_up(ddata);
if (r)
dsicm_set_update_window(ddata, x, y, w, h);
- r = in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, plen);
+ r = in->ops->dsi.set_max_rx_packet_size(in, ddata->channel, plen);
if (r)
goto err2;
u8 dcs_cmd = first ? 0x2e : 0x3e;
first = 0;
- r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd,
+ r = in->ops->dsi.dcs_read(in, ddata->channel, dcs_cmd,
buf + buf_used, size - buf_used);
if (r < 0) {
r = buf_used;
err3:
- in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, 1);
+ in->ops->dsi.set_max_rx_packet_size(in, ddata->channel, 1);
err2:
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
err1:
mutex_unlock(&ddata->lock);
return r;
return;
}
- in->ops.dsi->bus_lock(in);
+ in->ops->dsi.bus_lock(in);
dsicm_enter_ulps(ddata);
- in->ops.dsi->bus_unlock(in);
+ in->ops->dsi.bus_unlock(in);
mutex_unlock(&ddata->lock);
}
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void lb035q02_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver lb035q02_ops = {
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (gpio_is_valid(ddata->res_gpio))
gpio_set_value_cansleep(ddata->res_gpio, 0);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void nec_8048_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver nec_8048_ops = {
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
if (ddata->vcc) {
r = regulator_enable(ddata->vcc);
return r;
}
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r) {
regulator_disable(ddata->vcc);
return r;
msleep(100);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
if (ddata->vcc)
regulator_disable(ddata->vcc);
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void sharp_ls_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver sharp_ls_ops = {
return PTR_ERR(in);
}
- r = in->ops.sdi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.sdi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
dev_dbg(&ddata->spi->dev, "%s\n", __func__);
- in->ops.sdi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.sdi->enable(in);
+ r = in->ops->enable(in);
if (r) {
pr_err("%s sdi enable failed\n", __func__);
return r;
/* FIXME need to tweak this delay */
msleep(100);
- in->ops.sdi->disable(in);
+ in->ops->disable(in);
}
static int acx565akm_enable(struct omap_dss_device *dssdev)
ddata->vm = *vm;
- in->ops.sdi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void acx565akm_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.sdi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver acx565akm_ops = {
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
jbt_ret_write_0(ddata, JBT_REG_SLEEP_IN);
jbt_reg_write_1(ddata, JBT_REG_POWER_ON_OFF, 0x00);
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver td028ttec1_ops = {
return PTR_ERR(in);
}
- r = in->ops.dpi->connect(in, dssdev);
+ r = in->ops->connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops.dpi->disconnect(in, dssdev);
+ in->ops->disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops.dpi->set_timings(in, &ddata->vm);
+ in->ops->set_timings(in, &ddata->vm);
- r = in->ops.dpi->enable(in);
+ r = in->ops->enable(in);
if (r)
return r;
if (!ddata->spi_suspended) {
r = tpo_td043_power_on(ddata);
if (r) {
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
return r;
}
}
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops.dpi->disable(in);
+ in->ops->disable(in);
if (!ddata->spi_suspended)
tpo_td043_power_off(ddata);
ddata->vm = *vm;
- in->ops.dpi->set_timings(in, vm);
+ in->ops->set_timings(in, vm);
}
static void tpo_td043_get_timings(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- return in->ops.dpi->check_timings(in, vm);
+ return in->ops->check_timings(in, vm);
}
static const struct omap_dss_driver tpo_td043_ops = {
dss_mgr_disconnect(&dpi->output, dssdev);
}
-static const struct omapdss_dpi_ops dpi_ops = {
+static const struct omap_dss_device_ops dpi_ops = {
.connect = dpi_connect,
.disconnect = dpi_disconnect,
out->output_type = OMAP_DISPLAY_TYPE_DPI;
out->dispc_channel = dpi_get_channel(dpi, port_num);
out->port_num = port_num;
- out->ops.dpi = &dpi_ops;
+ out->ops = &dpi_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);
dss_mgr_disconnect(&dsi->output, dssdev);
}
-static const struct omapdss_dsi_ops dsi_ops = {
+static const struct omap_dss_device_ops dsi_ops = {
.connect = dsi_connect,
.disconnect = dsi_disconnect,
+ .enable = dsi_display_enable,
- .bus_lock = dsi_bus_lock,
- .bus_unlock = dsi_bus_unlock,
+ .dsi = {
+ .bus_lock = dsi_bus_lock,
+ .bus_unlock = dsi_bus_unlock,
- .enable = dsi_display_enable,
- .disable = dsi_display_disable,
+ .disable = dsi_display_disable,
- .enable_hs = dsi_vc_enable_hs,
+ .enable_hs = dsi_vc_enable_hs,
- .configure_pins = dsi_configure_pins,
- .set_config = dsi_set_config,
+ .configure_pins = dsi_configure_pins,
+ .set_config = dsi_set_config,
- .enable_video_output = dsi_enable_video_output,
- .disable_video_output = dsi_disable_video_output,
+ .enable_video_output = dsi_enable_video_output,
+ .disable_video_output = dsi_disable_video_output,
- .update = dsi_update,
+ .update = dsi_update,
- .enable_te = dsi_enable_te,
+ .enable_te = dsi_enable_te,
- .request_vc = dsi_request_vc,
- .set_vc_id = dsi_set_vc_id,
- .release_vc = dsi_release_vc,
+ .request_vc = dsi_request_vc,
+ .set_vc_id = dsi_set_vc_id,
+ .release_vc = dsi_release_vc,
- .dcs_write = dsi_vc_dcs_write,
- .dcs_write_nosync = dsi_vc_dcs_write_nosync,
- .dcs_read = dsi_vc_dcs_read,
+ .dcs_write = dsi_vc_dcs_write,
+ .dcs_write_nosync = dsi_vc_dcs_write_nosync,
+ .dcs_read = dsi_vc_dcs_read,
- .gen_write = dsi_vc_generic_write,
- .gen_write_nosync = dsi_vc_generic_write_nosync,
- .gen_read = dsi_vc_generic_read,
+ .gen_write = dsi_vc_generic_write,
+ .gen_write_nosync = dsi_vc_generic_write_nosync,
+ .gen_read = dsi_vc_generic_read,
- .bta_sync = dsi_vc_send_bta_sync,
+ .bta_sync = dsi_vc_send_bta_sync,
- .set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size,
+ .set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size,
+ },
};
static void dsi_init_output(struct dsi_data *dsi)
out->output_type = OMAP_DISPLAY_TYPE_DSI;
out->name = dsi->module_id == 0 ? "dsi.0" : "dsi.1";
out->dispc_channel = dsi_get_channel(dsi);
- out->ops.dsi = &dsi_ops;
+ out->ops = &dsi_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);
return 0;
}
-static const struct omapdss_hdmi_ops hdmi_ops = {
+static const struct omap_dss_device_ops hdmi_ops = {
.connect = hdmi_connect,
.disconnect = hdmi_disconnect,
.check_timings = hdmi_display_check_timing,
.set_timings = hdmi_display_set_timing,
- .read_edid = hdmi_read_edid,
- .lost_hotplug = hdmi_lost_hotplug,
- .set_infoframe = hdmi_set_infoframe,
- .set_hdmi_mode = hdmi_set_hdmi_mode,
+ .hdmi = {
+ .read_edid = hdmi_read_edid,
+ .lost_hotplug = hdmi_lost_hotplug,
+ .set_infoframe = hdmi_set_infoframe,
+ .set_hdmi_mode = hdmi_set_hdmi_mode,
+ },
};
static void hdmi_init_output(struct omap_hdmi *hdmi)
out->output_type = OMAP_DISPLAY_TYPE_HDMI;
out->name = "hdmi.0";
out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
- out->ops.hdmi = &hdmi_ops;
+ out->ops = &hdmi_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);
return 0;
}
-static const struct omapdss_hdmi_ops hdmi_ops = {
+static const struct omap_dss_device_ops hdmi_ops = {
.connect = hdmi_connect,
.disconnect = hdmi_disconnect,
.check_timings = hdmi_display_check_timing,
.set_timings = hdmi_display_set_timing,
- .read_edid = hdmi_read_edid,
- .set_infoframe = hdmi_set_infoframe,
- .set_hdmi_mode = hdmi_set_hdmi_mode,
+ .hdmi = {
+ .read_edid = hdmi_read_edid,
+ .set_infoframe = hdmi_set_infoframe,
+ .set_hdmi_mode = hdmi_set_hdmi_mode,
+ },
};
static void hdmi_init_output(struct omap_hdmi *hdmi)
out->output_type = OMAP_DISPLAY_TYPE_HDMI;
out->name = "hdmi.0";
out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
- out->ops.hdmi = &hdmi_ops;
+ out->ops = &hdmi_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);
u8 pre_mult_alpha;
};
-struct omapdss_dpi_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
- void (*disable)(struct omap_dss_device *dssdev);
-
- int (*check_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
- void (*set_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
-};
-
-struct omapdss_sdi_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
- void (*disable)(struct omap_dss_device *dssdev);
-
- int (*check_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
- void (*set_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
-};
-
-struct omapdss_dvi_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
- void (*disable)(struct omap_dss_device *dssdev);
-
- int (*check_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
- void (*set_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
-};
-
-struct omapdss_atv_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
- void (*disable)(struct omap_dss_device *dssdev);
-
- int (*check_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
- void (*set_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
-};
-
struct omapdss_hdmi_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
- void (*disable)(struct omap_dss_device *dssdev);
-
- int (*check_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
- void (*set_timings)(struct omap_dss_device *dssdev,
- struct videomode *vm);
-
int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
void (*lost_hotplug)(struct omap_dss_device *dssdev);
bool (*detect)(struct omap_dss_device *dssdev);
};
struct omapdss_dsi_ops {
- int (*connect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_dss_device *dssdev,
- struct omap_dss_device *dst);
-
- int (*enable)(struct omap_dss_device *dssdev);
void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
bool enter_ulps);
int channel, u16 plen);
};
+struct omap_dss_device_ops {
+ int (*connect)(struct omap_dss_device *dssdev,
+ struct omap_dss_device *dst);
+ void (*disconnect)(struct omap_dss_device *dssdev,
+ struct omap_dss_device *dst);
+
+ int (*enable)(struct omap_dss_device *dssdev);
+ void (*disable)(struct omap_dss_device *dssdev);
+
+ int (*check_timings)(struct omap_dss_device *dssdev,
+ struct videomode *vm);
+ void (*set_timings)(struct omap_dss_device *dssdev,
+ struct videomode *vm);
+
+ union {
+ const struct omapdss_hdmi_ops hdmi;
+ const struct omapdss_dsi_ops dsi;
+ };
+};
+
struct omap_dss_device {
struct kobject kobj;
struct device *dev;
const char *name;
const struct omap_dss_driver *driver;
-
- union {
- const struct omapdss_dpi_ops *dpi;
- const struct omapdss_sdi_ops *sdi;
- const struct omapdss_dvi_ops *dvi;
- const struct omapdss_hdmi_ops *hdmi;
- const struct omapdss_atv_ops *atv;
- const struct omapdss_dsi_ops *dsi;
- } ops;
+ const struct omap_dss_device_ops *ops;
/* helper variable for driver suspend/resume */
bool activate_after_resume;
dss_mgr_disconnect(&sdi->output, dssdev);
}
-static const struct omapdss_sdi_ops sdi_ops = {
+static const struct omap_dss_device_ops sdi_ops = {
.connect = sdi_connect,
.disconnect = sdi_disconnect,
out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
/* We have SDI only on OMAP3, where it's on port 1 */
out->port_num = 1;
- out->ops.sdi = &sdi_ops;
+ out->ops = &sdi_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);
dss_mgr_disconnect(&venc->output, dssdev);
}
-static const struct omapdss_atv_ops venc_ops = {
+static const struct omap_dss_device_ops venc_ops = {
.connect = venc_connect,
.disconnect = venc_disconnect,
out->output_type = OMAP_DISPLAY_TYPE_VENC;
out->name = "venc.0";
out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
- out->ops.atv = &venc_ops;
+ out->ops = &venc_ops;
out->owner = THIS_MODULE;
omapdss_register_output(out);