Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 561eb9d0 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Bartlomiej Zolnierkiewicz
Browse files

fbdev: omap/lcd: Make callbacks optional



Most OMAP FB LCD drivers don't have anything to do in their panel
callbacks. This leads to a large set of empty boilerplate functions in the
panel drivers. Make those callbacks optional by checking if they are set
before calling them. This allows those boilerplate functions to be removed.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent b2c1e8a7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -136,11 +136,6 @@ static void ams_delta_panel_disable(struct lcd_panel *panel)
	gpio_set_value(AMS_DELTA_GPIO_PIN_LCD_NDISP, 0);
}

static unsigned long ams_delta_panel_get_caps(struct lcd_panel *panel)
{
	return 0;
}

static struct lcd_panel ams_delta_panel = {
	.name		= "ams-delta",
	.config		= 0,
@@ -163,7 +158,6 @@ static struct lcd_panel ams_delta_panel = {
	.cleanup	= ams_delta_panel_cleanup,
	.enable		= ams_delta_panel_enable,
	.disable	= ams_delta_panel_disable,
	.get_caps	= ams_delta_panel_get_caps,
};


+0 −17
Original line number Diff line number Diff line
@@ -28,15 +28,6 @@

#define MODULE_NAME	"omapfb-lcd_h3"

static int h3_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
{
	return 0;
}

static void h3_panel_cleanup(struct lcd_panel *panel)
{
}

static int h3_panel_enable(struct lcd_panel *panel)
{
	int r = 0;
@@ -63,11 +54,6 @@ static void h3_panel_disable(struct lcd_panel *panel)
		pr_err(MODULE_NAME ": Unable to turn off LCD panel\n");
}

static unsigned long h3_panel_get_caps(struct lcd_panel *panel)
{
	return 0;
}

static struct lcd_panel h3_panel = {
	.name		= "h3",
	.config		= OMAP_LCDC_PANEL_TFT,
@@ -85,11 +71,8 @@ static struct lcd_panel h3_panel = {
	.vbp		= 0,
	.pcd		= 0,

	.init		= h3_panel_init,
	.cleanup	= h3_panel_cleanup,
	.enable		= h3_panel_enable,
	.disable	= h3_panel_disable,
	.get_caps	= h3_panel_get_caps,
};

static int h3_panel_probe(struct platform_device *pdev)
+0 −30
Original line number Diff line number Diff line
@@ -31,30 +31,6 @@

#include "omapfb.h"

static int htcherald_panel_init(struct lcd_panel *panel,
					struct omapfb_device *fbdev)
{
	return 0;
}

static void htcherald_panel_cleanup(struct lcd_panel *panel)
{
}

static int htcherald_panel_enable(struct lcd_panel *panel)
{
	return 0;
}

static void htcherald_panel_disable(struct lcd_panel *panel)
{
}

static unsigned long htcherald_panel_get_caps(struct lcd_panel *panel)
{
	return 0;
}

/* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */
static struct lcd_panel htcherald_panel_1 = {
	.name		= "lcd_herald",
@@ -74,12 +50,6 @@ static struct lcd_panel htcherald_panel_1 = {
	.vsw		= 3,
	.vfp		= 2,
	.vbp		= 2,

	.init		= htcherald_panel_init,
	.cleanup	= htcherald_panel_cleanup,
	.enable		= htcherald_panel_enable,
	.disable	= htcherald_panel_disable,
	.get_caps	= htcherald_panel_get_caps,
};

static int htcherald_panel_probe(struct platform_device *pdev)
+0 −18
Original line number Diff line number Diff line
@@ -27,16 +27,6 @@

#include "omapfb.h"

static int innovator1510_panel_init(struct lcd_panel *panel,
				    struct omapfb_device *fbdev)
{
	return 0;
}

static void innovator1510_panel_cleanup(struct lcd_panel *panel)
{
}

static int innovator1510_panel_enable(struct lcd_panel *panel)
{
	__raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
@@ -48,11 +38,6 @@ static void innovator1510_panel_disable(struct lcd_panel *panel)
	__raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
}

static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
{
	return 0;
}

static struct lcd_panel innovator1510_panel = {
	.name		= "inn1510",
	.config		= OMAP_LCDC_PANEL_TFT,
@@ -70,11 +55,8 @@ static struct lcd_panel innovator1510_panel = {
	.vbp		= 0,
	.pcd		= 12,

	.init		= innovator1510_panel_init,
	.cleanup	= innovator1510_panel_cleanup,
	.enable		= innovator1510_panel_enable,
	.disable	= innovator1510_panel_disable,
	.get_caps	= innovator1510_panel_get_caps,
};

static int innovator1510_panel_probe(struct platform_device *pdev)
+0 −6
Original line number Diff line number Diff line
@@ -69,11 +69,6 @@ static void innovator1610_panel_disable(struct lcd_panel *panel)
	gpio_set_value(15, 0);
}

static unsigned long innovator1610_panel_get_caps(struct lcd_panel *panel)
{
	return 0;
}

static struct lcd_panel innovator1610_panel = {
	.name		= "inn1610",
	.config		= OMAP_LCDC_PANEL_TFT,
@@ -95,7 +90,6 @@ static struct lcd_panel innovator1610_panel = {
	.cleanup	= innovator1610_panel_cleanup,
	.enable		= innovator1610_panel_enable,
	.disable	= innovator1610_panel_disable,
	.get_caps	= innovator1610_panel_get_caps,
};

static int innovator1610_panel_probe(struct platform_device *pdev)
Loading