|
From: <mar...@us...> - 2007-07-17 07:54:23
|
Revision: 1169
http://svn.sourceforge.net/hackndev/?rev=1169&view=rev
Author: marex_z71
Date: 2007-07-17 00:54:20 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
PalmTX: migrate to corgi_bl
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
Modified: linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2007-07-17 07:23:47 UTC (rev 1168)
+++ linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2007-07-17 07:54:20 UTC (rev 1169)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21-hnd2
-# Sun Jun 24 16:28:21 2007
+# Tue Jul 17 09:33:05 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -50,7 +50,7 @@
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_INITRAMFS_SOURCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
@@ -184,7 +184,6 @@
# CONFIG_PALMTX_DEBUG is not set
CONFIG_PALMTX_BATTERY=m
CONFIG_PALMTX_PM=y
-# CONFIG_PALMTX_PCMCIA is not set
# CONFIG_MACH_PALMZ72 is not set
# CONFIG_MACH_OMAP_PALMTC is not set
# CONFIG_MACH_ZIRE31 is not set
@@ -434,7 +433,6 @@
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not set
CONFIG_BT_BCM2035UART=m
-# CONFIG_BT_BCM2035UART_DEBUG is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_IEEE80211 is not set
@@ -558,6 +556,7 @@
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
+# CONFIG_LIBERTAS is not set
#
# Wan interfaces
@@ -732,10 +731,10 @@
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
-CONFIG_POWER_SUPPLY=y
+CONFIG_POWER_SUPPLY=m
# CONFIG_POWER_SUPPLY_DEBUG is not set
-CONFIG_PDA_POWER=y
-CONFIG_APM_POWER=y
+CONFIG_PDA_POWER=m
+CONFIG_APM_POWER=m
# CONFIG_BATTERY_DS2760 is not set
#
@@ -767,7 +766,6 @@
# CONFIG_SOC_T7L66XB is not set
# CONFIG_SOC_TC6387XB is not set
# CONFIG_SOC_TC6393XB is not set
-# CONFIG_SOC_TSC2101 is not set
# CONFIG_SOC_TSC2200 is not set
#
@@ -799,8 +797,8 @@
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_LCD_CLASS_DEVICE is not set
-# CONFIG_BACKLIGHT_CORGI is not set
-CONFIG_BACKLIGHT_PXAPWM=y
+CONFIG_BACKLIGHT_CORGI=m
+# CONFIG_BACKLIGHT_PXAPWM is not set
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
# CONFIG_FB_DDC is not set
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-07-17 07:23:47 UTC (rev 1168)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-07-17 07:54:20 UTC (rev 1169)
@@ -25,6 +25,7 @@
#include <linux/input.h>
#include <linux/delay.h>
#include <linux/irq.h>
+#include <linux/corgi_bl.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -41,14 +42,11 @@
#include <asm/arch/serial.h>
#include <asm/arch/bitfield.h>
#include <asm/arch/pxa27x_keyboard.h>
-#include <asm/arch/pxapwm-bl.h>
+#include <asm/arch/palmtx-init.h>
+#include <asm/arch/palmtx-gpio.h>
#include "../generic.h"
-#include <../drivers/pcmcia/soc_common.h>
-#include "asm-arm/arch-pxa/palmtx-init.h"
-#include "asm-arm/arch-pxa/palmtx-gpio.h"
-
#define DEBUG
/**************************
@@ -157,32 +155,37 @@
* Backlight *
*************/
-static void palmtx_bl_on(void){
- SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 1);
- mdelay(50);
+static void palmtx_bl_power(int on)
+{
+ SET_PALMTX_GPIO(BL_POWER, on);
+ pxa_set_cken(CKEN0_PWM0, on);
+ pxa_set_cken(CKEN1_PWM1, on);
+ mdelay(50);
}
-static void palmtx_bl_off(void){
- SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 0);
- mdelay(50);
+static void palmtx_set_bl_intensity(int intensity)
+{
+ palmtx_bl_power(intensity ? 1 : 0);
+ if(intensity) {
+ PWM_CTRL0 = 0x7;
+ PWM_PERVAL0 = PALMTX_PERIOD;
+ PWM_PWDUTY0 = intensity;
+ }
}
-static struct pxapwmbl_platform_data palmtx_backlight_data = {
- .pwm = 0,
- .max_intensity = 0x16c,
- .default_intensity = 0xc7,
- .limit_mask = 0x6d,
- .prescaler = 7,
- .period = 0x16c,
- .turn_bl_on = palmtx_bl_on,
- .turn_bl_off = palmtx_bl_off,
+static struct corgibl_machinfo palmtx_bl_machinfo = {
+ .max_intensity = PALMTX_MAX_INTENSITY,
+ .default_intensity = PALMTX_MAX_INTENSITY,
+ .set_bl_intensity = palmtx_set_bl_intensity,
+ .limit_mask = PALMTX_LIMIT_MASK,
};
static struct platform_device palmtx_backlight = {
- .name = "pxapwm-bl",
- .dev = {
- .platform_data = &palmtx_backlight_data,
- },
+ .name = "corgi-bl",
+ .id = 0,
+ .dev = {
+ .platform_data = &palmtx_bl_machinfo,
+ },
};
@@ -320,7 +323,7 @@
static pxa2xx_audio_ops_t palmtx_audio_ops = {
/*
- .startup = palmld_audio_startup,
+ .startup = palmtx_audio_startup,
.shutdown = mst_audio_shutdown,
.suspend = mst_audio_suspend,
.resume = mst_audio_resume,
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-07-17 07:23:47 UTC (rev 1168)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-07-17 07:54:20 UTC (rev 1169)
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* Init values for Palm TX Handheld Computer
*
* Authors: Cristiano P. <cristianop AT users DOT sourceforge DOT net>
@@ -21,29 +19,23 @@
#define _INCLUDE_PALMTX_INIT_H_
-/* Various addresses */
+/* Various addresses */
#define PALMTX_PHYS_RAM_START 0xa0000000
#define PALMTX_PHYS_IO_START 0x40000000
-// LCD REGISTERS
-//
-// values as dumped from device
+/* LCD REGISTERS */
+#define PALMTX_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM | \
+ LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | \
+ LCCR0_4PixMono | LCCR0_QDM | LCCR0_BM | LCCR0_OUM | \
+ LCCR0_RDSTM | LCCR0_CMDIM | LCCR0_OUC | LCCR0_LDDALT
-//#define PALMTX_INIT_LCD_LLC0 0x07b008f9
-#define PALMTX_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM \
- | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | LCCR0_4PixMono | \
- LCCR0_QDM | LCCR0_BM | LCCR0_OUM | LCCR0_RDSTM | LCCR0_CMDIM | \
- LCCR0_OUC | LCCR0_LDDALT
-#define PALMTX_INIT_LCD_LLC1 0x1f030d3f
-#define PALMTX_INIT_LCD_LLC2 0x070801df
-//#define PALMTX_INIT_LCD_LLC3 0x04700004
-#define PALMTX_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | \
- LCCR3_VrtSnchL | LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(4)
+#define PALMTX_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | LCCR3_VrtSnchL | \
+ LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(4)
-// KEYPAD configuration
+/* KEYPAD configuration */
#define KPASMKP(col) (col/2==0 ? KPASMKP0 : KPASMKP1)
#define KPASMKPx_MKC(row, col) (1 << (row + 16*(col%2)))
@@ -52,35 +44,29 @@
#define PALMTX_KM_COLS 3
-// TOUCHSCREEN
+/* TOUCHSCREEN */
-#define AC97_LINK_FRAME 21
+#define AC97_LINK_FRAME 21
-// BATTERY
+/* BATTERY */
-#define PALMTX_BAT_MAX_VOLTAGE 4000 // 4.00v current voltage at max charge as from ZLauncher
-#define PALMTX_BAT_MIN_VOLTAGE 3500 // 3.60v critical voltage as from FileZ
-#define PALMTX_BAT_MAX_CURRENT 0 // unknokn
-#define PALMTX_BAT_MIN_CURRENT 0 // unknown
-#define PALMTX_BAT_MAX_CHARGE 1 // unknown
-#define PALMTX_BAT_MIN_CHARGE 1 // unknown
-#define PALMTX_MAX_LIFE_MINS 360 // on-life in minutes
+#define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage at max charge as from ZLauncher */
+#define PALMTX_BAT_MIN_VOLTAGE 3500 /* 3.60v critical voltage as from FileZ */
+#define PALMTX_BAT_MAX_CURRENT 0 /* unknokn */
+#define PALMTX_BAT_MIN_CURRENT 0 /* unknown */
+#define PALMTX_BAT_MAX_CHARGE 1 /* unknown */
+#define PALMTX_BAT_MIN_CHARGE 1 /* unknown */
+#define PALMTX_MAX_LIFE_MINS 360 /* on-life in minutes */
#define PALMTX_BAT_MEASURE_DELAY (HZ * 1)
-// VARIOUS
+/* BACKLIGHT */
-#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio))
+#define PALMTX_MAX_INTENSITY 0xFE
+#define PALMTX_DEFAULT_INTENSITY 0x7E
+#define PALMTX_LIMIT_MASK 0x7F
+#define PALMTX_PRESCALER 0x3F
+#define PALMTX_PERIOD 0x12C
-#define SET_GPIO(gpio, setp) \
- do { \
- if (setp) \
- GPSR(gpio) = GPIO_bit(gpio); \
- else \
- GPCR(gpio) = GPIO_bit(gpio); \
- } while (0)
-
-
-
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|