|
From: <bob...@us...> - 2007-07-17 08:50:14
|
Revision: 1170
http://svn.sourceforge.net/hackndev/?rev=1170&view=rev
Author: bobofdoom
Date: 2007-07-17 01:50:10 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
PalmT650: Switch back to corgi_bl (basically undoing r986).
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-17 07:54:20 UTC (rev 1169)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-17 08:50:10 UTC (rev 1170)
@@ -27,7 +27,6 @@
#include <asm/arch/pxafb.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa27x_keyboard.h>
-#include <asm/arch/pxapwm-bl.h>
#include <asm/arch/irda.h>
#include <asm/arch/sharpsl.h>
#include <asm/arch/udc.h>
@@ -121,19 +120,36 @@
* Backlight
*********************************************************/
-static struct pxapwmbl_platform_data palmt650_backlight_data = {
- .pwm = 0,
+static void palmt650_set_bl_power(int on)
+{
+ /* TODO: set GPIOs */
+ pxa_set_cken(CKEN0_PWM0, on);
+ pxa_set_cken(CKEN1_PWM1, on);
+}
+
+static void palmt650_set_bl_intensity(int intensity)
+{
+ palmt650_set_bl_power(intensity ? 1 : 0);
+ if (intensity) {
+ PWM_CTRL0 = 0x1;
+ PWM_PERVAL0 = PALMT650_BL_PERIOD;
+ PWM_PWDUTY0 = intensity;
+ }
+}
+
+static struct corgibl_machinfo palmt650_bl_machinfo = {
.max_intensity = PALMT650_MAX_INTENSITY,
.default_intensity = PALMT650_DEFAULT_INTENSITY,
.limit_mask = PALMT650_LIMIT_MASK,
- .prescaler = 1,
- .period = 0x12C,
+ .set_bl_intensity = palmt650_set_bl_intensity,
};
+
static struct platform_device palmt650_backlight = {
- .name = "pxapwm-bl",
+ .name = "corgi-bl",
+ .id = 0,
.dev = {
- .platform_data = &palmt650_backlight_data,
+ .platform_data = &palmt650_bl_machinfo,
},
};
/*********************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|