config FB_UVESA
tristate "Userspace VESA VGA graphics support"
depends on FB && CONNECTOR
+ depends on !UML
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
select FB_DEFERRED_IO
- select PWM
select FB_BACKLIGHT
help
This driver implements support for the Solomon SSD1307
#define CONTROL_PIXCLOCK_MIN 5000 /* ~ 200 MHz dot clock */
/*
- * calculate the clock paramaters to be sent to CUDA according to given
+ * calculate the clock parameters to be sent to CUDA according to given
* pixclock in pico second.
*/
static int calc_clock_params(unsigned long clk, unsigned char *param)
if (userfont) {
p->userfont = old_userfont;
- REFCOUNT(data)--;
+ if (--REFCOUNT(data) == 0)
+ kfree(data - FONT_EXTRA_WORDS * sizeof(int));
}
vc->vc_font.width = old_width;
dev_err(&device->dev,
"GLCD: kmalloc for frame buffer failed\n");
ret = -EINVAL;
- goto err_release_fb;
+ goto err_disable_reg;
}
da8xx_fb_info->screen_base = (char __iomem *) par->vram_virt;
ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
if (ret)
- goto err_release_fb;
+ goto err_disable_reg;
da8xx_fb_info->cmap.len = par->palette_sz;
/* initialize var_screeninfo */
err_dealloc_cmap:
fb_dealloc_cmap(&da8xx_fb_info->cmap);
+err_disable_reg:
+ if (par->lcd_supply)
+ regulator_disable(par->lcd_supply);
err_release_fb:
framebuffer_release(da8xx_fb_info);
err = register_framebuffer(info);
if (err)
- goto failed_check;
+ goto failed_framebuffer;
dev_info(info->dev, "registered. Mode = %dx%d-%d\n",
info->var.xres, info->var.yres, info->var.bits_per_pixel);
return 0;
+failed_framebuffer:
+ clk_disable_unprepare(fbi->clk);
failed_check:
if (fbi->mach_info->teardown)
fbi->mach_info->teardown(pdev);
config FB_GEODE
bool "AMD Geode family framebuffer support"
depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST))
+ depends on !UML
help
Say 'Y' here to allow you to select framebuffer drivers for
the AMD Geode family of processors.
return 0;
}
-static int maven_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int maven_probe(struct i2c_client *client)
{
struct i2c_adapter *adapter = client->adapter;
int err = -ENODEV;
.driver = {
.name = "maven",
},
- .probe = maven_probe,
+ .probe_new = maven_probe,
.remove = maven_remove,
.id_table = maven_id,
};
#include <linux/of.h>
#include <video/omapfb_dss.h>
-#include <video/omap-panel-data.h>
struct panel_drv_data {
struct omap_dss_device dssdev;
.set_wss = tvc_set_wss,
};
-static int tvc_probe_pdata(struct platform_device *pdev)
-{
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct connector_atv_platform_data *pdata;
- struct omap_dss_device *in, *dssdev;
-
- 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->invert_polarity = pdata->invert_polarity;
-
- dssdev = &ddata->dssdev;
- dssdev->name = pdata->name;
-
- return 0;
-}
-
-static int tvc_probe_of(struct platform_device *pdev)
-{
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct device_node *node = pdev->dev.of_node;
- struct omap_dss_device *in;
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&pdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- return 0;
-}
-
static int tvc_probe(struct platform_device *pdev)
{
struct panel_drv_data *ddata;
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);
ddata->dev = &pdev->dev;
- if (dev_get_platdata(&pdev->dev)) {
- r = tvc_probe_pdata(pdev);
- if (r)
- return r;
- } else if (pdev->dev.of_node) {
- r = tvc_probe_of(pdev);
- if (r)
- return r;
- } else {
- return -ENODEV;
+ ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&pdev->dev, "failed to find video source\n");
+ return r;
}
ddata->timings = tvc_pal_timings;
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
+#include <linux/err.h>
+#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <drm/drm_edid.h>
struct omap_video_timings timings;
- int hpd_gpio;
+ struct gpio_desc *hpd_gpio;
};
#define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- if (gpio_is_valid(ddata->hpd_gpio))
- return gpio_get_value_cansleep(ddata->hpd_gpio);
+ if (ddata->hpd_gpio)
+ return gpiod_get_value_cansleep(ddata->hpd_gpio);
else
return in->ops.hdmi->detect(in);
}
.set_hdmi_infoframe = hdmic_set_infoframe,
};
-static int hdmic_probe_of(struct platform_device *pdev)
-{
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct device_node *node = pdev->dev.of_node;
- struct omap_dss_device *in;
- int gpio;
-
- /* HPD GPIO */
- gpio = of_get_named_gpio(node, "hpd-gpios", 0);
- if (gpio_is_valid(gpio))
- ddata->hpd_gpio = gpio;
- else
- ddata->hpd_gpio = -ENODEV;
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&pdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- return 0;
-}
-
static int hdmic_probe(struct platform_device *pdev)
{
struct panel_drv_data *ddata;
platform_set_drvdata(pdev, ddata);
ddata->dev = &pdev->dev;
- r = hdmic_probe_of(pdev);
+ ddata->hpd_gpio = devm_gpiod_get_optional(&pdev->dev, "hpd", GPIOD_IN);
+ r = PTR_ERR_OR_ZERO(ddata->hpd_gpio);
if (r)
return r;
- if (gpio_is_valid(ddata->hpd_gpio)) {
- r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
- GPIOF_DIR_IN, "hdmi_hpd");
- if (r)
- goto err_reg;
+ gpiod_set_consumer_name(ddata->hpd_gpio, "hdmi_hpd");
+
+ ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&pdev->dev, "failed to find video source\n");
+ return r;
}
ddata->timings = hdmic_default_timings;
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
-#include <linux/gpio.h>
+#include <linux/err.h>
+#include <linux/gpio/consumer.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
struct omap_dss_device dssdev;
struct omap_dss_device *in;
- int pd_gpio;
+ struct gpio_desc *pd_gpio;
+
int data_lines;
struct omap_video_timings timings;
if (r)
return r;
- if (gpio_is_valid(ddata->pd_gpio))
- gpio_set_value_cansleep(ddata->pd_gpio, 1);
+ if (ddata->pd_gpio)
+ gpiod_set_value_cansleep(ddata->pd_gpio, 0);
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
if (!omapdss_device_is_enabled(dssdev))
return;
- if (gpio_is_valid(ddata->pd_gpio))
- gpio_set_value_cansleep(ddata->pd_gpio, 0);
+ if (ddata->pd_gpio)
+ gpiod_set_value_cansleep(ddata->pd_gpio, 1);
in->ops.dpi->disable(in);
.get_timings = tfp410_get_timings,
};
-static int tfp410_probe_of(struct platform_device *pdev)
-{
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct device_node *node = pdev->dev.of_node;
- struct omap_dss_device *in;
- int gpio;
-
- gpio = of_get_named_gpio(node, "powerdown-gpios", 0);
-
- if (gpio_is_valid(gpio) || gpio == -ENOENT) {
- ddata->pd_gpio = gpio;
- } else {
- dev_err(&pdev->dev, "failed to parse PD gpio\n");
- return gpio;
- }
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&pdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- return 0;
-}
-
static int tfp410_probe(struct platform_device *pdev)
{
struct panel_drv_data *ddata;
platform_set_drvdata(pdev, ddata);
- r = tfp410_probe_of(pdev);
- if (r)
+ ddata->pd_gpio = devm_gpiod_get_optional(&pdev->dev, "powerdown",
+ GPIOD_OUT_HIGH);
+ r = PTR_ERR_OR_ZERO(ddata->pd_gpio);
+ if (r) {
+ dev_err(&pdev->dev, "Failed to request PD GPIO: %d\n", r);
return r;
+ }
+
+ gpiod_set_consumer_name(ddata->pd_gpio, "tfp410 PD");
- if (gpio_is_valid(ddata->pd_gpio)) {
- r = devm_gpio_request_one(&pdev->dev, ddata->pd_gpio,
- GPIOF_OUT_INIT_LOW, "tfp410 PD");
- if (r) {
- dev_err(&pdev->dev, "Failed to request PD GPIO %d\n",
- ddata->pd_gpio);
- goto err_gpio;
- }
+ ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&pdev->dev, "failed to find video source: %d\n", r);
+ return r;
}
dssdev = &ddata->dssdev;
return 0;
err_reg:
-err_gpio:
omap_dss_put_device(ddata->in);
return r;
}
* Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
-#include <video/omap-panel-data.h>
#include <video/of_display_timing.h>
struct panel_drv_data {
struct omap_video_timings videomode;
- /* used for non-DT boot, to be removed */
- int backlight_gpio;
-
struct gpio_desc *enable_gpio;
};
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
- if (gpio_is_valid(ddata->backlight_gpio))
- gpio_set_value_cansleep(ddata->backlight_gpio, 1);
-
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return 0;
if (!omapdss_device_is_enabled(dssdev))
return;
- if (gpio_is_valid(ddata->backlight_gpio))
- gpio_set_value_cansleep(ddata->backlight_gpio, 0);
-
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
in->ops.dpi->disable(in);
.get_resolution = omapdss_default_get_resolution,
};
-static int panel_dpi_probe_pdata(struct platform_device *pdev)
-{
- const struct panel_dpi_platform_data *pdata;
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *dssdev, *in;
- struct videomode vm;
- 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;
-
- videomode_from_timing(pdata->display_timing, &vm);
- videomode_to_omap_video_timings(&vm, &ddata->videomode);
-
- dssdev = &ddata->dssdev;
- dssdev->name = pdata->name;
-
- r = devm_gpio_request_one(&pdev->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 panel_dpi_probe_of(struct platform_device *pdev)
{
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
ddata->enable_gpio = gpio;
- ddata->backlight_gpio = -ENOENT;
-
r = of_get_display_timing(node, "panel-timing", &timing);
if (r) {
dev_err(&pdev->dev, "failed to get video timing\n");
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 = panel_dpi_probe_pdata(pdev);
- if (r)
- return r;
- } else if (pdev->dev.of_node) {
- r = panel_dpi_probe_of(pdev);
- if (r)
- return r;
- } else {
- return -ENODEV;
- }
-
- if (gpio_is_valid(ddata->backlight_gpio)) {
- r = devm_gpio_request_one(&pdev->dev, ddata->backlight_gpio,
- GPIOF_OUT_INIT_LOW, "panel backlight");
- if (r)
- goto err_gpio;
- }
+ r = panel_dpi_probe_of(pdev);
+ if (r)
+ return r;
dssdev = &ddata->dssdev;
dssdev->dev = &pdev->dev;
return 0;
err_reg:
-err_gpio:
omap_dss_put_device(ddata->in);
return r;
}
#include <linux/backlight.h>
#include <linux/delay.h>
+#include <linux/err.h>
#include <linux/fb.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/of_device.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
#include <video/mipi_display.h>
unsigned long hw_guard_wait; /* max guard time in jiffies */
/* panel HW configuration from DT or platform data */
- int reset_gpio;
- int ext_te_gpio;
+ struct gpio_desc *reset_gpio;
+ struct gpio_desc *ext_te_gpio;
bool use_dsi_backlight;
if (r)
goto err;
- if (gpio_is_valid(ddata->ext_te_gpio))
- disable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ disable_irq(gpiod_to_irq(ddata->ext_te_gpio));
in->ops.dsi->disable(in, false, true);
goto err2;
}
- if (gpio_is_valid(ddata->ext_te_gpio))
- enable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ enable_irq(gpiod_to_irq(ddata->ext_te_gpio));
dsicm_queue_ulps_work(ddata);
r = dsicm_panel_reset(ddata);
if (!r) {
- if (gpio_is_valid(ddata->ext_te_gpio))
- enable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ enable_irq(gpiod_to_irq(ddata->ext_te_gpio));
ddata->ulps_enabled = false;
}
err1:
static void dsicm_hw_reset(struct panel_drv_data *ddata)
{
- if (!gpio_is_valid(ddata->reset_gpio))
- return;
-
- gpio_set_value(ddata->reset_gpio, 1);
+ /*
+ * Note that we appear to activate the reset line here. However
+ * existing DTSes specified incorrect polarity for it (active high),
+ * so in fact this deasserts the reset line.
+ */
+ gpiod_set_value_cansleep(ddata->reset_gpio, 1);
udelay(10);
/* reset the panel */
- gpio_set_value(ddata->reset_gpio, 0);
- /* assert reset */
+ gpiod_set_value_cansleep(ddata->reset_gpio, 0);
+ /* keep reset asserted */
udelay(10);
- gpio_set_value(ddata->reset_gpio, 1);
+ /* release reset line */
+ gpiod_set_value_cansleep(ddata->reset_gpio, 1);
/* wait after releasing reset */
usleep_range(5000, 10000);
}
if (r)
goto err;
- if (ddata->te_enabled && gpio_is_valid(ddata->ext_te_gpio)) {
+ if (ddata->te_enabled && ddata->ext_te_gpio) {
schedule_delayed_work(&ddata->te_timeout_work,
msecs_to_jiffies(250));
atomic_set(&ddata->do_update, 1);
else
r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF);
- if (!gpio_is_valid(ddata->ext_te_gpio))
+ if (!ddata->ext_te_gpio)
in->ops.dsi->enable_te(in, enable);
/* possible panel bug */
.memory_read = dsicm_memory_read,
};
-static int dsicm_probe_of(struct platform_device *pdev)
-{
- struct device_node *node = pdev->dev.of_node;
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct omap_dss_device *in;
- int gpio;
-
- gpio = of_get_named_gpio(node, "reset-gpios", 0);
- if (!gpio_is_valid(gpio)) {
- dev_err(&pdev->dev, "failed to parse reset gpio\n");
- return gpio;
- }
- ddata->reset_gpio = gpio;
-
- gpio = of_get_named_gpio(node, "te-gpios", 0);
- if (gpio_is_valid(gpio) || gpio == -ENOENT) {
- ddata->ext_te_gpio = gpio;
- } else {
- dev_err(&pdev->dev, "failed to parse TE gpio\n");
- return gpio;
- }
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&pdev->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- /* TODO: ulps, backlight */
-
- return 0;
-}
-
static int dsicm_probe(struct platform_device *pdev)
{
struct backlight_properties props;
platform_set_drvdata(pdev, ddata);
ddata->pdev = pdev;
- r = dsicm_probe_of(pdev);
- if (r)
+ ddata->in = omapdss_of_find_source_for_first_ep(pdev->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&pdev->dev, "failed to find video source: %d\n", r);
return r;
+ }
ddata->timings.x_res = 864;
ddata->timings.y_res = 480;
atomic_set(&ddata->do_update, 0);
- if (gpio_is_valid(ddata->reset_gpio)) {
- r = devm_gpio_request_one(dev, ddata->reset_gpio,
- GPIOF_OUT_INIT_LOW, "taal rst");
- if (r) {
- dev_err(dev, "failed to request reset gpio\n");
- return r;
- }
+ ddata->reset_gpio = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW);
+ r = PTR_ERR_OR_ZERO(ddata->reset_gpio);
+ if (r) {
+ dev_err(&pdev->dev, "Failed to request reset gpio: %d\n", r);
+ return r;
}
- if (gpio_is_valid(ddata->ext_te_gpio)) {
- r = devm_gpio_request_one(dev, ddata->ext_te_gpio,
- GPIOF_IN, "taal irq");
- if (r) {
- dev_err(dev, "GPIO request failed\n");
- return r;
- }
+ gpiod_set_consumer_name(ddata->reset_gpio, "taal rst");
+
+ ddata->ext_te_gpio = devm_gpiod_get_optional(&pdev->dev, "te",
+ GPIOD_IN);
+ r = PTR_ERR_OR_ZERO(ddata->ext_te_gpio);
+ if (r) {
+ dev_err(&pdev->dev, "Failed to request TE gpio: %d\n", r);
+ return r;
+ }
+
+ if (ddata->ext_te_gpio) {
+ gpiod_set_consumer_name(ddata->ext_te_gpio, "taal irq");
- r = devm_request_irq(dev, gpio_to_irq(ddata->ext_te_gpio),
+ r = devm_request_irq(dev, gpiod_to_irq(ddata->ext_te_gpio),
dsicm_te_isr,
IRQF_TRIGGER_RISING,
"taal vsync", ddata);
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/mutex.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <video/omapfb_dss.h>
struct omap_video_timings videomode;
- /* used for non-DT boot, to be removed */
- int backlight_gpio;
-
struct gpio_desc *enable_gpio;
};
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
- if (gpio_is_valid(ddata->backlight_gpio))
- gpio_set_value_cansleep(ddata->backlight_gpio, 1);
-
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return 0;
if (ddata->enable_gpio)
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
- if (gpio_is_valid(ddata->backlight_gpio))
- gpio_set_value_cansleep(ddata->backlight_gpio, 0);
-
in->ops.dpi->disable(in);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
ddata->enable_gpio = gpio;
- ddata->backlight_gpio = -ENOENT;
-
in = omapdss_of_find_source_for_first_ep(node);
if (IS_ERR(in)) {
dev_err(&spi->dev, "failed to find video source\n");
if (r)
return r;
- if (gpio_is_valid(ddata->backlight_gpio)) {
- r = devm_gpio_request_one(&spi->dev, ddata->backlight_gpio,
- GPIOF_OUT_INIT_LOW, "panel backlight");
- if (r)
- goto err_gpio;
- }
-
ddata->videomode = lb035q02_timings;
dssdev = &ddata->dssdev;
return 0;
err_reg:
-err_gpio:
omap_dss_put_device(ddata->in);
return r;
}
* Converted to new DSS device model: Tomi Valkeinen <tomi.valkeinen@ti.com>
*/
-#include <linux/module.h>
#include <linux/delay.h>
-#include <linux/spi/spi.h>
+#include <linux/err.h>
#include <linux/fb.h>
-#include <linux/gpio.h>
-#include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
+#include <linux/module.h>
+#include <linux/spi/spi.h>
#include <video/omapfb_dss.h>
int data_lines;
- int res_gpio;
- int qvga_gpio;
+ struct gpio_desc *res_gpio;
struct spi_device *spi;
};
if (r)
return r;
- if (gpio_is_valid(ddata->res_gpio))
- gpio_set_value_cansleep(ddata->res_gpio, 1);
+ /* Apparently existing DTSes use incorrect polarity (active high) */
+ gpiod_set_value_cansleep(ddata->res_gpio, 1);
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
if (!omapdss_device_is_enabled(dssdev))
return;
- if (gpio_is_valid(ddata->res_gpio))
- gpio_set_value_cansleep(ddata->res_gpio, 0);
+ /* Apparently existing DTSes use incorrect polarity (active high) */
+ gpiod_set_value_cansleep(ddata->res_gpio, 0);
in->ops.dpi->disable(in);
.get_resolution = omapdss_default_get_resolution,
};
-
-static int nec_8048_probe_of(struct spi_device *spi)
-{
- struct device_node *node = spi->dev.of_node;
- struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
- struct omap_dss_device *in;
- int gpio;
-
- gpio = of_get_named_gpio(node, "reset-gpios", 0);
- if (!gpio_is_valid(gpio)) {
- dev_err(&spi->dev, "failed to parse enable gpio\n");
- return gpio;
- }
- ddata->res_gpio = gpio;
-
- /* XXX the panel spec doesn't mention any QVGA pin?? */
- ddata->qvga_gpio = -ENOENT;
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&spi->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- return 0;
-}
-
static int nec_8048_probe(struct spi_device *spi)
{
struct panel_drv_data *ddata;
ddata->spi = spi;
- r = nec_8048_probe_of(spi);
- if (r)
+ ddata->in = omapdss_of_find_source_for_first_ep(spi->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&spi->dev, "failed to find video source: %d\n", r);
return r;
-
- if (gpio_is_valid(ddata->qvga_gpio)) {
- r = devm_gpio_request_one(&spi->dev, ddata->qvga_gpio,
- GPIOF_OUT_INIT_HIGH, "lcd QVGA");
- if (r)
- goto err_gpio;
}
- if (gpio_is_valid(ddata->res_gpio)) {
- r = devm_gpio_request_one(&spi->dev, ddata->res_gpio,
- GPIOF_OUT_INIT_LOW, "lcd RES");
- if (r)
- goto err_gpio;
+ ddata->res_gpio = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW);
+ r = PTR_ERR_OR_ZERO(ddata->res_gpio);
+ if (r) {
+ dev_err(&spi->dev, "failed to request reset gpio: %d\n", r);
+ goto err_gpio;
}
+ gpiod_set_consumer_name(ddata->res_gpio, "lcd RES");
+
ddata->videomode = nec_8048_panel_timings;
dssdev = &ddata->dssdev;
*/
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/regulator/consumer.h>
#include <linux/sched.h>
#include <linux/backlight.h>
#include <linux/fb.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
-#include <video/omap-panel-data.h>
#define MIPID_CMD_READ_DISP_ID 0x04
#define MIPID_CMD_READ_RED 0x06
struct omap_dss_device dssdev;
struct omap_dss_device *in;
- int reset_gpio;
+ struct gpio_desc *reset_gpio;
+
int datapairs;
struct omap_video_timings videomode;
/*FIXME tweak me */
msleep(50);
- if (gpio_is_valid(ddata->reset_gpio))
- gpio_set_value(ddata->reset_gpio, 1);
+ /*
+ * Note that we appear to activate the reset line here. However
+ * existing DTSes specified incorrect polarity for it (active high),
+ * so in fact this deasserts the reset line.
+ */
+ if (ddata->reset_gpio)
+ gpiod_set_value_cansleep(ddata->reset_gpio, 1);
if (ddata->enabled) {
dev_dbg(&ddata->spi->dev, "panel already enabled\n");
*/
msleep(50);
- if (gpio_is_valid(ddata->reset_gpio))
- gpio_set_value(ddata->reset_gpio, 0);
+ /* see comment in acx565akm_panel_power_on() */
+ if (ddata->reset_gpio)
+ gpiod_set_value_cansleep(ddata->reset_gpio, 0);
/* FIXME need to tweak this delay */
msleep(100);
.get_resolution = omapdss_default_get_resolution,
};
-static int acx565akm_probe_pdata(struct spi_device *spi)
-{
- const struct panel_acx565akm_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->reset_gpio = pdata->reset_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->datapairs = pdata->datapairs;
-
- dssdev = &ddata->dssdev;
- dssdev->name = pdata->name;
-
- return 0;
-}
-
-static int acx565akm_probe_of(struct spi_device *spi)
-{
- struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
- struct device_node *np = spi->dev.of_node;
-
- ddata->reset_gpio = of_get_named_gpio(np, "reset-gpios", 0);
-
- ddata->in = omapdss_of_find_source_for_first_ep(np);
- if (IS_ERR(ddata->in)) {
- dev_err(&spi->dev, "failed to find video source\n");
- return PTR_ERR(ddata->in);
- }
-
- return 0;
-}
-
static int acx565akm_probe(struct spi_device *spi)
{
struct panel_drv_data *ddata;
dev_dbg(&spi->dev, "%s\n", __func__);
+ if (!spi->dev.of_node)
+ return -ENODEV;
+
spi->mode = SPI_MODE_3;
ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL);
mutex_init(&ddata->mutex);
- if (dev_get_platdata(&spi->dev)) {
- r = acx565akm_probe_pdata(spi);
- if (r)
- return r;
- } else if (spi->dev.of_node) {
- r = acx565akm_probe_of(spi);
- if (r)
- return r;
- } else {
- dev_err(&spi->dev, "platform data missing!\n");
- return -ENODEV;
+ ddata->in = omapdss_of_find_source_for_first_ep(spi->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&spi->dev, "failed to find video source\n");
+ return r;
}
- if (gpio_is_valid(ddata->reset_gpio)) {
- r = devm_gpio_request_one(&spi->dev, ddata->reset_gpio,
- GPIOF_OUT_INIT_LOW, "lcd reset");
- if (r)
- goto err_gpio;
- }
+ ddata->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset",
+ GPIOD_OUT_LOW);
+ r = PTR_ERR_OR_ZERO(ddata->reset_gpio);
+ if (r)
+ goto err_gpio;
- if (gpio_is_valid(ddata->reset_gpio))
- gpio_set_value(ddata->reset_gpio, 1);
+ if (ddata->reset_gpio) {
+ gpiod_set_consumer_name(ddata->reset_gpio, "lcd reset");
+
+ /* release the reset line */
+ gpiod_set_value_cansleep(ddata->reset_gpio, 1);
+ }
/*
* After reset we have to wait 5 msec before the first
r = panel_detect(ddata);
- if (!ddata->enabled && gpio_is_valid(ddata->reset_gpio))
- gpio_set_value(ddata->reset_gpio, 0);
+ if (!ddata->enabled && ddata->reset_gpio)
+ gpiod_set_value_cansleep(ddata->reset_gpio, 0);
if (r) {
dev_err(&spi->dev, "%s panel detect error\n", __func__);
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
-#include <linux/gpio.h>
#include <video/omapfb_dss.h>
struct panel_drv_data {
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/regulator/consumer.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/err.h>
#include <linux/slab.h>
-#include <linux/of_gpio.h>
#include <video/omapfb_dss.h>
struct spi_device *spi;
struct regulator *vcc_reg;
- int nreset_gpio;
+ struct gpio_desc *reset_gpio;
u16 gamma[12];
u32 mode;
u32 hmirror:1;
/* wait for panel to stabilize */
msleep(160);
- if (gpio_is_valid(ddata->nreset_gpio))
- gpio_set_value(ddata->nreset_gpio, 1);
+ gpiod_set_value_cansleep(ddata->reset_gpio, 0);
tpo_td043_write(ddata->spi, 2,
TPO_R02_MODE(ddata->mode) | TPO_R02_NCLK_RISING);
tpo_td043_write(ddata->spi, 3,
TPO_R03_VAL_STANDBY | TPO_R03_EN_PWM);
- if (gpio_is_valid(ddata->nreset_gpio))
- gpio_set_value(ddata->nreset_gpio, 0);
+ gpiod_set_value_cansleep(ddata->reset_gpio, 1);
/* wait for at least 2 vsyncs before cutting off power */
msleep(50);
.get_resolution = omapdss_default_get_resolution,
};
-
-static int tpo_td043_probe_of(struct spi_device *spi)
-{
- struct device_node *node = spi->dev.of_node;
- struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
- struct omap_dss_device *in;
- int gpio;
-
- gpio = of_get_named_gpio(node, "reset-gpios", 0);
- if (!gpio_is_valid(gpio)) {
- dev_err(&spi->dev, "failed to parse enable gpio\n");
- return gpio;
- }
- ddata->nreset_gpio = gpio;
-
- in = omapdss_of_find_source_for_first_ep(node);
- if (IS_ERR(in)) {
- dev_err(&spi->dev, "failed to find video source\n");
- return PTR_ERR(in);
- }
-
- ddata->in = in;
-
- return 0;
-}
-
static int tpo_td043_probe(struct spi_device *spi)
{
struct panel_drv_data *ddata;
ddata->spi = spi;
- r = tpo_td043_probe_of(spi);
- if (r)
+ ddata->in = omapdss_of_find_source_for_first_ep(spi->dev.of_node);
+ r = PTR_ERR_OR_ZERO(ddata->in);
+ if (r) {
+ dev_err(&spi->dev, "failed to find video source: %d\n", r);
return r;
+ }
ddata->mode = TPO_R02_MODE_800x480;
memcpy(ddata->gamma, tpo_td043_def_gamma, sizeof(ddata->gamma));
goto err_regulator;
}
- if (gpio_is_valid(ddata->nreset_gpio)) {
- r = devm_gpio_request_one(&spi->dev,
- ddata->nreset_gpio, GPIOF_OUT_INIT_LOW,
- "lcd reset");
- if (r < 0) {
- dev_err(&spi->dev, "couldn't request reset GPIO\n");
- goto err_gpio_req;
- }
+ ddata->reset_gpio = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_HIGH);
+ r = PTR_ERR_OR_ZERO(ddata->reset_gpio);
+ if (r) {
+ dev_err(&spi->dev, "couldn't request reset GPIO\n");
+ goto err_gpio_req;
}
+ gpiod_set_consumer_name(ddata->reset_gpio, "lcd reset");
+
r = sysfs_create_group(&spi->dev.kobj, &tpo_td043_attr_group);
if (r) {
dev_err(&spi->dev, "failed to create sysfs files\n");
{
void __iomem *base = core->base;
u8 cur_addr;
- char checksum = 0;
const int retries = 1000;
u8 seg_ptr = ext / 2;
u8 edidbase = ((ext % 2) * 0x80);
}
pedid[cur_addr] = REG_GET(base, HDMI_CORE_I2CM_DATAI, 7, 0);
- checksum += pedid[cur_addr];
}
return 0;
}
info = framebuffer_alloc(sizeof(struct pm2fb_par), &pdev->dev);
- if (!info)
- return -ENOMEM;
+ if (!info) {
+ err = -ENOMEM;
+ goto err_exit_disable;
+ }
default_par = info->par;
switch (pdev->device) {
release_mem_region(pm2fb_fix.mmio_start, pm2fb_fix.mmio_len);
err_exit_neither:
framebuffer_release(info);
+ err_exit_disable:
+ pci_disable_device(pdev);
return retval;
}
fb_dealloc_cmap(&info->cmap);
kfree(info->pixmap.addr);
framebuffer_release(info);
+ pci_disable_device(pdev);
}
static const struct pci_device_id pm2fb_id_table[] = {
irq = platform_get_irq(dev, 0);
if (irq < 0) {
- dev_err(&dev->dev, "no IRQ defined\n");
ret = -ENODEV;
goto failed_free_mem;
}
struct fb_info *info = dev_get_drvdata(dev);
struct sh_mobile_lcdc_overlay *ovl = info->par;
- return scnprintf(buf, PAGE_SIZE, "%u\n", ovl->alpha);
+ return sysfs_emit(buf, "%u\n", ovl->alpha);
}
static ssize_t
struct fb_info *info = dev_get_drvdata(dev);
struct sh_mobile_lcdc_overlay *ovl = info->par;
- return scnprintf(buf, PAGE_SIZE, "%u\n", ovl->mode);
+ return sysfs_emit(buf, "%u\n", ovl->mode);
}
static ssize_t
struct fb_info *info = dev_get_drvdata(dev);
struct sh_mobile_lcdc_overlay *ovl = info->par;
- return scnprintf(buf, PAGE_SIZE, "%d,%d\n", ovl->pos_x, ovl->pos_y);
+ return sysfs_emit(buf, "%d,%d\n", ovl->pos_x, ovl->pos_y);
}
static ssize_t
struct fb_info *info = dev_get_drvdata(dev);
struct sh_mobile_lcdc_overlay *ovl = info->par;
- return scnprintf(buf, PAGE_SIZE, "%u\n", ovl->rop3);
+ return sysfs_emit(buf, "%u\n", ovl->rop3);
}
static ssize_t
struct usb_device *usbdev;
struct ufx_data *dev;
struct fb_info *info;
- int retval;
+ int retval = -ENOMEM;
u32 id_rev, fpga_rev;
/* usb initialization */
if (!ufx_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
dev_err(dev->gdev, "ufx_alloc_urb_list failed\n");
- goto e_nomem;
+ goto put_ref;
}
/* We don't register a new USB class. Our client interface is fbdev */
/* allocates framebuffer driver structure, not framebuffer memory */
info = framebuffer_alloc(0, &usbdev->dev);
- if (!info)
- goto e_nomem;
+ if (!info) {
+ dev_err(dev->gdev, "framebuffer_alloc failed\n");
+ goto free_urb_list;
+ }
dev->info = info;
info->par = dev;
check_warn_goto_error(retval, "unable to find common mode for display and adapter");
retval = ufx_reg_set_bits(dev, 0x4000, 0x00000001);
- check_warn_goto_error(retval, "error %d enabling graphics engine", retval);
+ if (retval < 0) {
+ dev_err(dev->gdev, "error %d enabling graphics engine", retval);
+ goto setup_modes;
+ }
/* ready to begin using device */
atomic_set(&dev->usb_active, 1);
dev_dbg(dev->gdev, "checking var");
retval = ufx_ops_check_var(&info->var, info);
- check_warn_goto_error(retval, "error %d ufx_ops_check_var", retval);
+ if (retval < 0) {
+ dev_err(dev->gdev, "error %d ufx_ops_check_var", retval);
+ goto reset_active;
+ }
dev_dbg(dev->gdev, "setting par");
retval = ufx_ops_set_par(info);
- check_warn_goto_error(retval, "error %d ufx_ops_set_par", retval);
+ if (retval < 0) {
+ dev_err(dev->gdev, "error %d ufx_ops_set_par", retval);
+ goto reset_active;
+ }
dev_dbg(dev->gdev, "registering framebuffer");
retval = register_framebuffer(info);
- check_warn_goto_error(retval, "error %d register_framebuffer", retval);
+ if (retval < 0) {
+ dev_err(dev->gdev, "error %d register_framebuffer", retval);
+ goto reset_active;
+ }
dev_info(dev->gdev, "SMSC UDX USB device /dev/fb%d attached. %dx%d resolution."
" Using %dK framebuffer memory\n", info->node,
return 0;
-error:
- fb_dealloc_cmap(&info->cmap);
-destroy_modedb:
+reset_active:
+ atomic_set(&dev->usb_active, 0);
+setup_modes:
fb_destroy_modedb(info->monspecs.modedb);
vfree(info->screen_base);
fb_destroy_modelist(&info->modelist);
+error:
+ fb_dealloc_cmap(&info->cmap);
+destroy_modedb:
framebuffer_release(info);
+free_urb_list:
+ if (dev->urbs.count > 0)
+ ufx_free_urb_list(dev);
put_ref:
kref_put(&dev->kref, ufx_free); /* ref for framebuffer */
kref_put(&dev->kref, ufx_free); /* last ref from kref_init */
return retval;
-
-e_nomem:
- retval = -ENOMEM;
- goto put_ref;
}
static void ufx_usb_disconnect(struct usb_interface *interface)
bl_init_error:
unregister_framebuffer(info);
panel_init_error:
- if (par->device_info->need_pwm) {
- pwm_disable(par->pwm);
- pwm_put(par->pwm);
- }
+ pwm_disable(par->pwm);
+ pwm_put(par->pwm);
regulator_enable_error:
if (par->vbat_reg)
regulator_disable(par->vbat_reg);
backlight_device_unregister(info->bl_dev);
unregister_framebuffer(info);
- if (par->device_info->need_pwm) {
- pwm_disable(par->pwm);
- pwm_put(par->pwm);
- }
+ pwm_disable(par->pwm);
+ pwm_put(par->pwm);
if (par->vbat_reg)
regulator_disable(par->vbat_reg);
fb_deferred_io_cleanup(info);
struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_vendor_name_ptr)
- return scnprintf(buf, PAGE_SIZE, "%s\n", (char *)
+ return sysfs_emit(buf, "%s\n", (char *)
(&par->vbe_ib) + par->vbe_ib.oem_vendor_name_ptr);
else
return 0;
struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_product_name_ptr)
- return scnprintf(buf, PAGE_SIZE, "%s\n", (char *)
+ return sysfs_emit(buf, "%s\n", (char *)
(&par->vbe_ib) + par->vbe_ib.oem_product_name_ptr);
else
return 0;
struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_product_rev_ptr)
- return scnprintf(buf, PAGE_SIZE, "%s\n", (char *)
+ return sysfs_emit(buf, "%s\n", (char *)
(&par->vbe_ib) + par->vbe_ib.oem_product_rev_ptr);
else
return 0;
struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_string_ptr)
- return scnprintf(buf, PAGE_SIZE, "%s\n",
+ return sysfs_emit(buf, "%s\n",
(char *)(&par->vbe_ib) + par->vbe_ib.oem_string_ptr);
else
return 0;
struct fb_info *info = dev_get_drvdata(dev);
struct uvesafb_par *par = info->par;
- return scnprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc);
+ return sysfs_emit(buf, "%d\n", par->nocrtc);
}
static ssize_t uvesafb_store_nocrtc(struct device *dev,
out_unmap:
iounmap(info->screen_base);
out_mem:
+ arch_phys_wc_del(par->mtrr_handle);
release_mem_region(info->fix.smem_start, info->fix.smem_len);
out_reg:
release_region(0x3c0, 32);
static int uvesafb_remove(struct platform_device *dev)
{
struct fb_info *info = platform_get_drvdata(dev);
+ struct uvesafb_par *par = info->par;
- if (info) {
- struct uvesafb_par *par = info->par;
+ sysfs_remove_group(&dev->dev.kobj, &uvesafb_dev_attgrp);
+ unregister_framebuffer(info);
+ release_region(0x3c0, 32);
+ iounmap(info->screen_base);
+ arch_phys_wc_del(par->mtrr_handle);
+ release_mem_region(info->fix.smem_start, info->fix.smem_len);
+ fb_destroy_modedb(info->monspecs.modedb);
+ fb_dealloc_cmap(&info->cmap);
- sysfs_remove_group(&dev->dev.kobj, &uvesafb_dev_attgrp);
- unregister_framebuffer(info);
- release_region(0x3c0, 32);
- iounmap(info->screen_base);
- arch_phys_wc_del(par->mtrr_handle);
- release_mem_region(info->fix.smem_start, info->fix.smem_len);
- fb_destroy_modedb(info->monspecs.modedb);
- fb_dealloc_cmap(&info->cmap);
+ kfree(par->vbe_modes);
+ kfree(par->vbe_state_orig);
+ kfree(par->vbe_state_saved);
- kfree(par->vbe_modes);
- kfree(par->vbe_state_orig);
- kfree(par->vbe_state_saved);
+ framebuffer_release(info);
- framebuffer_release(info);
- }
return 0;
}
mutex_unlock(&vml_mutex);
- if (pci_enable_device(par->gpu) < 0)
+ if (pci_enable_device(par->gpu) < 0) {
+ pci_dev_put(par->gpu);
return -ENODEV;
+ }
return 0;
}
return ret;
viafb_i2c_init();
viafb_gpio_init();
- return pci_register_driver(&via_driver);
+ ret = pci_register_driver(&via_driver);
+ if (ret) {
+ viafb_gpio_exit();
+ viafb_i2c_exit();
+ return ret;
+ }
+
+ return 0;
}
static void __exit via_core_exit(void)
+++ /dev/null
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Header containing platform_data structs for omap panels
- *
- * Copyright (C) 2013 Texas Instruments
- * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
- * Archit Taneja <archit@ti.com>
- *
- * Copyright (C) 2011 Texas Instruments
- * Author: Mayuresh Janorkar <mayur@ti.com>
- *
- * Copyright (C) 2010 Canonical Ltd.
- * Author: Bryan Wu <bryan.wu@canonical.com>
- */
-
-#ifndef __OMAP_PANEL_DATA_H
-#define __OMAP_PANEL_DATA_H
-
-#include <video/display_timing.h>
-
-/**
- * connector_atv platform data
- * @name: name for this display entity
- * @source: name of the display entity used as a video source
- * @invert_polarity: invert signal polarity
- */
-struct connector_atv_platform_data {
- const char *name;
- const char *source;
-
- bool invert_polarity;
-};
-
-/**
- * panel_dpi platform data
- * @name: name for this display entity
- * @source: name of the display entity used as a video source
- * @data_lines: number of DPI datalines
- * @display_timing: timings for this panel
- * @backlight_gpio: gpio to enable/disable the backlight (or -1)
- * @enable_gpio: gpio to enable/disable the panel (or -1)
- */
-struct panel_dpi_platform_data {
- const char *name;
- const char *source;
-
- int data_lines;
-
- const struct display_timing *display_timing;
-
- int backlight_gpio;
- int enable_gpio;
-};
-
-/**
- * panel_acx565akm platform data
- * @name: name for this display entity
- * @source: name of the display entity used as a video source
- * @reset_gpio: gpio to reset the panel (or -1)
- * @datapairs: number of SDI datapairs
- */
-struct panel_acx565akm_platform_data {
- const char *name;
- const char *source;
-
- int reset_gpio;
-
- int datapairs;
-};
-
-#endif /* __OMAP_PANEL_DATA_H */