diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-09-03 00:27:00 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-10-11 22:24:13 +0100 |
commit | c3f8f65046127f471d0b6193a1923185b354c011 (patch) | |
tree | 69e9178d13f9c1e02387f33fbff38fff612eb12e /arch/arm/mach-pxa/corgi.c | |
parent | 18f65c793a5106b9f99822ef248e71582db03386 (diff) | |
download | linux-c3f8f65046127f471d0b6193a1923185b354c011.tar.gz linux-c3f8f65046127f471d0b6193a1923185b354c011.tar.bz2 linux-c3f8f65046127f471d0b6193a1923185b354c011.zip |
backlight: Convert corgi backlight driver into a more generic driver
Convert the corgi backlight driver to a more generic version
so it can be reused by other code rather than being Zaurus/PXA
specific.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'arch/arm/mach-pxa/corgi.c')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index aab27297b3c6..2363cc64fe07 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -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, |