summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-02-14 14:17:28 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 14:00:50 +0300
commitecc8b370898660613e846667f9c1e8a94f8d4aaa (patch)
treeb68295d545b8ca44be1e00c30046ce3341dc8add /drivers/video/omap2/displays/panel-tpo-td043mtea1.c
parent94140f0d225fd1261e11a9d883be6de5692d57d8 (diff)
downloadtalos-op-linux-ecc8b370898660613e846667f9c1e8a94f8d4aaa.tar.gz
talos-op-linux-ecc8b370898660613e846667f9c1e8a94f8d4aaa.zip
OMAPDSS: Add panel dev pointer to dssdev
We are about to remove the dss bus support, which also means that the omap_dss_device won't be a real device anymore. This means that the embedded "dev" struct needs to be removed from omap_dss_device. After we've finished the removal of the dss bus, we see the following changes: - struct omap_dss_device won't be a real Linux device anymore, but more like a "display entity". - struct omap_dss_driver won't be a Linux device driver, but "display entity ops". - The panel devices/drivers won't be omapdss devices/drivers, but platform/i2c/spi/etc devices/drivers, whichever fits the control mechanism of the panel. - The panel drivers will create omap_dss_device and omap_dss_driver, fill the required fields, and register the omap_dss_device to omapdss. - omap_dss_device won't have an embedded dev struct anymore, but a dev pointer to the actual device that manages the omap_dss_device. The model described above resembles the model that has been discussed with CDF (common display framework). For the duration of the conversion, we temporarily have two devs in the dssdev, the old "old_dev", which is a full embedded device struct, and the new "dev", which is a pointer to the device. "old_dev" will be removed in the future. For devices belonging to dss bus the dev is initialized to point to old_dev. This way all the code can just use the dev, for both old and new style panels. Both the new and old style panel drivers work during the conversion, and only after the dss bus support is removed will the old style panels stop to compile. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-tpo-td043mtea1.c')
-rw-r--r--drivers/video/omap2/displays/panel-tpo-td043mtea1.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index abf2bc4a18ab..7729b6fa6f97 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -126,7 +126,7 @@ static int tpo_td043_write_mirror(struct spi_device *spi, bool h, bool v)
static int tpo_td043_set_hmirror(struct omap_dss_device *dssdev, bool enable)
{
- struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
+ struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dssdev->dev);
tpo_td043->hmirror = enable;
return tpo_td043_write_mirror(tpo_td043->spi, tpo_td043->hmirror,
@@ -135,7 +135,7 @@ static int tpo_td043_set_hmirror(struct omap_dss_device *dssdev, bool enable)
static bool tpo_td043_get_hmirror(struct omap_dss_device *dssdev)
{
- struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
+ struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dssdev->dev);
return tpo_td043->hmirror;
}
@@ -338,7 +338,7 @@ static void tpo_td043_power_off(struct tpo_td043_device *tpo_td043)
static int tpo_td043_enable_dss(struct omap_dss_device *dssdev)
{
- struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
+ struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dssdev->dev);
int r;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
@@ -372,7 +372,7 @@ err0:
static void tpo_td043_disable_dss(struct omap_dss_device *dssdev)
{
- struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
+ struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dssdev->dev);
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
@@ -385,14 +385,14 @@ static void tpo_td043_disable_dss(struct omap_dss_device *dssdev)
static int tpo_td043_enable(struct omap_dss_device *dssdev)
{
- dev_dbg(&dssdev->dev, "enable\n");
+ dev_dbg(dssdev->dev, "enable\n");
return tpo_td043_enable_dss(dssdev);
}
static void tpo_td043_disable(struct omap_dss_device *dssdev)
{
- dev_dbg(&dssdev->dev, "disable\n");
+ dev_dbg(dssdev->dev, "disable\n");
tpo_td043_disable_dss(dssdev);
@@ -405,10 +405,10 @@ static int tpo_td043_probe(struct omap_dss_device *dssdev)
struct panel_tpo_td043_data *pdata = get_panel_data(dssdev);
int ret = 0;
- dev_dbg(&dssdev->dev, "probe\n");
+ dev_dbg(dssdev->dev, "probe\n");
if (tpo_td043 == NULL) {
- dev_err(&dssdev->dev, "missing tpo_td043_device\n");
+ dev_err(dssdev->dev, "missing tpo_td043_device\n");
return -ENODEV;
}
@@ -423,28 +423,28 @@ static int tpo_td043_probe(struct omap_dss_device *dssdev)
tpo_td043->mode = TPO_R02_MODE_800x480;
memcpy(tpo_td043->gamma, tpo_td043_def_gamma, sizeof(tpo_td043->gamma));
- tpo_td043->vcc_reg = regulator_get(&dssdev->dev, "vcc");
+ tpo_td043->vcc_reg = regulator_get(dssdev->dev, "vcc");
if (IS_ERR(tpo_td043->vcc_reg)) {
- dev_err(&dssdev->dev, "failed to get LCD VCC regulator\n");
+ dev_err(dssdev->dev, "failed to get LCD VCC regulator\n");
ret = PTR_ERR(tpo_td043->vcc_reg);
goto fail_regulator;
}
if (gpio_is_valid(tpo_td043->nreset_gpio)) {
- ret = devm_gpio_request_one(&dssdev->dev,
+ ret = devm_gpio_request_one(dssdev->dev,
tpo_td043->nreset_gpio, GPIOF_OUT_INIT_LOW,
"lcd reset");
if (ret < 0) {
- dev_err(&dssdev->dev, "couldn't request reset GPIO\n");
+ dev_err(dssdev->dev, "couldn't request reset GPIO\n");
goto fail_gpio_req;
}
}
- ret = sysfs_create_group(&dssdev->dev.kobj, &tpo_td043_attr_group);
+ ret = sysfs_create_group(&dssdev->dev->kobj, &tpo_td043_attr_group);
if (ret)
- dev_warn(&dssdev->dev, "failed to create sysfs files\n");
+ dev_warn(dssdev->dev, "failed to create sysfs files\n");
- dev_set_drvdata(&dssdev->dev, tpo_td043);
+ dev_set_drvdata(dssdev->dev, tpo_td043);
return 0;
@@ -457,11 +457,11 @@ fail_regulator:
static void tpo_td043_remove(struct omap_dss_device *dssdev)
{
- struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev);
+ struct tpo_td043_device *tpo_td043 = dev_get_drvdata(dssdev->dev);
- dev_dbg(&dssdev->dev, "remove\n");
+ dev_dbg(dssdev->dev, "remove\n");
- sysfs_remove_group(&dssdev->dev.kobj, &tpo_td043_attr_group);
+ sysfs_remove_group(&dssdev->dev->kobj, &tpo_td043_attr_group);
regulator_put(tpo_td043->vcc_reg);
}
OpenPOWER on IntegriCloud