mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge omapdss header refactoring
Merge omapdss public header refactoring, which separates the public header into omapdrm and omapfb parts.
This commit is contained in:
commit
a1dec226a6
98 changed files with 1081 additions and 751 deletions
|
|
@ -14,7 +14,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
|
|
@ -25,7 +25,6 @@ struct panel_drv_data {
|
|||
|
||||
struct omap_video_timings timings;
|
||||
|
||||
enum omap_dss_venc_type connector_type;
|
||||
bool invert_polarity;
|
||||
};
|
||||
|
||||
|
|
@ -45,10 +44,6 @@ static const struct omap_video_timings tvc_pal_timings = {
|
|||
|
||||
static const struct of_device_id tvc_of_match[];
|
||||
|
||||
struct tvc_of_data {
|
||||
enum omap_dss_venc_type connector_type;
|
||||
};
|
||||
|
||||
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
|
||||
|
||||
static int tvc_connect(struct omap_dss_device *dssdev)
|
||||
|
|
@ -99,7 +94,7 @@ static int tvc_enable(struct omap_dss_device *dssdev)
|
|||
in->ops.atv->set_timings(in, &ddata->timings);
|
||||
|
||||
if (!ddata->dev->of_node) {
|
||||
in->ops.atv->set_type(in, ddata->connector_type);
|
||||
in->ops.atv->set_type(in, OMAP_DSS_VENC_TYPE_COMPOSITE);
|
||||
|
||||
in->ops.atv->invert_vid_out_polarity(in,
|
||||
ddata->invert_polarity);
|
||||
|
|
@ -207,7 +202,6 @@ static int tvc_probe_pdata(struct platform_device *pdev)
|
|||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->connector_type = pdata->connector_type;
|
||||
ddata->invert_polarity = pdata->invert_polarity;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static const struct omap_video_timings dvic_default_timings = {
|
||||
.x_res = 640,
|
||||
|
|
@ -236,46 +235,6 @@ static struct omap_dss_driver dvic_driver = {
|
|||
.detect = dvic_detect,
|
||||
};
|
||||
|
||||
static int dvic_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct connector_dvi_platform_data *pdata;
|
||||
struct omap_dss_device *in, *dssdev;
|
||||
int i2c_bus_num;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
i2c_bus_num = pdata->i2c_bus_num;
|
||||
|
||||
if (i2c_bus_num != -1) {
|
||||
struct i2c_adapter *adapter;
|
||||
|
||||
adapter = i2c_get_adapter(i2c_bus_num);
|
||||
if (!adapter) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to get I2C adapter, bus %d\n",
|
||||
i2c_bus_num);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->i2c_adapter = adapter;
|
||||
}
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
i2c_put_adapter(ddata->i2c_adapter);
|
||||
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dvic_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
|
|
@ -313,23 +272,18 @@ static int dvic_probe(struct platform_device *pdev)
|
|||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = dvic_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = dvic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = dvic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->timings = dvic_default_timings;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static const struct omap_video_timings hdmic_default_timings = {
|
||||
.x_res = 640,
|
||||
|
|
@ -206,30 +205,6 @@ static struct omap_dss_driver hdmic_driver = {
|
|||
.set_hdmi_infoframe = hdmic_set_infoframe,
|
||||
};
|
||||
|
||||
static int hdmic_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct connector_hdmi_platform_data *pdata;
|
||||
struct omap_dss_device *in, *dssdev;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
ddata->hpd_gpio = -ENODEV;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hdmic_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
|
|
@ -261,6 +236,9 @@ static int hdmic_probe(struct platform_device *pdev)
|
|||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
|
@ -268,17 +246,9 @@ static int hdmic_probe(struct platform_device *pdev)
|
|||
platform_set_drvdata(pdev, ddata);
|
||||
ddata->dev = &pdev->dev;
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = hdmic_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = hdmic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = hdmic_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->hpd_gpio)) {
|
||||
r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
@ -166,32 +165,6 @@ static const struct omapdss_dvi_ops tfp410_dvi_ops = {
|
|||
.get_timings = tfp410_get_timings,
|
||||
};
|
||||
|
||||
static int tfp410_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct encoder_tfp410_platform_data *pdata;
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
ddata->pd_gpio = pdata->power_down_gpio;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "Failed to find video source\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tfp410_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
|
|
@ -225,23 +198,18 @@ static int tfp410_probe(struct platform_device *pdev)
|
|||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = tfp410_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = tfp410_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = tfp410_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->pd_gpio)) {
|
||||
r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio,
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/of_display_timing.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,7 @@
|
|||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
/* DSI Virtual channel. Hardcoded for now. */
|
||||
|
|
@ -1127,40 +1126,6 @@ static struct omap_dss_driver dsicm_ops = {
|
|||
.memory_read = dsicm_memory_read,
|
||||
};
|
||||
|
||||
static int dsicm_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
const struct panel_dsicm_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "failed to find video source\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->reset_gpio = pdata->reset_gpio;
|
||||
|
||||
if (pdata->use_ext_te)
|
||||
ddata->ext_te_gpio = pdata->ext_te_gpio;
|
||||
else
|
||||
ddata->ext_te_gpio = -1;
|
||||
|
||||
ddata->ulps_timeout = pdata->ulps_timeout;
|
||||
|
||||
ddata->use_dsi_backlight = pdata->use_dsi_backlight;
|
||||
|
||||
ddata->pin_config = pdata->pin_config;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dsicm_probe_of(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *node = pdev->dev.of_node;
|
||||
|
|
@ -1207,6 +1172,9 @@ static int dsicm_probe(struct platform_device *pdev)
|
|||
|
||||
dev_dbg(dev, "probe\n");
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
|
@ -1214,17 +1182,9 @@ static int dsicm_probe(struct platform_device *pdev)
|
|||
platform_set_drvdata(pdev, ddata);
|
||||
ddata->pdev = pdev;
|
||||
|
||||
if (dev_get_platdata(dev)) {
|
||||
r = dsicm_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = dsicm_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = dsicm_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->timings.x_res = 864;
|
||||
ddata->timings.y_res = 480;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
static struct omap_video_timings lb035q02_timings = {
|
||||
.x_res = 320,
|
||||
|
|
@ -240,44 +239,6 @@ static struct omap_dss_driver lb035q02_ops = {
|
|||
.get_resolution = omapdss_default_get_resolution,
|
||||
};
|
||||
|
||||
static int lb035q02_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_lb035q02_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
int r;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
r = devm_gpio_request_one(&spi->dev, pdata->enable_gpio,
|
||||
GPIOF_OUT_INIT_LOW, "panel enable");
|
||||
if (r)
|
||||
goto err_gpio;
|
||||
|
||||
ddata->enable_gpio = gpio_to_desc(pdata->enable_gpio);
|
||||
|
||||
ddata->backlight_gpio = pdata->backlight_gpio;
|
||||
|
||||
return 0;
|
||||
err_gpio:
|
||||
omap_dss_put_device(ddata->in);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int lb035q02_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
|
|
@ -312,6 +273,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
|
|||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (ddata == NULL)
|
||||
return -ENOMEM;
|
||||
|
|
@ -320,17 +284,9 @@ static int lb035q02_panel_spi_probe(struct spi_device *spi)
|
|||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = lb035q02_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = lb035q02_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = lb035q02_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->backlight_gpio)) {
|
||||
r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio,
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
@ -233,33 +232,6 @@ static struct omap_dss_driver nec_8048_ops = {
|
|||
};
|
||||
|
||||
|
||||
static int nec_8048_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_nec_nl8048hl11_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
ddata->qvga_gpio = pdata->qvga_gpio;
|
||||
ddata->res_gpio = pdata->res_gpio;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nec_8048_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
|
|
@ -296,6 +268,9 @@ static int nec_8048_probe(struct spi_device *spi)
|
|||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->mode = SPI_MODE_0;
|
||||
spi->bits_per_word = 32;
|
||||
|
||||
|
|
@ -315,17 +290,9 @@ static int nec_8048_probe(struct spi_device *spi)
|
|||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = nec_8048_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = nec_8048_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = nec_8048_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (gpio_is_valid(ddata->qvga_gpio)) {
|
||||
r = devm_gpio_request_one(&spi->dev, ddata->qvga_gpio,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
@ -197,69 +196,6 @@ static struct omap_dss_driver sharp_ls_ops = {
|
|||
.get_resolution = omapdss_default_get_resolution,
|
||||
};
|
||||
|
||||
static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
|
||||
char *desc, struct gpio_desc **gpiod)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = devm_gpio_request_one(dev, gpio, flags, desc);
|
||||
if (r) {
|
||||
*gpiod = NULL;
|
||||
return r == -ENOENT ? 0 : r;
|
||||
}
|
||||
|
||||
*gpiod = gpio_to_desc(gpio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sharp_ls_probe_pdata(struct platform_device *pdev)
|
||||
{
|
||||
const struct panel_sharp_ls037v7dw01_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
int r;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&pdev->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->mo_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd MO", &ddata->mo_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->lr_gpio, GPIOF_OUT_INIT_HIGH,
|
||||
"lcd LR", &ddata->lr_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->ud_gpio, GPIOF_OUT_INIT_HIGH,
|
||||
"lcd UD", &ddata->ud_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->resb_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd RESB", &ddata->resb_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
r = sharp_ls_get_gpio(&pdev->dev, pdata->ini_gpio, GPIOF_OUT_INIT_LOW,
|
||||
"lcd INI", &ddata->ini_gpio);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sharp_ls_get_gpio_of(struct device *dev, int index, int val,
|
||||
const char *desc, struct gpio_desc **gpiod)
|
||||
{
|
||||
|
|
@ -330,23 +266,18 @@ static int sharp_ls_probe(struct platform_device *pdev)
|
|||
struct omap_dss_device *dssdev;
|
||||
int r;
|
||||
|
||||
if (!pdev->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (ddata == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, ddata);
|
||||
|
||||
if (dev_get_platdata(&pdev->dev)) {
|
||||
r = sharp_ls_probe_pdata(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (pdev->dev.of_node) {
|
||||
r = sharp_ls_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = sharp_ls_probe_of(pdev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->videomode = sharp_ls_timings;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
|
||||
#define MIPID_CMD_READ_DISP_ID 0x04
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
struct panel_drv_data {
|
||||
struct omap_dss_device dssdev;
|
||||
|
|
@ -365,31 +364,6 @@ static struct omap_dss_driver td028ttec1_ops = {
|
|||
.check_timings = td028ttec1_panel_check_timings,
|
||||
};
|
||||
|
||||
static int td028ttec1_panel_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_tpo_td028ttec1_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int td028ttec1_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
|
|
@ -415,6 +389,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
|
|||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->bits_per_word = 9;
|
||||
spi->mode = SPI_MODE_3;
|
||||
|
||||
|
|
@ -432,17 +409,9 @@ static int td028ttec1_panel_probe(struct spi_device *spi)
|
|||
|
||||
ddata->spi_dev = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = td028ttec1_panel_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = td028ttec1_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = td028ttec1_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->videomode = td028ttec1_panel_timings;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-data.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#define TPO_R02_MODE(x) ((x) & 7)
|
||||
#define TPO_R02_MODE_800x480 7
|
||||
|
|
@ -465,32 +464,6 @@ static struct omap_dss_driver tpo_td043_ops = {
|
|||
};
|
||||
|
||||
|
||||
static int tpo_td043_probe_pdata(struct spi_device *spi)
|
||||
{
|
||||
const struct panel_tpo_td043mtea1_platform_data *pdata;
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
|
||||
struct omap_dss_device *dssdev, *in;
|
||||
|
||||
pdata = dev_get_platdata(&spi->dev);
|
||||
|
||||
ddata->nreset_gpio = pdata->nreset_gpio;
|
||||
|
||||
in = omap_dss_find_output(pdata->source);
|
||||
if (in == NULL) {
|
||||
dev_err(&spi->dev, "failed to find video source '%s'\n",
|
||||
pdata->source);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
ddata->in = in;
|
||||
|
||||
ddata->data_lines = pdata->data_lines;
|
||||
|
||||
dssdev = &ddata->dssdev;
|
||||
dssdev->name = pdata->name;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tpo_td043_probe_of(struct spi_device *spi)
|
||||
{
|
||||
struct device_node *node = spi->dev.of_node;
|
||||
|
|
@ -524,6 +497,9 @@ static int tpo_td043_probe(struct spi_device *spi)
|
|||
|
||||
dev_dbg(&spi->dev, "%s\n", __func__);
|
||||
|
||||
if (!spi->dev.of_node)
|
||||
return -ENODEV;
|
||||
|
||||
spi->bits_per_word = 16;
|
||||
spi->mode = SPI_MODE_0;
|
||||
|
||||
|
|
@ -541,17 +517,9 @@ static int tpo_td043_probe(struct spi_device *spi)
|
|||
|
||||
ddata->spi = spi;
|
||||
|
||||
if (dev_get_platdata(&spi->dev)) {
|
||||
r = tpo_td043_probe_pdata(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else if (spi->dev.of_node) {
|
||||
r = tpo_td043_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
r = tpo_td043_probe_of(spi);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
ddata->mode = TPO_R02_MODE_800x480;
|
||||
memcpy(ddata->gamma, tpo_td043_def_gamma, sizeof(ddata->gamma));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <linux/suspend.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
@ -208,8 +208,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
|||
core.default_display_name = def_disp_name;
|
||||
else if (pdata->default_display_name)
|
||||
core.default_display_name = pdata->default_display_name;
|
||||
else if (pdata->default_device)
|
||||
core.default_display_name = pdata->default_device->name;
|
||||
|
||||
register_pm_notifier(&omap_dss_pm_notif_block);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dispc.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
static ssize_t display_name_show(struct omap_dss_device *dssdev, char *buf)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/mipi_display.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include <linux/suspend.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/hdmi.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "hdmi4_core.h"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/component.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <sound/omap-hdmi-audio.h>
|
||||
|
||||
#include "hdmi5_core.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "hdmi.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "hdmi.h"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <linux/kobject.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <linux/pm_runtime.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
struct rfbi_reg { u16 idx; };
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include "dss.h"
|
||||
|
||||
static struct {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/component.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#include "dss.h"
|
||||
#include "dss_features.h"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <linux/export.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/omapfb.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include <linux/mm.h>
|
||||
#include <linux/omapfb.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
#include <video/omapvrfb.h>
|
||||
|
||||
#include "omapfb.h"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include <linux/dma-attrs.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omapfb_dss.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
extern bool omapfb_debug;
|
||||
|
|
|
|||
Loading…
Reference in a new issue