Revision: 1174
http://svn.sourceforge.net/hackndev/?rev=1174&view=rev
Author: keddar
Date: 2007-07-17 08:21:09 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
palmtt3: migrate to corgi-bl
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-17 10:26:05 UTC (rev 1173)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-17 15:21:09 UTC (rev 1174)
@@ -11,6 +11,8 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/input.h>
+#include <linux/corgi_bl.h>
+
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <asm/arch/hardware.h>
@@ -39,7 +41,6 @@
#include <linux/input.h>
#include <linux/soc/tsc2101.h>
#include <asm/arch/pxa-pm_ll.h>
-#include <asm/arch/pxapwm-bl.h>
#include <asm/arch/palmtt3-gpio.h>
#include <asm/arch/palmtt3-init.h>
#include <asm/arch/tps65010.h>
@@ -51,15 +52,6 @@
/*** FRAMEBUFFER ***/
-static void palmtt3_pxafb_backlight_power(int level)
-{
- // just turn it on/off, other controls via backlight class
- if(level)
- CKEN = CKEN | CKEN1_PWM1;
- else
- CKEN = CKEN & (~CKEN1_PWM1);
-}
-
static void palmtt3_pxafb_lcd_power(int level, struct fb_var_screeninfo *var)
{
if(level) {
@@ -109,11 +101,13 @@
.num_modes = ARRAY_SIZE(palmtt3_lcd_modes),
.lccr0 = PALMTT3_INIT_LCD_LCCR0,
.lccr3 = PALMTT3_INIT_LCD_LCCR3,
- .pxafb_backlight_power = &palmtt3_pxafb_backlight_power,
+ .pxafb_backlight_power = NULL,
.pxafb_lcd_power = &palmtt3_pxafb_lcd_power,
};
+
/*** SSP ***/
+
static struct ssp_dev palmtt3_ssp_dev;
void palmtt3_ssp_init(void)
@@ -204,13 +198,29 @@
};
/* Backlight ***/
-static struct pxapwmbl_platform_data palmtt3_backlight_data = {
- .pwm = 1,
+static void palmtt3_bl_power(int on)
+{
+ /* SET_PALMTT3_GPIO(BL_POWER, on); */ /* to be determined */
+ pxa_set_cken(CKEN0_PWM0, on);
+ pxa_set_cken(CKEN1_PWM1, on);
+ mdelay(50);
+}
+
+static void palmtt3_set_bl_intensity(int intensity)
+{
+ palmtt3_bl_power(intensity ? 1 : 0);
+ if(intensity) {
+ PWM_CTRL1 = 0x7;
+ PWM_PERVAL1 = PALMTT3_PERIOD;
+ PWM_PWDUTY1 = intensity;
+ }
+}
+
+static struct corgibl_machinfo palmtt3_bl_machinfo = {
.max_intensity = PALMTT3_MAX_INTENSITY,
.default_intensity = PALMTT3_DEFAULT_INTENSITY,
+ .set_bl_intensity = palmtt3_set_bl_intensity,
.limit_mask = PALMTT3_LIMIT_MASK,
- .prescaler = PALMTT3_PRESCALER,
- .period = PALMTT3_PERIOD,
};
/*** LEDs ***/
@@ -261,9 +271,10 @@
/*** Backlight ***/
static struct platform_device palmtt3_backlight_device = {
- .name = "pxapwm-bl",
+ .name = "corgi-bl",
+ .id = 0,
.dev = {
- .platform_data = &palmtt3_backlight_data,
+ .platform_data = &palmtt3_bl_machinfo,
},
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|