struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct device *dev;
static int tvc_connect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(ddata->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void tvc_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int tvc_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(ddata->dev, "enable\n");
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void tvc_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(ddata->dev, "disable\n");
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void tvc_get_timings(struct omap_dss_device *dssdev,
static int tvc_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver tvc_driver = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int dvic_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void dvic_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int dvic_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void dvic_disable(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void dvic_get_timings(struct omap_dss_device *dssdev,
static int dvic_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static int dvic_ddc_read(struct i2c_adapter *adapter,
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
void (*hpd_cb)(void *cb_data, enum drm_connector_status status);
void *hpd_cb_data;
bool hpd_enabled;
static int hdmic_connect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(ddata->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(ddata->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void hdmic_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int hdmic_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(ddata->dev, "enable\n");
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void hdmic_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(ddata->dev, "disable\n");
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void hdmic_get_timings(struct omap_dss_device *dssdev,
static int hdmic_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static int hdmic_read_edid(struct omap_dss_device *dssdev,
u8 *edid, int len)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->hdmi.read_edid(in, edid, len);
+ return src->ops->hdmi.read_edid(src, edid, len);
}
static bool hdmic_detect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
bool connected;
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 = src->ops->hdmi.detect(src);
+ if (!connected && src->ops->hdmi.lost_hotplug)
+ src->ops->hdmi.lost_hotplug(src);
return connected;
}
void *cb_data)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (gpio_is_valid(ddata->hpd_gpio)) {
mutex_lock(&ddata->hpd_lock);
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 (src->ops->hdmi.register_hpd_cb) {
+ return src->ops->hdmi.register_hpd_cb(src, cb, cb_data);
}
return -ENOTSUPP;
static void hdmic_unregister_hpd_cb(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (gpio_is_valid(ddata->hpd_gpio)) {
mutex_lock(&ddata->hpd_lock);
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 (src->ops->hdmi.unregister_hpd_cb) {
+ src->ops->hdmi.unregister_hpd_cb(src);
}
}
static void hdmic_enable_hpd(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (gpio_is_valid(ddata->hpd_gpio)) {
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 (src->ops->hdmi.enable_hpd) {
+ src->ops->hdmi.enable_hpd(src);
}
}
static void hdmic_disable_hpd(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (gpio_is_valid(ddata->hpd_gpio)) {
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 (src->ops->hdmi.disable_hpd) {
+ src->ops->hdmi.disable_hpd(src);
}
}
static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
+ return src->ops->hdmi.set_hdmi_mode(src, hdmi_mode);
}
static int hdmic_set_infoframe(struct omap_dss_device *dssdev,
const struct hdmi_avi_infoframe *avi)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->hdmi.set_infoframe(in, avi);
+ return src->ops->hdmi.set_infoframe(src, avi);
}
static const struct omap_dss_driver hdmic_driver = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct gpio_desc *enable_gpio;
static int opa362_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
struct omap_dss_device *dst)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(src, &ddata->dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int opa362_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(dssdev->dev, "enable\n");
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void opa362_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(dssdev->dev, "disable\n");
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(dssdev->dev, "set_timings\n");
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static int opa362_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(dssdev->dev, "check_timings\n");
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_device_ops opa362_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
int pd_gpio;
static int tfp410_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
struct omap_dss_device *dst)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(src, &ddata->dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int tfp410_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void tfp410_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
if (gpio_is_valid(ddata->pd_gpio))
gpio_set_value_cansleep(ddata->pd_gpio, 0);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
tfp410_fix_timings(vm);
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static int tfp410_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
tfp410_fix_timings(vm);
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_device_ops tfp410_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
void (*hpd_cb)(void *cb_data, enum drm_connector_status status);
void *hpd_cb_data;
bool hpd_enabled;
struct omap_dss_device *dst)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
/* DC-DC converter needs at max 300us to get to 90% of 5V */
udelay(300);
- ddata->in = in;
return 0;
}
struct omap_dss_device *dst)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
- omapdss_device_disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(src, &ddata->dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int tpd_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void tpd_disable(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static int tpd_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
- int r;
-
- r = in->ops->check_timings(in, vm);
+ struct omap_dss_device *src = dssdev->src;
- return r;
+ return src->ops->check_timings(src, vm);
}
static int tpd_read_edid(struct omap_dss_device *dssdev,
u8 *edid, int len)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
return -ENODEV;
- return in->ops->hdmi.read_edid(in, edid, len);
+ return src->ops->hdmi.read_edid(src, edid, len);
}
static bool tpd_detect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
bool connected = gpiod_get_value_cansleep(ddata->hpd_gpio);
- if (!connected && in->ops->hdmi.lost_hotplug)
- in->ops->hdmi.lost_hotplug(in);
+ if (!connected && src->ops->hdmi.lost_hotplug)
+ src->ops->hdmi.lost_hotplug(src);
return connected;
}
static int tpd_set_infoframe(struct omap_dss_device *dssdev,
const struct hdmi_avi_infoframe *avi)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->hdmi.set_infoframe(in, avi);
+ return src->ops->hdmi.set_infoframe(src, avi);
}
static int tpd_set_hdmi_mode(struct omap_dss_device *dssdev,
bool hdmi_mode)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
+ return src->ops->hdmi.set_hdmi_mode(src, hdmi_mode);
}
static const struct omap_dss_device_ops tpd_ops = {
static int tpd_probe(struct platform_device *pdev)
{
- struct omap_dss_device *in, *dssdev;
+ struct omap_dss_device *dssdev;
struct panel_drv_data *ddata;
int r;
struct gpio_desc *gpio;
dssdev->owner = THIS_MODULE;
dssdev->port_num = 1;
- in = ddata->in;
-
r = omapdss_register_output(dssdev);
if (r) {
dev_err(&pdev->dev, "Failed to register output\n");
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int panel_dpi_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void panel_dpi_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int panel_dpi_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
r = regulator_enable(ddata->vcc_supply);
if (r) {
- in->ops->disable(in);
+ src->ops->disable(src);
return r;
}
static void panel_dpi_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
regulator_disable(ddata->vcc_supply);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
static int panel_dpi_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver panel_dpi_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int dsicm_dcs_read_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 *data)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
u8 buf[1];
- r = in->ops->dsi.dcs_read(in, ddata->channel, dcs_cmd, buf, 1);
+ r = src->ops->dsi.dcs_read(src, 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);
+ struct omap_dss_device *src = ddata->dssdev.src;
+
+ return src->ops->dsi.dcs_write(src, 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;
+ struct omap_dss_device *src = ddata->dssdev.src;
u8 buf[2] = { dcs_cmd, param };
- return in->ops->dsi.dcs_write(in, ddata->channel, buf, 2);
+ return src->ops->dsi.dcs_write(src, ddata->channel, buf, 2);
}
static int dsicm_sleep_in(struct panel_drv_data *ddata)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
u8 cmd;
int r;
hw_guard_wait(ddata);
cmd = MIPI_DCS_ENTER_SLEEP_MODE;
- r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, &cmd, 1);
+ r = src->ops->dsi.dcs_write_nosync(src, ddata->channel, &cmd, 1);
if (r)
return r;
static int dsicm_set_update_window(struct panel_drv_data *ddata,
u16 x, u16 y, u16 w, u16 h)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
u16 x1 = x;
u16 x2 = x + w - 1;
buf[3] = (x2 >> 8) & 0xff;
buf[4] = (x2 >> 0) & 0xff;
- r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
+ r = src->ops->dsi.dcs_write_nosync(src, 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 = src->ops->dsi.dcs_write_nosync(src, ddata->channel, buf, sizeof(buf));
if (r)
return r;
- in->ops->dsi.bta_sync(in, ddata->channel);
+ src->ops->dsi.bta_sync(src, ddata->channel);
return r;
}
static int dsicm_enter_ulps(struct panel_drv_data *ddata)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
if (ddata->ulps_enabled)
if (ddata->ext_te_gpio)
disable_irq(gpiod_to_irq(ddata->ext_te_gpio));
- in->ops->dsi.disable(in, false, true);
+ src->ops->dsi.disable(src, false, true);
ddata->ulps_enabled = true;
static int dsicm_exit_ulps(struct panel_drv_data *ddata)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
if (!ddata->ulps_enabled)
return 0;
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r) {
dev_err(&ddata->pdev->dev, "failed to enable DSI\n");
goto err1;
}
- in->ops->dsi.enable_hs(in, ddata->channel, true);
+ src->ops->dsi.enable_hs(src, ddata->channel, true);
r = _dsicm_enable_te(ddata, true);
if (r) {
static int dsicm_bl_update_status(struct backlight_device *dev)
{
struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r = 0;
int level;
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
}
mutex_unlock(&ddata->lock);
{
struct platform_device *pdev = to_platform_device(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
u8 errors = 0;
int r;
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_dcs_read_1(ddata, DCS_READ_NUM_ERRORS,
&errors);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
} else {
r = -ENODEV;
}
{
struct platform_device *pdev = to_platform_device(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
u8 id1, id2, id3;
int r;
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
r = dsicm_wake_up(ddata);
if (!r)
r = dsicm_get_id(ddata, &id1, &id2, &id3);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
} else {
r = -ENODEV;
}
{
struct platform_device *pdev = to_platform_device(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
unsigned long t;
int r;
mutex_lock(&ddata->lock);
if (ddata->enabled) {
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
if (t)
r = dsicm_enter_ulps(ddata);
else
r = dsicm_wake_up(ddata);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
}
mutex_unlock(&ddata->lock);
{
struct platform_device *pdev = to_platform_device(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
unsigned long t;
int r;
if (ddata->enabled) {
/* dsicm_wake_up will restart the timer */
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
r = dsicm_wake_up(ddata);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
}
mutex_unlock(&ddata->lock);
static int dsicm_power_on(struct panel_drv_data *ddata)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
u8 id1, id2, id3;
int r;
struct omap_dss_dsi_config dsi_config = {
}
if (ddata->pin_config.num_pins > 0) {
- r = in->ops->dsi.configure_pins(in, &ddata->pin_config);
+ r = src->ops->dsi.configure_pins(src, &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 = src->ops->dsi.set_config(src, &dsi_config);
if (r) {
dev_err(&ddata->pdev->dev, "failed to configure DSI\n");
goto err_vddi;
}
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
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);
+ src->ops->dsi.enable_hs(src, 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 = src->ops->dsi.enable_video_output(src, ddata->channel);
if (r)
goto err;
ddata->intro_printed = true;
}
- in->ops->dsi.enable_hs(in, ddata->channel, true);
+ src->ops->dsi.enable_hs(src, ddata->channel, true);
return 0;
err:
dsicm_hw_reset(ddata);
- in->ops->dsi.disable(in, true, false);
+ src->ops->dsi.disable(src, true, false);
err_vddi:
if (ddata->vddi)
regulator_disable(ddata->vddi);
static void dsicm_power_off(struct panel_drv_data *ddata)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
- in->ops->dsi.disable_video_output(in, ddata->channel);
+ src->ops->dsi.disable_video_output(src, 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);
+ src->ops->dsi.disable(src, true, false);
if (ddata->vddi)
regulator_disable(ddata->vddi);
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct device *dev = &ddata->pdev->dev;
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, 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 = src->ops->dsi.request_vc(src, &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 = src->ops->dsi.set_vc_id(src, ddata->channel, TCH);
if (r) {
dev_err(dev, "failed to set VC_ID\n");
goto err_vc_id;
}
- ddata->in = in;
return 0;
err_vc_id:
- in->ops->dsi.release_vc(in, ddata->channel);
+ src->ops->dsi.release_vc(src, ddata->channel);
err_req_vc:
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
err_connect:
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
static void dsicm_disconnect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- in->ops->dsi.release_vc(in, ddata->channel);
- omapdss_device_disconnect(in, dssdev);
+ src->ops->dsi.release_vc(src, ddata->channel);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int dsicm_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(&ddata->pdev->dev, "enable\n");
goto err;
}
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
r = dsicm_power_on(ddata);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
if (r)
goto err;
static void dsicm_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(&ddata->pdev->dev, "disable\n");
dsicm_cancel_ulps_work(ddata);
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
if (omapdss_device_is_enabled(dssdev)) {
r = dsicm_wake_up(ddata);
dsicm_power_off(ddata);
}
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
static void dsicm_framedone_cb(int err, void *data)
{
struct panel_drv_data *ddata = data;
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
dev_dbg(&ddata->pdev->dev, "framedone, err %d\n", err);
- in->ops->dsi.bus_unlock(ddata->in);
+ src->ops->dsi.bus_unlock(src);
}
static irqreturn_t dsicm_te_isr(int irq, void *data)
{
struct panel_drv_data *ddata = data;
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int old;
int r;
if (old) {
cancel_delayed_work(&ddata->te_timeout_work);
- r = in->ops->dsi.update(in, ddata->channel, dsicm_framedone_cb,
+ r = src->ops->dsi.update(src, 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);
+ src->ops->dsi.bus_unlock(src);
return IRQ_HANDLED;
}
{
struct panel_drv_data *ddata = container_of(work, struct panel_drv_data,
te_timeout_work.work);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
dev_err(&ddata->pdev->dev, "TE not received for 250ms!\n");
atomic_set(&ddata->do_update, 0);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
}
static int dsicm_update(struct omap_dss_device *dssdev,
u16 x, u16 y, u16 w, u16 h)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
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);
+ src->ops->dsi.bus_lock(src);
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 = src->ops->dsi.update(src, ddata->channel, dsicm_framedone_cb,
ddata);
if (r)
goto err;
}
- /* note: no bus_unlock here. unlock is in framedone_cb */
+ /* note: no bus_unlock here. unlock is src framedone_cb */
mutex_unlock(&ddata->lock);
return 0;
err:
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
mutex_unlock(&ddata->lock);
return r;
}
static int dsicm_sync(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(&ddata->pdev->dev, "sync\n");
mutex_lock(&ddata->lock);
- in->ops->dsi.bus_lock(in);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_lock(src);
+ src->ops->dsi.bus_unlock(src);
mutex_unlock(&ddata->lock);
dev_dbg(&ddata->pdev->dev, "sync done\n");
static int _dsicm_enable_te(struct panel_drv_data *ddata, bool enable)
{
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = ddata->dssdev.src;
int r;
if (enable)
r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF);
if (!ddata->ext_te_gpio)
- in->ops->dsi.enable_te(in, enable);
+ src->ops->dsi.enable_te(src, enable);
/* possible panel bug */
msleep(100);
static int dsicm_enable_te(struct omap_dss_device *dssdev, bool enable)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
mutex_lock(&ddata->lock);
if (ddata->te_enabled == enable)
goto end;
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
if (ddata->enabled) {
r = dsicm_wake_up(ddata);
ddata->te_enabled = enable;
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
end:
mutex_unlock(&ddata->lock);
return 0;
err:
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
mutex_unlock(&ddata->lock);
return r;
u16 x, u16 y, u16 w, u16 h)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
int first = 1;
int plen;
size = min((u32)w * h * 3,
ddata->vm.hactive * ddata->vm.vactive * 3);
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
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 = src->ops->dsi.set_max_rx_packet_size(src, 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 = src->ops->dsi.dcs_read(src, 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);
+ src->ops->dsi.set_max_rx_packet_size(src, ddata->channel, 1);
err2:
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
err1:
mutex_unlock(&ddata->lock);
return r;
struct panel_drv_data *ddata = container_of(work, struct panel_drv_data,
ulps_work.work);
struct omap_dss_device *dssdev = &ddata->dssdev;
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
mutex_lock(&ddata->lock);
return;
}
- in->ops->dsi.bus_lock(in);
+ src->ops->dsi.bus_lock(src);
dsicm_enter_ulps(ddata);
- in->ops->dsi.bus_unlock(in);
+ src->ops->dsi.bus_unlock(src);
mutex_unlock(&ddata->lock);
}
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct spi_device *spi;
static int lb035q02_connect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
init_lb035q02_panel(ddata->spi);
- ddata->in = in;
return 0;
}
static void lb035q02_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int lb035q02_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void lb035q02_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void lb035q02_get_timings(struct omap_dss_device *dssdev,
static int lb035q02_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver lb035q02_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int nec_8048_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void nec_8048_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int nec_8048_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void nec_8048_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
if (gpio_is_valid(ddata->res_gpio))
gpio_set_value_cansleep(ddata->res_gpio, 0);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void nec_8048_get_timings(struct omap_dss_device *dssdev,
static int nec_8048_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver nec_8048_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct regulator *vcc;
struct videomode vm;
static int sharp_ls_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void sharp_ls_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int sharp_ls_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
if (ddata->vcc) {
r = regulator_enable(ddata->vcc);
return r;
}
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r) {
regulator_disable(ddata->vcc);
return r;
static void sharp_ls_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
msleep(100);
- in->ops->disable(in);
+ src->ops->disable(src);
if (ddata->vcc)
regulator_disable(ddata->vcc);
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void sharp_ls_get_timings(struct omap_dss_device *dssdev,
static int sharp_ls_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver sharp_ls_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
int reset_gpio;
static int acx565akm_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void acx565akm_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
dev_dbg(&ddata->spi->dev, "%s\n", __func__);
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r) {
pr_err("%s sdi enable failed\n", __func__);
return r;
static void acx565akm_panel_power_off(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
dev_dbg(dssdev->dev, "%s\n", __func__);
/* FIXME need to tweak this delay */
msleep(100);
- in->ops->disable(in);
+ src->ops->disable(src);
}
static int acx565akm_enable(struct omap_dss_device *dssdev)
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void acx565akm_get_timings(struct omap_dss_device *dssdev,
static int acx565akm_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver acx565akm_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int td028ttec1_panel_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int td028ttec1_panel_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
jbt_ret_write_0(ddata, JBT_REG_SLEEP_IN);
jbt_reg_write_1(ddata, JBT_REG_POWER_ON_OFF, 0x00);
- in->ops->disable(in);
+ src->ops->disable(src);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver td028ttec1_ops = {
struct panel_drv_data {
struct omap_dss_device dssdev;
- struct omap_dss_device *in;
struct videomode vm;
static int tpo_td043_connect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in;
+ struct omap_dss_device *src;
int r;
- in = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
- if (IS_ERR(in)) {
+ src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
+ if (IS_ERR(src)) {
dev_err(dssdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
+ return PTR_ERR(src);
}
- r = omapdss_device_connect(in, dssdev);
+ r = omapdss_device_connect(src, dssdev);
if (r) {
- omap_dss_put_device(in);
+ omap_dss_put_device(src);
return r;
}
- ddata->in = in;
return 0;
}
static void tpo_td043_disconnect(struct omap_dss_device *dssdev)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- omapdss_device_disconnect(in, dssdev);
+ omapdss_device_disconnect(src, dssdev);
- omap_dss_put_device(in);
- ddata->in = NULL;
+ omap_dss_put_device(src);
}
static int tpo_td043_enable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
int r;
if (!omapdss_device_is_connected(dssdev))
if (omapdss_device_is_enabled(dssdev))
return 0;
- in->ops->set_timings(in, &ddata->vm);
+ src->ops->set_timings(src, &ddata->vm);
- r = in->ops->enable(in);
+ r = src->ops->enable(src);
if (r)
return r;
if (!ddata->spi_suspended) {
r = tpo_td043_power_on(ddata);
if (r) {
- in->ops->disable(in);
+ src->ops->disable(src);
return r;
}
}
static void tpo_td043_disable(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
if (!omapdss_device_is_enabled(dssdev))
return;
- in->ops->disable(in);
+ src->ops->disable(src);
if (!ddata->spi_suspended)
tpo_td043_power_off(ddata);
struct videomode *vm)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
ddata->vm = *vm;
- in->ops->set_timings(in, vm);
+ src->ops->set_timings(src, vm);
}
static void tpo_td043_get_timings(struct omap_dss_device *dssdev,
static int tpo_td043_check_timings(struct omap_dss_device *dssdev,
struct videomode *vm)
{
- struct panel_drv_data *ddata = to_panel_data(dssdev);
- struct omap_dss_device *in = ddata->in;
+ struct omap_dss_device *src = dssdev->src;
- return in->ops->check_timings(in, vm);
+ return src->ops->check_timings(src, vm);
}
static const struct omap_dss_driver tpo_td043_ops = {