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

Commit 6f35308c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Convert corgi backlight driver into a more generic driver
  backlight: Add Samsung LTV350QV LCD driver
  backlight: Fix cr_bllcd allocations and error paths
  backlight/leds: Make two structs static
parents 19ad7ae4 c3f8f650
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/mmc/host.h>
#include <linux/pm.h>
#include <linux/backlight.h>

#include <asm/setup.h>
#include <asm/memory.h>
@@ -142,15 +143,28 @@ struct corgissp_machinfo corgi_ssp_machinfo = {
/*
 * Corgi Backlight Device
 */
static struct corgibl_machinfo corgi_bl_machinfo = {
static void corgi_bl_kick_battery(void)
{
	void (*kick_batt)(void);

	kick_batt = symbol_get(sharpsl_battery_kick);
	if (kick_batt) {
		kick_batt();
		symbol_put(sharpsl_battery_kick);
	}
}

static struct generic_bl_info corgi_bl_machinfo = {
	.name = "corgi-bl",
	.max_intensity = 0x2f,
	.default_intensity = 0x1f,
	.limit_mask = 0x0b,
	.set_bl_intensity = corgi_bl_set_intensity,
	.kick_battery = corgi_bl_kick_battery,
};

static struct platform_device corgibl_device = {
	.name		= "corgi-bl",
	.name		= "generic-bl",
	.dev		= {
 		.parent = &corgifb_device.dev,
		.platform_data	= &corgi_bl_machinfo,
+16 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/interrupt.h>
#include <linux/mmc/host.h>
#include <linux/pm.h>
#include <linux/backlight.h>

#include <asm/setup.h>
#include <asm/memory.h>
@@ -222,14 +223,27 @@ struct corgissp_machinfo spitz_ssp_machinfo = {
/*
 * Spitz Backlight Device
 */
static struct corgibl_machinfo spitz_bl_machinfo = {
static void spitz_bl_kick_battery(void)
{
	void (*kick_batt)(void);

	kick_batt = symbol_get(sharpsl_battery_kick);
	if (kick_batt) {
		kick_batt();
		symbol_put(sharpsl_battery_kick);
	}
}

static struct generic_bl_info spitz_bl_machinfo = {
	.name = "corgi-bl",
	.default_intensity = 0x1f,
	.limit_mask = 0x0b,
	.max_intensity = 0x2f,
	.kick_battery = spitz_bl_kick_battery,
};

static struct platform_device spitzbl_device = {
	.name		= "corgi-bl",
	.name		= "generic-bl",
	.dev		= {
 		.platform_data	= &spitz_bl_machinfo,
	},
+18 −5
Original line number Diff line number Diff line
@@ -24,6 +24,18 @@ config LCD_CLASS_DEVICE
	  To have support for your specific LCD panel you will have to
	  select the proper drivers which depend on this option.

config LCD_LTV350QV
	tristate "Samsung LTV350QV LCD Panel"
	depends on LCD_CLASS_DEVICE && SPI_MASTER
	default n
	help
	  If you have a Samsung LTV350QV LCD panel, say y to include a
	  power control driver for it.  The panel starts up in power
	  off state, so you need this driver in order to see any
	  output.

	  The LTV350QV panel is present on all ATSTK1000 boards.

#
# Backlight
#
@@ -39,12 +51,13 @@ config BACKLIGHT_CLASS_DEVICE
	  select the proper drivers which depend on this option.

config BACKLIGHT_CORGI
	tristate "Sharp Corgi Backlight Driver (SL Series)"
	depends on BACKLIGHT_CLASS_DEVICE && PXA_SHARPSL
	default y
	tristate "Generic (aka Sharp Corgi) Backlight Driver"
	depends on BACKLIGHT_CLASS_DEVICE
	default n
	help
	  If you have a Sharp Zaurus SL-C7xx, SL-Cxx00 or SL-6000x say y to enable the
	  backlight driver.
	  Say y to enable the generic platform backlight driver previously
	  known as the Corgi backlight driver. If you have a Sharp Zaurus
	  SL-C7xx, SL-Cxx00 or SL-6000x say y. Most users can say n.

config BACKLIGHT_LOCOMO
	tristate "Sharp LOCOMO LCD/Backlight Driver"
+2 −0
Original line number Diff line number Diff line
# Backlight & LCD drivers

obj-$(CONFIG_LCD_CLASS_DEVICE)     += lcd.o
obj-$(CONFIG_LCD_LTV350QV)	+= ltv350qv.o

obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
obj-$(CONFIG_BACKLIGHT_CORGI)	+= corgi_bl.o
obj-$(CONFIG_BACKLIGHT_HP680)	+= hp680_bl.o
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static ssize_t backlight_show_actual_brightness(struct device *dev,
	return rc;
}

struct class *backlight_class;
static struct class *backlight_class;

static void bl_device_release(struct device *dev)
{
Loading