You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(26) |
Sep
(22) |
Oct
(55) |
Nov
(24) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(68) |
Feb
(85) |
Mar
(54) |
Apr
(12) |
May
(52) |
Jun
(75) |
Jul
(116) |
Aug
(71) |
Sep
(54) |
Oct
|
Nov
(2) |
Dec
|
From: <far...@us...> - 2006-10-30 22:25:02
|
Revision: 651 http://svn.sourceforge.net/hackndev/?rev=651&view=rev Author: farcaller Date: 2006-10-30 14:24:55 -0800 (Mon, 30 Oct 2006) Log Message: ----------- palmt3: hope that would solve random-tap bug Modified Paths: -------------- linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c Modified: linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c =================================================================== --- linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c 2006-10-30 21:51:28 UTC (rev 650) +++ linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c 2006-10-30 22:24:55 UTC (rev 651) @@ -23,7 +23,7 @@ #define X_AXIS_MIN 300 #define Y_AXIS_MAX 3900 #define Y_AXIS_MIN 140 -#define PRESSURE_MIN 0 +#define PRESSURE_MIN 10 #define PRESSURE_MAX 20000 #else // hx2750 #define X_AXIS_MAX 3830 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-30 21:51:41
|
Revision: 650 http://svn.sourceforge.net/hackndev/?rev=650&view=rev Author: farcaller Date: 2006-10-30 13:51:28 -0800 (Mon, 30 Oct 2006) Log Message: ----------- palmt3, palmld: fix to qt/c sleep patch to make gpe resume :) Modified Paths: -------------- linux4palm/linux/trunk/kernel/power/console.c Modified: linux4palm/linux/trunk/kernel/power/console.c =================================================================== --- linux4palm/linux/trunk/kernel/power/console.c 2006-10-29 16:00:57 UTC (rev 649) +++ linux4palm/linux/trunk/kernel/power/console.c 2006-10-30 21:51:28 UTC (rev 650) @@ -51,10 +51,14 @@ void pm_restore_console(void) { +#ifndef CONFIG_MACH_XSCALE_PALMLD +#ifndef CONFIG_MACH_T3XSCALE acquire_console_sem(); set_console(orig_fgconsole); release_console_sem(); kmsg_redirect = orig_kmsg; +#endif +#endif return; } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-29 16:03:42
|
Revision: 649 http://svn.sourceforge.net/hackndev/?rev=649&view=rev Author: farcaller Date: 2006-10-29 08:00:57 -0800 (Sun, 29 Oct 2006) Log Message: ----------- palmt3: updated defconfig Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmt3_defconfig Modified: linux4palm/linux/trunk/arch/arm/configs/palmt3_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmt3_defconfig 2006-10-29 11:47:10 UTC (rev 648) +++ linux4palm/linux/trunk/arch/arm/configs/palmt3_defconfig 2006-10-29 16:00:57 UTC (rev 649) @@ -1,7 +1,8 @@ +# zcat /proc/config.gz # # Automatically generated make config: don't edit # Linux kernel version: 2.6.17-hnd0-tt3 -# Thu Oct 5 08:28:53 2006 +# Tue Oct 24 21:02:13 2006 # CONFIG_ARM=y CONFIG_MMU=y @@ -16,6 +17,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 # @@ -147,14 +149,14 @@ # CONFIG_MACH_TUNGE2 is not set CONFIG_MACH_T3XSCALE=y CONFIG_PALM_T3_BUTTONS=y -CONFIG_PALM_T3_BATTERY=y +CONFIG_PALM_T3_BATTERY=m # CONFIG_MACH_XSCALE_PALMTT5 is not set # CONFIG_MACH_XSCALE_PALMTX is not set # CONFIG_MACH_PALMZ72 is not set # CONFIG_MACH_OMAP_PALMTC is not set # CONFIG_PXA_SHARPSL is not set CONFIG_PXA25x=y -CONFIG_PXA_RTC_EPOCH=1970 +CONFIG_PXA_RTC_EPOCH=1904 # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set @@ -207,7 +209,7 @@ # # Kernel Features # -# CONFIG_PREEMPT is not set +CONFIG_PREEMPT=y CONFIG_NO_IDLE_HZ=y CONFIG_HZ=100 CONFIG_AEABI=y @@ -228,13 +230,26 @@ # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M" +CONFIG_CMDLINE="dyntick=enable" # CONFIG_XIP_KERNEL is not set # # CPU Frequency scaling # -# CONFIG_CPU_FREQ is not set +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_DEBUG=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_PXA=y +CONFIG_PXA25x_ALTERNATE_FREQS=y # # Floating point emulation @@ -271,8 +286,9 @@ # Networking options # # CONFIG_NETDEBUG is not set -# CONFIG_PACKET is not set -CONFIG_UNIX=m +CONFIG_PACKET=m +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -282,7 +298,7 @@ # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set @@ -292,9 +308,15 @@ CONFIG_INET_TCP_DIAG=m # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set +# CONFIG_IPV6_TUNNEL is not set # CONFIG_NETFILTER is not set # @@ -607,9 +629,10 @@ # Non-8250 serial port support # CONFIG_SERIAL_PXA=y -# CONFIG_SERIAL_PXA_CONSOLE is not set +CONFIG_SERIAL_PXA_CONSOLE=y CONFIG_SERIAL_PXA_COUNT=4 CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -676,7 +699,7 @@ # # CONFIG_WATCHDOG is not set # CONFIG_NVRAM is not set -CONFIG_SA1100_RTC=m +CONFIG_SA1100_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -845,19 +868,25 @@ CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y # CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set +CONFIG_SND_VERBOSE_PRINTK=y +CONFIG_SND_DEBUG=y +CONFIG_SND_DEBUG_DETECT=y # # Generic devices # # CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set # CONFIG_SND_MTPAV is not set # CONFIG_SND_SERIAL_U16550 is not set # CONFIG_SND_MPU401 is not set @@ -1098,6 +1127,7 @@ # CONFIG_DETECT_SOFTLOCKUP is not set # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-29 11:47:19
|
Revision: 648 http://svn.sourceforge.net/hackndev/?rev=648&view=rev Author: farcaller Date: 2006-10-29 03:47:10 -0800 (Sun, 29 Oct 2006) Log Message: ----------- palmt3: added qt-e/qt-c workaround Modified Paths: -------------- linux4palm/linux/trunk/kernel/power/console.c Modified: linux4palm/linux/trunk/kernel/power/console.c =================================================================== --- linux4palm/linux/trunk/kernel/power/console.c 2006-10-29 11:35:31 UTC (rev 647) +++ linux4palm/linux/trunk/kernel/power/console.c 2006-10-29 11:47:10 UTC (rev 648) @@ -22,6 +22,7 @@ * other than this. The suspend console is ugly, anyhow. ;-) */ #ifndef CONFIG_MACH_XSCALE_PALMLD +#ifndef CONFIG_MACH_T3XSCALE acquire_console_sem(); @@ -44,6 +45,7 @@ orig_kmsg = kmsg_redirect; kmsg_redirect = SUSPEND_CONSOLE; #endif +#endif return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-29 11:35:57
|
Revision: 647 http://svn.sourceforge.net/hackndev/?rev=647&view=rev Author: bobofdoom Date: 2006-10-29 03:35:31 -0800 (Sun, 29 Oct 2006) Log Message: ----------- palmld: Don't even try to change VTs on suspend. Modified Paths: -------------- linux4palm/linux/trunk/kernel/power/console.c Modified: linux4palm/linux/trunk/kernel/power/console.c =================================================================== --- linux4palm/linux/trunk/kernel/power/console.c 2006-10-28 11:32:19 UTC (rev 646) +++ linux4palm/linux/trunk/kernel/power/console.c 2006-10-29 11:35:31 UTC (rev 647) @@ -16,6 +16,13 @@ int pm_prepare_console(void) { + /* <Alex> + * OPIE locks the console so we can't switch vts, this means we hang when + * trying to suspend. I'm not sure how we're supposed to get around it, + * other than this. The suspend console is ugly, anyhow. ;-) + */ +#ifndef CONFIG_MACH_XSCALE_PALMLD + acquire_console_sem(); orig_fgconsole = fg_console; @@ -30,19 +37,13 @@ set_console(SUSPEND_CONSOLE); release_console_sem(); - /* <Alex> - * OPIE locks the console so we can't switch vts, this means we hang when - * trying to suspend. I'm not sure how we're supposed to get around it, - * other than this. The suspend console is ugly, anyhow. ;-) - */ -#ifndef CONFIG_MACH_XSCALE_PALMLD if (vt_waitactive(SUSPEND_CONSOLE)) { pr_debug("Suspend: Can't switch VCs."); return 1; } -#endif orig_kmsg = kmsg_redirect; kmsg_redirect = SUSPEND_CONSOLE; +#endif return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-28 11:33:18
|
Revision: 646 http://svn.sourceforge.net/hackndev/?rev=646&view=rev Author: bobofdoom Date: 2006-10-28 04:32:19 -0700 (Sat, 28 Oct 2006) Log Message: ----------- palmld: Linking in loobback instead of compiling as module. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig Modified: linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2006-10-23 21:52:29 UTC (rev 645) +++ linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2006-10-28 11:32:19 UTC (rev 646) @@ -429,7 +429,7 @@ # Block devices # # CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-23 21:52:46
|
Revision: 645 http://svn.sourceforge.net/hackndev/?rev=645&view=rev Author: cristianop Date: 2006-10-23 14:52:29 -0700 (Mon, 23 Oct 2006) Log Message: ----------- palmtx: adedd (experimental) support for backlight and for LCD Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h Added Paths: ----------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2006-10-23 21:46:19 UTC (rev 644) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2006-10-23 21:52:29 UTC (rev 645) @@ -14,6 +14,15 @@ Enable support for WM9712 touchscreen and battery for the Palm TX PDA +config PALMTX_LCD + tristate "Palm TX LCD driver" + select BACKLIGHT_LCD_SUPPORT + depends on MACH_XSCALE_PALMTX + default y if MACH_XSCALE_PALMTX + help + LCD driver for Palm TX. + Enable support for switching the Palm TX LCD on/off + config PALMTX_PCMCIA tristate "Palm TX PCMCIA driver" depends on MACH_XSCALE_PALMTX Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-10-23 21:46:19 UTC (rev 644) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-10-23 21:52:29 UTC (rev 645) @@ -4,4 +4,5 @@ # obj-$(CONFIG_MACH_XSCALE_PALMTX) += palmtx.o obj-$(CONFIG_PALMTX_AC97) += palmld_ac97.o +obj-$(CONFIG_PALMTX_LCD) += palmtx_lcd.o #obj-$(CONFIG_PALMTX_PCMCIA) += palmtx_pcmcia.o Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-23 21:46:19 UTC (rev 644) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-23 21:52:29 UTC (rev 645) @@ -23,6 +23,7 @@ #include <linux/platform_device.h> #include <linux/fb.h> #include <linux/input.h> +#include <linux/delay.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -148,6 +149,20 @@ // backlight +static void palmtx_bl_on(void){ + //printk("palmtx: turning backlight on\n"); + SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 1); + //printk("GPIO_NR_PALMTX_BL_POWER: %d\n",GET_GPIO(GPIO_NR_PALMTX_BL_POWER)); + mdelay(50); +} + +static void palmtx_bl_off(void){ + //printk("palmtx: turning backlight off\n"); + SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 0); + //printk("GPIO_NR_PALMTX_BL_POWER: %d\n",GET_GPIO(GPIO_NR_PALMTX_BL_POWER)); + mdelay(50); +} + static struct pxapwmbl_platform_data palmtx_backlight_data = { .pwm = 0, .max_intensity = 0x16c, @@ -155,6 +170,8 @@ .limit_mask = 0x6d, .prescaler = 7, .period = 0x16c, + .turn_bl_on = palmtx_bl_on, + .turn_bl_off = palmtx_bl_off, }; static struct platform_device palmtx_backlight = { @@ -164,7 +181,12 @@ }, }; +// LCD +static struct platform_device palmtx_lcd = { + .name = "palmtx-lcd", +}; + /** * IRDA */ @@ -298,6 +320,7 @@ &palmtx_keypad, &palmtx_ac97, &palmtx_backlight, + &palmtx_lcd, }; @@ -312,7 +335,7 @@ * */ -static struct pxafb_mach_info palmtx_lcd __initdata = { +static struct pxafb_mach_info palmtx_fb __initdata = { .pixclock = 80000, .xres = 320, // PPL + 1 .yres = 480, // LPP + 1 @@ -390,7 +413,7 @@ pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); pxa_gpio_mode(GPIO31_SYNC_AC97_MD); - set_pxa_fb_info(&palmtx_lcd); + set_pxa_fb_info(&palmtx_fb); pxa_set_mci_info( &palmtx_mci_platform_data ); pxa_set_udc_info(&palmtx_udc_mach_info); Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c 2006-10-23 21:52:29 UTC (rev 645) @@ -0,0 +1,154 @@ +/* + * Palm TX LCD driver + * + * Based on Asus MyPal 716 LCD and Backlight driver + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include <linux/module.h> +#include <linux/init.h> +#include <linux/notifier.h> +#include <linux/lcd.h> +#include <linux/fb.h> +#include <linux/delay.h> +#include <linux/platform_device.h> + +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach-types.h> + +#include <asm/hardware.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/pxafb.h> + +#include <asm/arch/palmtx-gpio.h> +#include <asm/arch/palmtx-init.h> + +static int lcd_power; + +int palmtx_lcd_set_power(struct lcd_device *lm, int level) +{ + switch (level) { + case FB_BLANK_UNBLANK: + case FB_BLANK_NORMAL: + // this is very likely incomplete !!! + printk("palmtx_lcd: turning LCD on\n"); + SET_GPIO(GPIO_NR_PALMTX_LCD_POWER, 1); + mdelay(70); + break; + case FB_BLANK_VSYNC_SUSPEND: + case FB_BLANK_HSYNC_SUSPEND: + break; + case FB_BLANK_POWERDOWN: + // this is very likely incomplete !!! + printk("palmtx_lcd: turning LCD off\n"); + SET_GPIO(GPIO_NR_PALMTX_LCD_POWER, 0); + mdelay(65); + break; + } + + lcd_power = level; + + return 0; +} + +static int palmtx_lcd_get_power(struct lcd_device *lm) +{ + printk("palmtx_lcd: power is set to %d", lcd_power); + return lcd_power; +} + +struct lcd_properties palmtx_lcd_properties = +{ + .owner = THIS_MODULE, + .set_power = palmtx_lcd_set_power, + .get_power = palmtx_lcd_get_power, +}; + +static struct lcd_device *pxafb_lcd_device; + + +int palmtx_lcd_probe(struct device *dev) +{ + if (!machine_is_xscale_palmtx()) + return -ENODEV; + + pxafb_lcd_device = lcd_device_register("pxafb", NULL, &palmtx_lcd_properties); + + if (IS_ERR(pxafb_lcd_device)){ + printk("palmtx_lcd_probe: cannot register LCD device\n"); + return -ENOMEM; + } + + printk ("palmtx LCD driver registered\n"); + + return 0; +} + +static int palmtx_lcd_remove(struct device *dev) +{ + lcd_device_unregister(pxafb_lcd_device); + printk ("palmtx LCD driver unregistered\n"); + return 0; +} + +#ifdef CONFIG_PM + +static int palmtx_lcd_suspend(struct device *dev, pm_message_t state) +{ + struct pm_save_data *save; + + if (!dev->power.saved_state) + dev->power.saved_state = kmalloc(sizeof(struct pm_save_data), GFP_KERNEL); + if (!dev->power.saved_state) + return -ENOMEM; + save = dev->power.saved_state; + return 0; +} + +static int palmtx_lcd_resume(struct device *dev) +{ + if (dev->power.saved_state) { + struct pm_save_data *save = dev->power.saved_state; + kfree(dev->power.saved_state); + dev->power.saved_state = NULL; + } + + return 0; +} +#endif + +static struct device_driver palmtx_lcd_driver = { + .name = "palmtx-lcd", + .bus = &platform_bus_type, + .probe = palmtx_lcd_probe, + .remove = palmtx_lcd_remove, +#ifdef CONFIG_PM + .suspend = palmtx_lcd_suspend, + .resume = palmtx_lcd_resume, +#endif +}; + +static int palmtx_lcd_init(void) +{ + if (!machine_is_xscale_palmtx()) + return -ENODEV; + + return driver_register(&palmtx_lcd_driver); +} + +static void palmtx_lcd_exit(void) +{ + lcd_device_unregister(pxafb_lcd_device); + driver_unregister(&palmtx_lcd_driver); +} + +module_init(palmtx_lcd_init); +module_exit(palmtx_lcd_exit); + +MODULE_DESCRIPTION("LCD driver for Palm TX"); +MODULE_LICENSE("GPL"); Property changes on: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c ___________________________________________________________________ Name: svn:executable + * Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2006-10-23 21:46:19 UTC (rev 644) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2006-10-23 21:52:29 UTC (rev 645) @@ -64,6 +64,9 @@ #define GPIO_NR_PALMTX_USB_POWER 95 #define GPIO_NR_PALMTX_USB_PULLUP 93 +#define GPIO_NR_PALMTX_BL_POWER 84 +#define GPIO_NR_PALMTX_LCD_POWER 96 + /* INTERRUPTS */ #define IRQ_GPIO_PALMTX_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTX_SD_DETECT_N) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-23 21:46:32
|
Revision: 644 http://svn.sourceforge.net/hackndev/?rev=644&view=rev Author: cristianop Date: 2006-10-23 14:46:19 -0700 (Mon, 23 Oct 2006) Log Message: ----------- l4p: added (experimental) bl power handling Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-23 19:38:29 UTC (rev 643) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-23 21:46:19 UTC (rev 644) @@ -19,6 +19,8 @@ #include <asm/arch/pxapwm-bl.h> static struct backlight_properties pxapwmbl_data; +static void (*pxapwmbl_mach_turn_bl_on)(void); +static void (*pxapwmbl_mach_turn_bl_off)(void); static void pxapwmbl_send_intensity(struct pxapwmbl_platform_data *bl, int intensity) { @@ -28,6 +30,12 @@ if (bl->limit) intensity &= bl->limit_mask; + // set intensity to 0 if in power saving or fb is blanked + if (bl->power != FB_BLANK_UNBLANK) + intensity = 0; + if (bl->fb_blank != FB_BLANK_UNBLANK) + intensity = 0; + /* Does the backlight frequency need to be configured on a per device basis? * What are sensible defaults? Farcaller had prescaler 2, period 0x12bi (~6.1khz). * LD is configured for 1.2khz. @@ -41,9 +49,17 @@ period = 0; prescaler=0; } - + + //printk("pxapwmbl: setting intensity to %d [bl->intensity=%d]\n", intensity, bl->intensity); spin_lock_irqsave(&bl->lock, flags); + // poweron backlight if possible and needed + if (pxapwmbl_mach_turn_bl_on){ + if ((bl->intensity <= bl->off_threshold) && (intensity > bl->off_threshold)){ + pxapwmbl_mach_turn_bl_on(); + } + } + switch (bl->pwm) { case 0: PWM_CTRL0 = prescaler; @@ -66,6 +82,13 @@ " platform data.\n"); } + // poweroff backlight if possible and needed + if (pxapwmbl_mach_turn_bl_off){ + if ((bl->intensity > bl->off_threshold) && (intensity <= bl->off_threshold)){ + pxapwmbl_mach_turn_bl_off(); + } + } + spin_unlock_irqrestore(&bl->lock, flags); } @@ -139,10 +162,16 @@ pxapwmbl_data.max_brightness = bl->max_intensity; + pxapwmbl_mach_turn_bl_on = bl->turn_bl_on; + pxapwmbl_mach_turn_bl_off = bl->turn_bl_off; + bl->intensity = 0; bl->limit = 0; bl->lock = SPIN_LOCK_UNLOCKED; + bl->power = FB_BLANK_UNBLANK; + bl->off_threshold = 5; + bl->dev = backlight_device_register ("pxapwm-bl", bl, &pxapwmbl_data); if (IS_ERR (bl->dev)) return PTR_ERR (bl->dev); Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2006-10-23 19:38:29 UTC (rev 643) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2006-10-23 21:46:19 UTC (rev 644) @@ -29,10 +29,16 @@ int prescaler; int intensity; - int powermode; + int power; + int fb_blank; int limit; + int off_threshold; + spinlock_t lock; struct backlight_device *dev; + void (*turn_bl_on)(void); + void (*turn_bl_off)(void); + }; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-23 19:39:10
|
Revision: 643 http://svn.sourceforge.net/hackndev/?rev=643&view=rev Author: cristianop Date: 2006-10-23 12:38:29 -0700 (Mon, 23 Oct 2006) Log Message: ----------- palmtx: check also usb detect gpio to determine battery status Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-23 15:52:20 UTC (rev 642) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-23 19:38:29 UTC (rev 643) @@ -283,7 +283,7 @@ void palmld_battery_read_adc(int force) { - u16 reading; + u16 vread; if(!force && ((last_battery_update + 10 *HZ) > jiffies)) return; @@ -293,18 +293,18 @@ down(&digitiser_sem); wm97xx_set_digitiser_power(WM97XX_PRP_DET_DIG); - // todo: check if reading is valid - reading = palmld_ac97_take_reading(WM97XX_ADCSEL_BMON); + vread = palmld_ac97_take_reading(WM97XX_ADCSEL_BMON); wm97xx_set_digitiser_power(WM97XX_PRP_DET); up(&digitiser_sem); + previous_voltage = current_voltage; - current_voltage = reading & 0xfff; - //printk("wm9712: battery -> %d\n", battery_voltage); + current_voltage = vread & 0xfff; last_battery_update = jiffies; up(&battery_update_mutex); } + int palmld_battery_min_voltage(struct battery *b) { return PALMTX_BAT_MIN_VOLTAGE; @@ -317,7 +317,6 @@ } - // let's suppose AVDD=+3.3v so battV = intV * 3 * 0.80586 // note: 0.80586 = 3.3/4095 int palmld_battery_get_voltage(struct battery *b) @@ -327,7 +326,7 @@ return current_voltage * 3 * 80586 / 100000; } else{ - printk("palmld_battery: cannot get voltage -> battery driver unuregistered\n"); + printk("palmld_battery: cannot get voltage -> battery driver unregistered\n"); return 0; } } @@ -335,14 +334,13 @@ int palmld_battery_get_status(struct battery *b) { - int ac_connected = 0; + int ac_connected = GET_GPIO(GPIO_NR_PALMTX_POWER_DETECT); + int usb_connected = !GET_GPIO(GPIO_NR_PALMTX_USB_DETECT); - ac_connected = GET_GPIO(GPIO_NR_PALMTX_POWER_DETECT); - if (current_voltage <= 0) return BATTERY_STATUS_UNKNOWN; - if (ac_connected){ + if (ac_connected || usb_connected){ // TODO: ok maybe this is too stupid ... to be reviewed if ( ( current_voltage > previous_voltage ) || (current_voltage <= PALMTX_BAT_MAX_VOLTAGE) ) return BATTERY_STATUS_CHARGING; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-23 15:52:35
|
Revision: 642 http://svn.sourceforge.net/hackndev/?rev=642&view=rev Author: farcaller Date: 2006-10-23 08:52:20 -0700 (Mon, 23 Oct 2006) Log Message: ----------- palmt3: cpu-freq fixed Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c linux4palm/linux/trunk/drivers/video/pxafb.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c 2006-10-21 21:45:59 UTC (rev 641) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/cpu-pxa.c 2006-10-23 15:52:20 UTC (rev 642) @@ -120,6 +120,14 @@ { /* CPU MEMBUS CCCR DIV2*/ #if defined(CONFIG_PXA25x) +#if defined(CONFIG_MACH_T3XSCALE) + {133000, 99500, 0x123, 1, PXA25x_CCLKCFG}, // 133 * 1 * 1 + {199000, 99500, 0x1a3, 0, PXA25x_CCLKCFG}, // 133 * 1 * 1.5 + {266000, 99500, 0x143, 0, PXA25x_CCLKCFG}, // 133 * 2 * 1 + {399000, 99500, 0x1c3, 0, PXA25x_CCLKCFG}, // 133 * 2 * 1.5 + //{441000, 99500, 0x1c4, 0, PXA25x_CCLKCFG}, // 147 * 2 * 1.5 FIXME: doesn't work? + //{472000, 99500, 0x242, 0, PXA25x_CCLKCFG}, // 118 * 2 * 2 FIXME: is that stabe enough? +#else #if defined(CONFIG_PXA25x_ALTERNATE_FREQS) { 99500, 99500, 0x121, 1, PXA25x_CCLKCFG}, /* run=99, turbo= 99, PXbus=50, SDRAM=50 */ {199100, 99500, 0x221, 0, PXA25x_CCLKCFG}, /* run=99, turbo=199, PXbus=50, SDRAM=99 */ @@ -134,6 +142,7 @@ {331800, 165900, 0x145, 1, PXA25x_CCLKCFG}, /* run=331, turbo=331, PXbus=166, SDRAM=83 */ {398100, 99500, 0x161, 0, PXA25x_CCLKCFG} /* run=398, turbo=398, PXbus=196, SDRAM=99 */ #endif +#endif #elif defined(CONFIG_PXA27x) {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, PXA27x_CCLKCFG(1, 0, 1)}, {156000, 104000, PXA27x_CCCR(1, 8, 6), 0, PXA27x_CCLKCFG(1, 1, 1)}, @@ -221,6 +230,7 @@ * we need to preset the smaller DRI before the change. If we're speeding * up we need to set the larger DRI value after the change. */ +#ifndef CONFIG_MACH_T3XSCALE preset_mdrefr = postset_mdrefr = MDREFR; if((MDREFR & MDREFR_DRI_MASK) > MDREFR_DRI(pxa2xx_freqs[idx].membus)) { preset_mdrefr = (preset_mdrefr & ~MDREFR_DRI_MASK) | @@ -252,7 +262,7 @@ postset_mdrefr &= ~MDREFR_K0DB4; postset_mdrefr |= MDREFR_K0DB2; } - +#endif cclkcfg = pxa2xx_freqs[idx].cclkcfg; if (freq_debug) { @@ -281,8 +291,26 @@ * The current values in the pxa2xx_freqs table don't do this, so the code * is unimplemented. */ - +#ifdef CONFIG_MACH_T3XSCALE __asm__ __volatile__(" \ + /*ldr r4, [%1] ;*/ /* load MDREFR */ \ + b 2f ; \ + .align 5 ; \ +1: \ + /*str %3, [%1] ;*/ /* preset the MDREFR */ \ + mcr p14, 0, %2, c6, c0, 0 ; /* set CCLKCFG[FCS] */ \ + /*str %4, [%1] ;*/ /* postset the MDREFR */ \ + \ + b 3f ; \ +2: b 1b ; \ +3: nop ; \ + " + : "=&r" (unused) + : "r" (&MDREFR), "r" (cclkcfg), + "r" (preset_mdrefr), "r" (postset_mdrefr) + : "r4", "r5"); +#else + __asm__ __volatile__(" \ ldr r4, [%1] ; /* load MDREFR */ \ b 2f ; \ .align 5 ; \ @@ -299,6 +327,7 @@ : "r" (&MDREFR), "r" (cclkcfg), \ "r" (preset_mdrefr), "r" (postset_mdrefr) : "r4", "r5"); +#endif local_irq_restore(flags); if (freq_debug) { Modified: linux4palm/linux/trunk/drivers/video/pxafb.c =================================================================== --- linux4palm/linux/trunk/drivers/video/pxafb.c 2006-10-21 21:45:59 UTC (rev 641) +++ linux4palm/linux/trunk/drivers/video/pxafb.c 2006-10-23 15:52:20 UTC (rev 642) @@ -1362,11 +1362,13 @@ #endif #ifdef CONFIG_CPU_FREQ +#ifndef CONFIG_MACH_T3XSCALE fbi->freq_transition.notifier_call = pxafb_freq_transition; fbi->freq_policy.notifier_call = pxafb_freq_policy; cpufreq_register_notifier(&fbi->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); cpufreq_register_notifier(&fbi->freq_policy, CPUFREQ_POLICY_NOTIFIER); #endif +#endif /* * Ok, now enable the LCD controller This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-10-21 21:46:13
|
Revision: 641 http://svn.sourceforge.net/hackndev/?rev=641&view=rev Author: marex_z71 Date: 2006-10-21 14:45:59 -0700 (Sat, 21 Oct 2006) Log Message: ----------- l4p: PalmLD LED driver - use over sysfs, no triggers set Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c linux4palm/linux/trunk/drivers/leds/Kconfig linux4palm/linux/trunk/drivers/leds/Makefile Added Paths: ----------- linux4palm/linux/trunk/drivers/leds/leds-palmld.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2006-10-21 09:47:47 UTC (rev 640) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2006-10-21 21:45:59 UTC (rev 641) @@ -195,6 +195,14 @@ /* platform */ +/* + * LEDs + */ +static struct platform_device palmldled_device = { + .name = "palmld-led", + .id = -1, +}; + /** * Backlight */ @@ -278,6 +286,7 @@ static struct platform_device *devices[] __initdata = { &palmld_kbd, &palmld_ac97, &palmld_ide, &palmld_backlight, + &palmldled_device, }; /********************************************************* Modified: linux4palm/linux/trunk/drivers/leds/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/leds/Kconfig 2006-10-21 09:47:47 UTC (rev 640) +++ linux4palm/linux/trunk/drivers/leds/Kconfig 2006-10-21 21:45:59 UTC (rev 641) @@ -76,6 +76,12 @@ This option enables support for the LEDs connected to the AIC3 MA17635 0450 v1.1 MPU Timing Generator. +config LEDS_PALMLD + tristate "LED Support for Palm LifeDrive" + depends LEDS_CLASS && MACH_XSCALE_PALMLD + help + This option enables support for the LEDs on Palm LifeDrive. + comment "LED Triggers" config LEDS_TRIGGERS Modified: linux4palm/linux/trunk/drivers/leds/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/leds/Makefile 2006-10-21 09:47:47 UTC (rev 640) +++ linux4palm/linux/trunk/drivers/leds/Makefile 2006-10-21 21:45:59 UTC (rev 641) @@ -13,6 +13,7 @@ obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o obj-$(CONFIG_LEDS_H2200) += h2200_leds.o obj-$(CONFIG_LEDS_MAGICIAN) += leds-magician.o +obj-$(CONFIG_LEDS_PALMLD) += leds-palmld.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o Added: linux4palm/linux/trunk/drivers/leds/leds-palmld.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmld.c (rev 0) +++ linux4palm/linux/trunk/drivers/leds/leds-palmld.c 2006-10-21 21:45:59 UTC (rev 641) @@ -0,0 +1,114 @@ +/* + * Palm LifeDrive LED Driver + * + * Author: Marek Vasut <mar...@gm...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include <linux/config.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/leds.h> +#include <asm/mach-types.h> +#include <asm/arch/palmld-gpio.h> +#include <asm/arch/hardware.h> +#include <asm/arch/pxa-regs.h> +#include <asm/hardware/scoop.h> + +static void palmldled_amber_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value) + SET_PALMLD_GPIO(ORANGE_LED,1); + else + SET_PALMLD_GPIO(ORANGE_LED,0); +} + +static void palmldled_green_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value) + SET_PALMLD_GPIO(GREEN_LED,1); + else + SET_PALMLD_GPIO(GREEN_LED,0); +} + +static struct led_classdev palmld_amber_led = { + .name = "palmld:amber", + .brightness_set = palmldled_amber_set, +}; + +static struct led_classdev palmld_green_led = { + .name = "palmld:green", + .brightness_set = palmldled_green_set, +}; + +#ifdef CONFIG_PM +static int palmldled_suspend(struct platform_device *dev, pm_message_t state) +{ + led_classdev_suspend(&palmld_amber_led); + led_classdev_suspend(&palmld_green_led); + return 0; +} + +static int palmldled_resume(struct platform_device *dev) +{ + led_classdev_resume(&palmld_amber_led); + led_classdev_resume(&palmld_green_led); + return 0; +} +#endif + +static int palmldled_probe(struct platform_device *pdev) +{ + int ret; + + ret = led_classdev_register(&pdev->dev, &palmld_amber_led); + if (ret < 0) + return ret; + + ret = led_classdev_register(&pdev->dev, &palmld_green_led); + if (ret < 0) + led_classdev_unregister(&palmld_amber_led); + + return ret; +} + +static int palmldled_remove(struct platform_device *pdev) +{ + led_classdev_unregister(&palmld_amber_led); + led_classdev_unregister(&palmld_green_led); + return 0; +} + +static struct platform_driver palmldled_driver = { + .probe = palmldled_probe, + .remove = palmldled_remove, +#ifdef CONFIG_PM + .suspend = palmldled_suspend, + .resume = palmldled_resume, +#endif + .driver = { + .name = "palmld-led", + }, +}; + +static int __init palmldled_init(void) +{ + return platform_driver_register(&palmldled_driver); +} + +static void __exit palmldled_exit(void) +{ + platform_driver_unregister(&palmldled_driver); +} + +module_init(palmldled_init); +module_exit(palmldled_exit); + +MODULE_AUTHOR("Marek Vasut <mar...@gm...>"); +MODULE_DESCRIPTION("Palm LifeDrive LED driver"); +MODULE_LICENSE("GPL"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-21 09:47:55
|
Revision: 640 http://svn.sourceforge.net/hackndev/?rev=640&view=rev Author: cristianop Date: 2006-10-21 02:47:47 -0700 (Sat, 21 Oct 2006) Log Message: ----------- palmtx: fixed battery support Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-20 18:49:32 UTC (rev 639) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-21 09:47:47 UTC (rev 640) @@ -6,14 +6,8 @@ * Based on palmld_ac97.c code from Alex Osborne * */ + -/* TODO: - - change DIG2_INIT to DIG2_BASE (useless to make an aasignment) - - fix battery code - - add battery charge - - suspend/resume (after having the TX ready for PM ...) -*/ - #include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -91,7 +85,8 @@ static ac97_t *ac97; -static unsigned long last_update = 0; +static int battery_registered = 0; +static unsigned long last_battery_update = 0; static int current_voltage; static int previous_voltage; static u16 d2base; @@ -283,8 +278,93 @@ return IRQ_HANDLED; } +/* battery */ +void palmld_battery_read_adc(int force) +{ + u16 reading; + + if(!force && ((last_battery_update + 10 *HZ) > jiffies)) + return; + + if(down_trylock(&battery_update_mutex)) + return; + + down(&digitiser_sem); + wm97xx_set_digitiser_power(WM97XX_PRP_DET_DIG); + // todo: check if reading is valid + reading = palmld_ac97_take_reading(WM97XX_ADCSEL_BMON); + wm97xx_set_digitiser_power(WM97XX_PRP_DET); + up(&digitiser_sem); + previous_voltage = current_voltage; + current_voltage = reading & 0xfff; + //printk("wm9712: battery -> %d\n", battery_voltage); + last_battery_update = jiffies; + + up(&battery_update_mutex); +} + +int palmld_battery_min_voltage(struct battery *b) +{ + return PALMTX_BAT_MIN_VOLTAGE; +} + + +int palmld_battery_max_voltage(struct battery *b) +{ + return PALMTX_BAT_MAX_VOLTAGE; /* mV */ +} + + + +// let's suppose AVDD=+3.3v so battV = intV * 3 * 0.80586 +// note: 0.80586 = 3.3/4095 +int palmld_battery_get_voltage(struct battery *b) +{ + if (battery_registered){ + palmld_battery_read_adc(0); + return current_voltage * 3 * 80586 / 100000; + } + else{ + printk("palmld_battery: cannot get voltage -> battery driver unuregistered\n"); + return 0; + } +} + + +int palmld_battery_get_status(struct battery *b) +{ + int ac_connected = 0; + + ac_connected = GET_GPIO(GPIO_NR_PALMTX_POWER_DETECT); + + if (current_voltage <= 0) + return BATTERY_STATUS_UNKNOWN; + + if (ac_connected){ + // TODO: ok maybe this is too stupid ... to be reviewed + if ( ( current_voltage > previous_voltage ) || (current_voltage <= PALMTX_BAT_MAX_VOLTAGE) ) + return BATTERY_STATUS_CHARGING; + return BATTERY_STATUS_NOT_CHARGING; + } + else + return BATTERY_STATUS_DISCHARGING; +} + + +struct battery palmtx_battery = { + .name = "palmtx-battery", + .id = "battery0", + .get_min_voltage = palmld_battery_min_voltage, + .get_max_voltage = palmld_battery_max_voltage, + .get_voltage = palmld_battery_get_voltage, + .get_status = palmld_battery_get_status, +}; + + + + static int __init palmld_ac97_probe(struct device *dev) { int err; @@ -347,6 +427,15 @@ palmld_ac97_input->id.bustype = BUS_HOST; input_register_device(palmld_ac97_input); + /* register battery */ + + if(battery_class_register(&palmtx_battery)) { + printk(KERN_ERR "palmld_ac97_probe: could not register battery class\n"); + } + else{ + battery_registered = 1; + } + /* setup work queue */ palmld_ac97_workqueue = create_workqueue(palmld_ac97_WORK_QUEUE_NAME); INIT_WORK(&palmld_ac97_irq_task, palmld_ac97_irq_work, dev); @@ -360,6 +449,7 @@ { // TODO: stop running tasks if any? + battery_class_unregister(&palmtx_battery); ac97 = NULL; input_unregister_device(palmld_ac97_input); return 0; Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-20 18:49:32 UTC (rev 639) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-21 09:47:47 UTC (rev 640) @@ -146,43 +146,6 @@ }; -// static int palmtx_keypad_matrix[] = { -// /* row 0 */ -// KEY_POWER, -// KEY_F9, -// KEY_ENTER, -// /* row 1 */ -// KEY_F10, -// KEY_F11, -// KEY_F12, -// /* row 2 */ -// KEY_UP, -// -1, -// KEY_DOWN, -// /* row 3 */ -// KEY_RIGHT, -// -1, -// KEY_LEFT, -// }; - - -/* -static struct pxa27x_keypad_platform_data palmtx_keypad_data = { - .matrix = palmtx_keypad_matrix, - .rows = 4, - .cols = 3, -}; - -struct platform_device palmtx_keypad = { - .name = "pxa27x-keypad", - .id = -1, - .dev = { - .platform_data = &palmtx_keypad_data - }, -}; - -*/ - // backlight static struct pxapwmbl_platform_data palmtx_backlight_data = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-20 18:49:51
|
Revision: 639 http://svn.sourceforge.net/hackndev/?rev=639&view=rev Author: cristianop Date: 2006-10-20 11:49:32 -0700 (Fri, 20 Oct 2006) Log Message: ----------- palmtx: first batch of changes for new kernel Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c linux4palm/linux/trunk/drivers/input/keyboard/Kconfig linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-ac97.h Modified: linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2006-10-20 18:49:32 UTC (rev 639) @@ -1,13 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16-hnd0 -# Mon Sep 18 19:46:51 2006 +# Linux kernel version: 2.6.17-hnd0 +# Fri Oct 20 20:36:57 2006 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 # # Code maturity level options @@ -29,7 +31,10 @@ # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set # CONFIG_MINIMAL_OOPS is not set -CONFIG_INITRAMFS_SOURCE="" +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="../initramfs/root" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set @@ -45,10 +50,6 @@ CONFIG_SHMEM=y CONFIG_USELIB=y CONFIG_CORE_DUMP=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 @@ -60,7 +61,6 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -68,6 +68,7 @@ # # Block layer # +# CONFIG_BLK_DEV_IO_TRACE is not set # # IO Schedulers @@ -89,11 +90,13 @@ # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set CONFIG_ARCH_PXA=y # CONFIG_ARCH_RPC is not set @@ -113,6 +116,7 @@ # Intel PXA2xx Implementations # # CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set # CONFIG_MACH_MAINSTONE is not set # CONFIG_ARCH_PXA_IDP is not set # CONFIG_ARCH_ESERIES is not set @@ -126,6 +130,12 @@ # CONFIG_MACH_HX2750 is not set # CONFIG_ARCH_H5400 is not set # CONFIG_MACH_HIMALAYA is not set +# CONFIG_MACH_HTCUNIVERSAL is not set +# CONFIG_MACH_HTCALPINE is not set +# CONFIG_MACH_MAGICIAN is not set +# CONFIG_MACH_HTCAPACHE is not set +# CONFIG_MACH_BLUEANGEL is not set +# CONFIG_MACH_HTCBEETLES is not set # CONFIG_ARCH_AXIMX5 is not set # CONFIG_ARCH_AXIMX3 is not set # CONFIG_ARCH_ROVERP1 is not set @@ -142,6 +152,7 @@ # CONFIG_MACH_OMAP_PALMTC is not set # CONFIG_PXA_SHARPSL is not set CONFIG_PXA27x=y +CONFIG_PXA_RTC_EPOCH=1970 # CONFIG_SA1100_H3100 is not set # CONFIG_SA1100_H3600 is not set # CONFIG_SA1100_H3800 is not set @@ -167,6 +178,7 @@ CONFIG_ARM_THUMB=y # CONFIG_ARMBOOT_PROC is not set CONFIG_XSCALE_PMU=y +# CONFIG_KEXEC is not set # # Compaq/iPAQ Platforms @@ -195,6 +207,7 @@ # # CONFIG_PREEMPT is not set CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 # CONFIG_AEABI is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set CONFIG_SELECT_MEMORY_MODEL=y @@ -212,7 +225,7 @@ # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/ram0 rw mem=32m init=/linuxrc initrd=0xa0400000,330615" +CONFIG_CMDLINE="mem=32M" # CONFIG_XIP_KERNEL is not set # @@ -272,12 +285,15 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set # CONFIG_NETFILTER is not set # @@ -524,12 +540,13 @@ # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_PXA27x=m CONFIG_KEYBOARD_PALMIR=m -CONFIG_KEYBOARD_PXA27X=m # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_UINPUT is not set # # Hardware I/O ports @@ -599,9 +616,7 @@ # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCA9535 is not set # CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_MAX6875 is not set -# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -652,6 +667,7 @@ # SPI Master Controller Drivers # CONFIG_SPI_BITBANG=y +CONFIG_SPI_PXA2XX=y # # SPI Protocol Masters @@ -723,13 +739,23 @@ # CONFIG_MCP is not set # -# Multimedia Capabilities Port drivers +# LED devices # +# CONFIG_NEW_LEDS is not set # +# LED drivers +# + +# +# LED Triggers +# + +# # Multimedia devices # # CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -744,6 +770,7 @@ CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set +CONFIG_FB_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_IMAGEON is not set @@ -773,6 +800,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_BACKLIGHT_DEVICE=y +# CONFIG_BACKLIGHT_CORGI is not set CONFIG_BACKLIGHT_PXAPWM=m CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_DEVICE=y @@ -793,9 +821,11 @@ CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_SEQUENCER_OSS=y # CONFIG_SND_DYNAMIC_MINORS is not set # CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -816,7 +846,10 @@ # CONFIG_SND_A716 is not set # CONFIG_SND_H1910 is not set # CONFIG_SND_H2200 is not set +# CONFIG_SND_H4000 is not set +# CONFIG_SND_HTCMAGICIAN is not set # CONFIG_SND_HX4700 is not set +# CONFIG_SND_HTCUNIVERSAL is not set # CONFIG_SND_H5XXX_AK4535 is not set CONFIG_SND_PXA2xx_I2SOUND=m CONFIG_SND_PXA2XX_PCM=m @@ -832,6 +865,7 @@ # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set # CONFIG_USB is not set # @@ -841,18 +875,19 @@ # # USB Gadget Support # -CONFIG_USB_GADGET=y +CONFIG_USB_GADGET=m # CONFIG_USB_GADGET_DEBUG_FILES is not set CONFIG_USB_GADGET_SELECTED=y # CONFIG_USB_GADGET_NET2280 is not set # CONFIG_USB_GADGET_PXA2XX is not set CONFIG_USB_GADGET_PXA27X=y -CONFIG_USB_PXA27X=y +CONFIG_USB_PXA27X=m # CONFIG_USB_PXA27X_DMA is not set # CONFIG_USB_GADGET_GOKU is not set # CONFIG_USB_GADGET_MQ11XX is not set # CONFIG_USB_GADGET_LH7A40X is not set # CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set # CONFIG_USB_GADGET_DUMMY_HCD is not set # CONFIG_USB_GADGET_DUALSPEED is not set # CONFIG_USB_ZERO is not set @@ -877,11 +912,30 @@ # CONFIG_MMC_WBSD_PALMT3 is not set # -# LED devices +# Real Time Clock # -# CONFIG_CLASS_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=m # +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=m +CONFIG_RTC_INTF_PROC=m +CONFIG_RTC_INTF_DEV=m + +# +# RTC drivers +# +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_M48T86 is not set +CONFIG_RTC_DRV_SA1100=m +# CONFIG_RTC_DRV_TEST is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -926,7 +980,6 @@ CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -949,7 +1002,7 @@ # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -# CONFIG_UNION_FS is not set +CONFIG_UNION_FS=m # # Network File Systems @@ -1036,7 +1089,9 @@ # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y +# CONFIG_UNWIND_INFO is not set # CONFIG_DEBUG_USER is not set # @@ -1058,7 +1113,7 @@ # Library routines # CONFIG_CRC_CCITT=y -# CONFIG_CRC16 is not set +CONFIG_CRC16=m CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set +CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2006-10-20 18:49:32 UTC (rev 639) @@ -10,7 +10,9 @@ depends on MACH_XSCALE_PALMTX default y if MACH_XSCALE_PALMTX help - AC97 codec for Palm TX + AC97 codec for Palm TX. + Enable support for WM9712 touchscreen and battery for + the Palm TX PDA config PALMTX_PCMCIA tristate "Palm TX PCMCIA driver" @@ -27,10 +29,3 @@ help Enable core debug output for Palm TX modules. -config PALMTX_AC97_DEBUG - bool "Debug for Palm TX AC97 driver" - depends on PALMTX_DEBUG && PALMTX_AC97 - default y if PALMTX_DEBUG && PALMTX_AC97 - help - Enable debug output for Palm TX AC97 module. - Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-10-20 18:49:32 UTC (rev 639) @@ -4,4 +4,4 @@ # obj-$(CONFIG_MACH_XSCALE_PALMTX) += palmtx.o obj-$(CONFIG_PALMTX_AC97) += palmld_ac97.o -obj-$(CONFIG_PALMTX_PCMCIA) += palmld_pcmcia.o +#obj-$(CONFIG_PALMTX_PCMCIA) += palmtx_pcmcia.o Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-10-20 18:49:32 UTC (rev 639) @@ -1,12 +1,19 @@ /* - * linux/arch/arm/mach-pxa/palmld/palmld_ac97.c + * linux/arch/arm/mach-pxa/palmtx/palmld_ac97.c * - * Touchscreen/battery driver for Palm LifeDrive's WM9712 AC97 codec. + * Touchscreen/battery driver for Palm TX' WM9712 AC97 codec * - * Author: Alex Osborne <bob...@gm...> - * Cristiano P. - adapted for Palm TX + * Based on palmld_ac97.c code from Alex Osborne + * */ +/* TODO: + - change DIG2_INIT to DIG2_BASE (useless to make an aasignment) + - fix battery code + - add battery charge + - suspend/resume (after having the TX ready for PM ...) +*/ + #include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -19,41 +26,41 @@ #include <asm/apm.h> #include <asm/delay.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> #include <asm/arch/hardware.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/irqs.h> -#include <asm/arch/palmtx-gpio.h> -#include <asm/arch/palmtx-init.h> -#include <asm/arch/palmld-ac97.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> - #include <sound/driver.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/initval.h> #include <sound/ac97_codec.h> -#define X_AXIS_MAX 3900 //3630 -#define X_AXIS_MIN 350 //200 -#define Y_AXIS_MAX 3750 //3880 -#define Y_AXIS_MIN 320 //160 -#define PRESSURE_MIN 0 -#define PRESSURE_MAX 150 //300 +#include <asm/arch/palmtx-gpio.h> +#include <asm/arch/palmtx-init.h> +#include <asm/arch/palmld-ac97.h> -#define DIG2_INIT 0x0001 /* initial value for digitiser2 register */ -#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */ +#define X_AXIS_MAX 3900 +#define X_AXIS_MIN 350 +#define Y_AXIS_MAX 3750 +#define Y_AXIS_MIN 320 +#define PRESSURE_MIN 0 +#define PRESSURE_MAX 150 +#define DIG2_INIT 0x0001 /* initial value for digitiser2 reg */ + #define DEFAULT_PRESSURE_TRESHOLD 45160 /* default pressure treshold for pen up/down */ #define DEFAULT_X_AXIS_FUZZ 5 /* default x axis noise treshold */ #define DEFAULT_Y_AXIS_FUZZ 35 /* default y axis noise treshold */ #define PRESSURE_FUZZ 5 /* default pressure noise treshold */ -#define palmld_ac97_WORK_QUEUE_NAME "palmld_ac97.c" +#define palmld_ac97_WORK_QUEUE_NAME "palmld_ac97_workqueue" +/* module parameters */ static int ptrsh = DEFAULT_PRESSURE_TRESHOLD; module_param(ptrsh, int, 0); @@ -71,6 +78,7 @@ module_param(ydjtrsh, int, 0); MODULE_PARM_DESC(ydjtrsh, "treshold for y axis jitter"); + static DECLARE_MUTEX_LOCKED(queue_sem); static DECLARE_MUTEX(digitiser_sem); static DECLARE_MUTEX(battery_update_mutex); @@ -81,23 +89,18 @@ struct input_dev *palmld_ac97_input; struct device *palmld_ac97_dev; +static ac97_t *ac97; + static unsigned long last_update = 0; -static int battery_voltage; +static int current_voltage; static int previous_voltage; static u16 d2base; - -#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) -/* original APM hook */ -static void (*apm_get_power_status_orig)(struct apm_power_info *info); -#endif - - /* * ac97 codec */ -void wm97xx_gpio_func(ac97_t *ac97, int gpio, int func) +void wm97xx_gpio_func(int gpio, int func) { int GEn; GEn = ac97->bus->ops->read(ac97, 0x56); @@ -109,8 +112,7 @@ } -void wm97xx_gpio_mode(ac97_t *ac97, int gpio, int config, int polarity, - int sticky, int wakeup) +void wm97xx_gpio_mode(int gpio, int config, int polarity, int sticky, int wakeup) { int GCn, GPn, GSn, GWn; GCn = ac97->bus->ops->read(ac97, 0x4c); @@ -145,10 +147,8 @@ } -static void wm97xx_set_digitiser_power(struct device *dev, int value) +static void wm97xx_set_digitiser_power(int value) { - ac97_t *ac97 = dev->platform_data; - ac97->bus->ops->write(ac97, AC97_WM97XX_DIGITISER2, d2base | value); } @@ -160,18 +160,18 @@ * (PXA27x Specification Update: 28007109.pdf sec.: E54) */ -static int palmld_ac97_take_reading(struct device *dev, int adcsel) +static int palmld_ac97_take_reading(int adcsel) { - ac97_t *ac97 = dev->platform_data; int timeout = 15; u16 r76 = 0; u16 r7a; - r76 |= adcsel; /* set ADCSEL (ADC source) */ - r76 |= WM97XX_DELAY(3); /* set settling time delay DELAY */ - r76 &= ~(1<<11); /* COO = 0 (single measurement) */ - r76 &= ~(1<<10); /* CTC = 0 (polling mode) */ - r76 |= (1<<15); /* initiate measurement (POLL) */ + r76 |= adcsel; /* set ADCSEL (ADC source) */ + r76 |= WM97XX_DELAY(3); /* set settling time delay */ + r76 &= ~(1<<11); /* COO = 0 (single measurement) */ + r76 &= ~(1<<10); /* CTC = 0 (polling mode) */ + r76 |= (1<<15); /* initiate measurement (POLL) */ + ac97->bus->ops->write(ac97, 0x76, r76); // wait settling time @@ -184,14 +184,14 @@ } if (timeout == 0){ - printk("wm9712: discarding reading due to POLL wait timout on 0x76\n"); + printk("palmld_ac97: discarding reading due to POLL wait timout on 0x76\n"); return 0; } r7a = ac97->bus->ops->read(ac97, 0x7a); if ((r7a & WM97XX_ADCSEL_MASK) != adcsel){ - printk("wm9712: discarding reading -> wrong ADC source\n"); + printk("palmld_ac97: discarding reading -> wrong ADC source\n"); return 0; } @@ -199,158 +199,17 @@ } - -/* - * battery - */ - -void update_data(int force) +static void palmld_ac97_pendown(void) { - u16 reading; - - if(!force && ((last_update + 10 *HZ) > jiffies)) - return; - - if(down_trylock(&battery_update_mutex)) - return; - - down(&digitiser_sem); - //wm97xx_set_digitiser_power(palmld_ac97_dev, WM97XX_PRP_DET_DIG); - wm97xx_set_digitiser_power(palmld_ac97_dev, WM97XX_PRP_DET_DIG); - // todo: check if reading is valid - reading = palmld_ac97_take_reading(palmld_ac97_dev, WM97XX_ADCSEL_BMON); - wm97xx_set_digitiser_power(palmld_ac97_dev, WM97XX_PRP_DET); - up(&digitiser_sem); - previous_voltage = battery_voltage; - battery_voltage = reading & 0xfff; - //printk("wm9712: battery -> %d\n", battery_voltage); - last_update = jiffies; - - up(&battery_update_mutex); -} - -#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) -static void palmtx_apm_get_power_status(struct apm_power_info *info){ - update_data(0); - info->ac_line_status = (GET_GPIO(GPIO_NR_PALMTX_POWER_DETECT)) ? APM_AC_ONLINE : APM_AC_OFFLINE; - // TODO: correct this stuff ... (see correct formula into get_voltage() ) - if (info->ac_line_status == APM_AC_ONLINE) - info->battery_status = APM_BATTERY_STATUS_CHARGING; - - if (battery_voltage * 3 > PALMTX_BAT_MAX_VOLTAGE - 200) - info->battery_status = APM_BATTERY_STATUS_HIGH; - else if (battery_voltage * 3 <= PALMTX_BAT_MIN_VOLTAGE) - info->battery_status = APM_BATTERY_STATUS_CRITICAL; - else - info->battery_status = APM_BATTERY_STATUS_LOW; - -} -#endif - - -int get_min_voltage(struct battery *b) -{ - return PALMTX_BAT_MIN_VOLTAGE; -} - -int get_min_charge(struct battery *b) -{ - return PALMTX_BAT_MIN_CHARGE; -} - -int get_max_voltage(struct battery *b) -{ - return PALMTX_BAT_MAX_VOLTAGE; /* mV */ -} - -int get_max_charge(struct battery *b) -{ - return PALMTX_BAT_MAX_CHARGE; -} - -// let's suppose AVDD=+3.3v so battV = intV * 3 * 0.80586 -// note: 0.80586 = 3.3/4095 -int get_voltage(struct battery *b) -{ - update_data(0); - return battery_voltage * 3 * 80586 / 100000; -} - -int get_charge(struct battery *b) -{ - return 0; -} - -int get_status(struct battery *b) -{ - int ac_connected = 0; - - ac_connected = GET_GPIO(GPIO_NR_PALMTX_POWER_DETECT); - - if (battery_voltage <= 0) - return BATTERY_STATUS_UNKNOWN; - - if (ac_connected){ - // TODO: ok maybe this is too stupid ... to be reviewed - if ( ( battery_voltage > previous_voltage ) || (battery_voltage <= PALMTX_BAT_MAX_VOLTAGE) ) - return BATTERY_STATUS_CHARGING; - return BATTERY_STATUS_NOT_CHARGING; - } - else - return BATTERY_STATUS_DISCHARGING; -} - -static struct battery palmld_battery = { - .name = "palmtx-battery", - .id = "battery0", - .get_min_voltage = get_min_voltage, - .get_min_current = NULL, - .get_min_charge = get_min_charge, - .get_max_voltage = get_max_voltage, - .get_max_current = NULL, - .get_max_charge = get_max_charge, - .get_temp = NULL, - .get_voltage = get_voltage, - .get_current = NULL, - .get_charge = get_charge, - .get_status = get_status, -}; - -/* -static int -battery_class_hotplug(struct class_device *dev, char **envp, int num_envp, - char *buffer, int buffer_size) -{ - return 0; -} -*/ - -static void -battery_class_release(struct class_device *dev) -{ -} - -static void -battery_class_class_release(struct class *class) -{ -} - - -/* - * touchscreen - */ - -static void palmld_ac97_pendown(struct device *dev) -{ int xread, yread, pressure; int valid_coords=0, btn_pressed = 0; /* take readings until the pen goes up */ do { /* take readings */ - xread = palmld_ac97_take_reading(dev, WM97XX_ADCSEL_X); - yread = palmld_ac97_take_reading(dev, WM97XX_ADCSEL_Y); - pressure = palmld_ac97_take_reading(dev, WM97XX_ADCSEL_PRES); + xread = palmld_ac97_take_reading(WM97XX_ADCSEL_X); + yread = palmld_ac97_take_reading(WM97XX_ADCSEL_Y); + pressure = palmld_ac97_take_reading(WM97XX_ADCSEL_PRES); valid_coords = (xread & 0xfff) && (yread & 0xfff) && (pressure & 0xfff); @@ -382,8 +241,8 @@ static void palmld_ac97_irq_work(void *data) { - struct device *dev = data; - ac97_t *ac97 = dev->platform_data; + //struct device *dev = data; + //ac97_t *ac97 = dev->platform_data; u16 levels; u16 polarity; @@ -393,12 +252,12 @@ if(polarity & levels & WM97XX_GPIO_13) { // power up digitiser: down(&digitiser_sem); - wm97xx_set_digitiser_power(dev, WM97XX_PRP_DET_DIG); + wm97xx_set_digitiser_power(WM97XX_PRP_DET_DIG); - palmld_ac97_pendown(dev); + palmld_ac97_pendown(); /* power down digitiser to conserve power */ - wm97xx_set_digitiser_power(dev, WM97XX_PRP_DET); + wm97xx_set_digitiser_power(WM97XX_PRP_DET); ac97->bus->ops->write(ac97, 0x4e, polarity & ~WM97XX_GPIO_13); up(&digitiser_sem); } @@ -420,6 +279,7 @@ disable_irq(IRQ_GPIO_PALMTX_WM9712_IRQ); queue_work(palmld_ac97_workqueue, &palmld_ac97_irq_task); } + return IRQ_HANDLED; } @@ -428,19 +288,18 @@ static int __init palmld_ac97_probe(struct device *dev) { int err; - ac97_t *ac97 = dev->platform_data; u16 d2 = DIG2_INIT; // init d1 too? - + if(!machine_is_xscale_palmtx()) return -ENODEV; - /* for use by battery level monitor */ - palmld_ac97_dev = dev; + ac97 = to_ac97_t(dev); set_irq_type(IRQ_GPIO_PALMTX_WM9712_IRQ, IRQT_RISING); + err = request_irq(IRQ_GPIO_PALMTX_WM9712_IRQ, palmld_ac97_irq_handler, SA_INTERRUPT, "WM9712 pendown IRQ", dev); - + if(err) { printk(KERN_ERR "palmld_ac97_probe: cannot request pen down IRQ\n"); return -1; @@ -453,25 +312,29 @@ d2 |= WM97XX_PRP_DET; d2base = d2; ac97->bus->ops->write(ac97, AC97_WM97XX_DIGITISER2, d2base); - + /* enable interrupts on codec's gpio 2 (connected to cpu gpio 27) */ - wm97xx_gpio_mode(ac97, WM97XX_GPIO_2, WM97XX_GPIO_IN, - WM97XX_GPIO_POL_HIGH, WM97XX_GPIO_NOTSTICKY, WM97XX_GPIO_NOWAKE); - wm97xx_gpio_func(ac97, WM97XX_GPIO_2, 0); + wm97xx_gpio_mode(WM97XX_GPIO_2, WM97XX_GPIO_IN, WM97XX_GPIO_POL_HIGH, + WM97XX_GPIO_NOTSTICKY, WM97XX_GPIO_NOWAKE); + wm97xx_gpio_func(WM97XX_GPIO_2, 0); /* enable pen detect interrupt */ - wm97xx_gpio_mode(ac97, WM97XX_GPIO_13, WM97XX_GPIO_IN, - WM97XX_GPIO_POL_HIGH, WM97XX_GPIO_STICKY, WM97XX_GPIO_WAKE); - - + wm97xx_gpio_mode(WM97XX_GPIO_13, WM97XX_GPIO_IN, WM97XX_GPIO_POL_HIGH, + WM97XX_GPIO_STICKY, WM97XX_GPIO_WAKE); + /* turn off irq gpio inverting */ ac97->bus->ops->write(ac97, 0x58, ac97->bus->ops->read(ac97, 0x58)&~1); /* turn on the digitiser and pen down detector */ ac97->bus->ops->write(ac97, AC97_WM97XX_DIGITISER2, d2base | WM97XX_PRP_DETW); - + /* setup the input device */ palmld_ac97_input = input_allocate_device(); + if (palmld_ac97_input == NULL){ + printk ("palmld_ac97_probe: cannot allocate input device\n"); + return -ENOMEM; + } + palmld_ac97_input->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); palmld_ac97_input->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); @@ -479,71 +342,62 @@ input_set_abs_params(palmld_ac97_input, ABS_Y, Y_AXIS_MIN, Y_AXIS_MAX, ydjtrsh, 0); input_set_abs_params(palmld_ac97_input, ABS_PRESSURE, PRESSURE_MIN, PRESSURE_MAX, PRESSURE_FUZZ, 0); - palmld_ac97_input->name = "Palm TX touchscreen (Wolfson WM9712)"; + palmld_ac97_input->name = "palmtx touchscreen"; palmld_ac97_input->dev = dev; palmld_ac97_input->id.bustype = BUS_HOST; input_register_device(palmld_ac97_input); - -#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) - apm_get_power_status = palmtx_apm_get_power_status; -#endif /* setup work queue */ palmld_ac97_workqueue = create_workqueue(palmld_ac97_WORK_QUEUE_NAME); INIT_WORK(&palmld_ac97_irq_task, palmld_ac97_irq_work, dev); - /* register battery */ - - if(battery_class_register(&palmld_battery)) { - printk(KERN_ERR "palmld_ac97_probe: Could not register battery class\n"); - } else { - palmld_battery.class_dev.class->release = battery_class_release; - // palmld_battery.class_dev.class->hotplug = battery_class_hotplug; - palmld_battery.class_dev.class->class_release = battery_class_class_release; - } - - up(&queue_sem); return 0; } + static int palmld_ac97_remove (struct device *dev) { - ac97_t *ac97 = dev->platform_data; - printk("x: %x\n", ac97->bus->ops->read(ac97, AC97_WM97XX_DIGITISER2)); + // TODO: stop running tasks if any? + + ac97 = NULL; input_unregister_device(palmld_ac97_input); - free_irq(IRQ_GPIO_PALMTX_WM9712_IRQ, dev); return 0; } + static struct device_driver palmld_ac97_driver = { - .name = "WM9712", + .name = "palmld_ac97 (WM9712)", .bus = &ac97_bus_type, + .owner = THIS_MODULE, .probe = palmld_ac97_probe, .remove = palmld_ac97_remove, + #ifdef CONFIG_PM .suspend = NULL, .resume = NULL, #endif }; + static int __init palmld_ac97_init(void) { if(!machine_is_xscale_palmtx()) return -ENODEV; - return driver_register(&palmld_ac97_driver); } + static void __exit palmld_ac97_exit(void) { driver_unregister(&palmld_ac97_driver); } + module_init(palmld_ac97_init); module_exit(palmld_ac97_exit); MODULE_AUTHOR ("Alex Osborne <bob...@gm...>"); -MODULE_DESCRIPTION ("WM9712 AC97 codec support for Palm LifeDrive"); +MODULE_DESCRIPTION ("WM9712 AC97 codec support for Palm TX"); MODULE_LICENSE ("GPL"); Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-10-20 18:49:32 UTC (rev 639) @@ -22,6 +22,7 @@ #include <linux/device.h> #include <linux/platform_device.h> #include <linux/fb.h> +#include <linux/input.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -30,20 +31,17 @@ #include <asm/arch/audio.h> #include <asm/arch/hardware.h> #include <asm/arch/mmc.h> +#include <asm/arch/pxafb.h> #include <asm/arch/pxa-dmabounce.h> -#include <asm/arch/pxafb.h> #include <asm/arch/pxa-regs.h> +#include <asm/arch/udc.h> +#include <asm/arch/pxa27x_keyboard.h> +#include <asm/arch/pxapwm-bl.h> #include "../generic.h" #include "../drivers/serial/pxa-serial.h" - -#include <asm/arch/udc.h> - #include <../drivers/pcmcia/soc_common.h> -#include <asm/arch/pxa27x-keypad.h> -#include <asm/arch/pxapwm-bl.h> - #include "asm-arm/arch-pxa/palmtx-init.h" #include "asm-arm/arch-pxa/palmtx-gpio.h" @@ -101,27 +99,74 @@ // Keypad driver +static struct pxa27x_keyboard_platform_data palmtx_kbd_data = { + .nr_rows = 4, + .nr_cols = 3, + .keycodes = { + { /* row 0 */ + KEY_POWER, + KEY_F9, + KEY_ENTER, + }, + { /* row 1 */ + KEY_F10, + KEY_F11, + KEY_F12, + }, + { /* row 2 */ + KEY_UP, + -1, + KEY_DOWN, + }, + { + /* row 3 */ + KEY_RIGHT, + -1, + KEY_LEFT, + }, -static int palmtx_keypad_matrix[] = { - /* row 0 */ - KEY_POWER, - KEY_F9, - KEY_ENTER, - /* row 1 */ - KEY_F10, - KEY_F11, - KEY_F12, - /* row 2 */ - KEY_UP, - -1, - KEY_DOWN, - /* row 3 */ - KEY_RIGHT, - -1, - KEY_LEFT, - }; + }, + .gpio_modes = { + GPIO_NR_PALMTX_KP_MKIN0_MD, + GPIO_NR_PALMTX_KP_MKIN1_MD, + GPIO_NR_PALMTX_KP_MKIN2_MD, + GPIO_NR_PALMTX_KP_MKIN3_MD, + GPIO_NR_PALMTX_KP_MKOUT0_MD, + GPIO_NR_PALMTX_KP_MKOUT1_MD, + GPIO_NR_PALMTX_KP_MKOUT2_MD, + }, +}; +static struct platform_device palmtx_keypad = { + .name = "pxa27x-keyboard", + .id = -1, + .dev = { + .platform_data = &palmtx_kbd_data, + }, +}; + +// static int palmtx_keypad_matrix[] = { +// /* row 0 */ +// KEY_POWER, +// KEY_F9, +// KEY_ENTER, +// /* row 1 */ +// KEY_F10, +// KEY_F11, +// KEY_F12, +// /* row 2 */ +// KEY_UP, +// -1, +// KEY_DOWN, +// /* row 3 */ +// KEY_RIGHT, +// -1, +// KEY_LEFT, +// }; + + +/* static struct pxa27x_keypad_platform_data palmtx_keypad_data = { .matrix = palmtx_keypad_matrix, .rows = 4, @@ -136,6 +181,8 @@ }, }; +*/ + // backlight static struct pxapwmbl_platform_data palmtx_backlight_data = { @@ -230,7 +277,7 @@ }; -// UDC +// UDC (USB gadget controller) static int palmtx_udc_is_connected (void){ int ret = !(GET_GPIO(GPIO_NR_PALMTX_USB_DETECT)); @@ -392,9 +439,11 @@ MACHINE_START(XSCALE_PALMTX, "Palm TX") - .phys_ram = PALMTX_PHYS_RAM_START, + //.phys_ram = PALMTX_PHYS_RAM_START, .phys_io = PALMTX_PHYS_IO_START, - .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, + //.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, + .io_pg_offst = io_p2v(0x40000000), + .boot_params = 0xa0000100, .map_io = palmtx_map_io, .init_irq = pxa_init_irq, .timer = &pxa_timer, Modified: linux4palm/linux/trunk/drivers/input/keyboard/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/input/keyboard/Kconfig 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/drivers/input/keyboard/Kconfig 2006-10-20 18:49:32 UTC (rev 639) @@ -201,7 +201,7 @@ This enables support for the buttons and joypad on HP iPAQ H2200. config KEYBOARD_PXA27x - tristate + tristate "PXA27x keypad and buttons Driver" depends on PXA27x help Enable support for PXA27x matrix keyboard controller Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-ac97.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-ac97.h 2006-10-20 18:31:37 UTC (rev 638) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-ac97.h 2006-10-20 18:49:32 UTC (rev 639) @@ -87,4 +87,6 @@ #define WM97XX_GPIO_14 (1 << 14) #define WM97XX_GPIO_15 (1 << 15) +#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */ + #endif /* _PALMLD_AC97_H_ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-20 18:31:50
|
Revision: 638 http://svn.sourceforge.net/hackndev/?rev=638&view=rev Author: farcaller Date: 2006-10-20 11:31:37 -0700 (Fri, 20 Oct 2006) Log Message: ----------- palmt3: added ifdefs to compile without PM support Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-19 18:47:12 UTC (rev 637) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-20 18:31:37 UTC (rev 638) @@ -175,9 +175,10 @@ }, }; +/*** Suspend/Resume ***/ +#ifdef CONFIG_PM static long int _PM_backup[3]; -/*** Suspend/Resume ***/ void palmt3_suspend(unsigned long ret) { unsigned long * addr; @@ -217,8 +218,8 @@ .suspend = palmt3_suspend, .resume = palmt3_resume, }; +#endif - /*** INIT ***/ static struct platform_device *devices[] __initdata = { @@ -231,7 +232,9 @@ static void __init palmt3_init(void) { set_pxa_fb_info(&palmt3lcd); +#ifdef CONFIG_PM pxa_pm_set_ll_ops(&palmt3_pm_ops); +#endif palmt3_ssp_init(); platform_add_devices (devices, ARRAY_SIZE (devices)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-19 18:56:02
|
Revision: 637 http://svn.sourceforge.net/hackndev/?rev=637&view=rev Author: farcaller Date: 2006-10-19 11:47:12 -0700 (Thu, 19 Oct 2006) Log Message: ----------- palmt3: just trying to remove ugly commit form hnd list Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-19 17:52:58 UTC (rev 636) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-19 18:47:12 UTC (rev 637) @@ -197,7 +197,6 @@ PWER = 0x5C0F; PFER = 0x3; PEDR = 0x3; - return; } void palmt3_resume(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-19 17:54:38
|
Revision: 636 http://svn.sourceforge.net/hackndev/?rev=636&view=rev Author: farcaller Date: 2006-10-19 10:52:58 -0700 (Thu, 19 Oct 2006) Log Message: ----------- palmt3: cleaning the code Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-19 05:44:21 UTC (rev 635) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-19 17:52:58 UTC (rev 636) @@ -180,8 +180,6 @@ /*** Suspend/Resume ***/ void palmt3_suspend(unsigned long ret) { - // TODO: store return address in checkpoint mem - // INFO: check arch/arm/mach-pxa/pm.c and pxa25x.c for more info unsigned long * addr; addr = 0xC0000000; @@ -241,9 +239,6 @@ MACHINE_START(T3XSCALE, "Palm Tungsten T3") /* Maintainer: Vladimir Pouzanov <far...@gm...> */ -#if 0 - .phys_ram = 0xa0000000, -#endif .phys_io = 0x40000000, .boot_params = 0xa0000100, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-19 05:44:31
|
Revision: 635 http://svn.sourceforge.net/hackndev/?rev=635&view=rev Author: cristianop Date: 2006-10-18 22:44:21 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmtx: re-applying pxa2xx-ac97 reg 0x54 patch Modified Paths: -------------- linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c Modified: linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c =================================================================== --- linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-10-19 05:29:19 UTC (rev 634) +++ linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-10-19 05:44:21 UTC (rev 635) @@ -115,11 +115,22 @@ GSR = GSR_CDONE | GSR_SDONE; gsr_bits = 0; *reg_addr = val; +//#ifdef CONFIG_PXA27x +#ifdef CONFIG_MACH_PALMTX + // recommended procedure for reg 0x54 (see PXA27x Specification Update: 28007109.pdf sec.: E54) + if (reg == AC97_GPIO_STATUS){ + udelay(50); + } + else { +#endif if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE, 1) <= 0 && !((GSR | gsr_bits) & GSR_CDONE)) printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n", __FUNCTION__, reg, GSR | gsr_bits); - +//#ifdef CONFIG_PXA27x +#ifdef CONFIG_MACH_PALMTX + } +#endif mutex_unlock(&car_mutex); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-10-19 05:29:33
|
Revision: 634 http://svn.sourceforge.net/hackndev/?rev=634&view=rev Author: cristianop Date: 2006-10-18 22:29:19 -0700 (Wed, 18 Oct 2006) Log Message: ----------- re-applying HH.org 2GB+ patch Modified Paths: -------------- linux4palm/linux/trunk/drivers/mmc/mmc_block.c Modified: linux4palm/linux/trunk/drivers/mmc/mmc_block.c =================================================================== --- linux4palm/linux/trunk/drivers/mmc/mmc_block.c 2006-10-18 17:27:52 UTC (rev 633) +++ linux4palm/linux/trunk/drivers/mmc/mmc_block.c 2006-10-19 05:29:19 UTC (rev 634) @@ -325,53 +325,12 @@ md->read_only = mmc_blk_readonly(card); /* - * Figure out a workable block size. MMC cards have: - * - two block sizes, one for read and one for write. - * - may support partial reads and/or writes - * (allows block sizes smaller than specified) + * Both SD and MMC specifications state (although a bit + * unclearly in the MMC case) that a block size of 512 + * bytes must always be supported by the card. */ - md->block_bits = card->csd.read_blkbits; - if (card->csd.write_blkbits != card->csd.read_blkbits) { - if (card->csd.write_blkbits < card->csd.read_blkbits && - card->csd.read_partial) { - /* - * write block size is smaller than read block - * size, but we support partial reads, so choose - * the smaller write block size. - */ - md->block_bits = card->csd.write_blkbits; - } else if (card->csd.write_blkbits > card->csd.read_blkbits && - card->csd.write_partial) { - /* - * read block size is smaller than write block - * size, but we support partial writes. Use read - * block size. - */ - } else { - /* - * We don't support this configuration for writes. - */ - printk(KERN_ERR "%s: unable to select block size for " - "writing (rb%u wb%u rp%u wp%u)\n", - mmc_card_id(card), - 1 << card->csd.read_blkbits, - 1 << card->csd.write_blkbits, - card->csd.read_partial, - card->csd.write_partial); - md->read_only = 1; - } - } + md->block_bits = 9; - /* - * Refuse to allow block sizes smaller than 512 bytes. - */ - if (md->block_bits < 9) { - printk(KERN_ERR "%s: unable to support block size %u\n", - mmc_card_id(card), 1 << md->block_bits); - ret = -EINVAL; - goto err_kfree; - } - md->disk = alloc_disk(1 << MMC_SHIFT); if (md->disk == NULL) { ret = -ENOMEM; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 17:28:15
|
Revision: 633 http://svn.sourceforge.net/hackndev/?rev=633&view=rev Author: farcaller Date: 2006-10-18 10:27:52 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: battery interface now publishes status via APM (and now depends on tps65010) Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2006-10-18 17:25:05 UTC (rev 632) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2006-10-18 17:27:52 UTC (rev 633) @@ -12,7 +12,7 @@ config PALM_T3_BATTERY tristate "Battery monitoring support" - depends on MACH_T3XSCALE + depends on MACH_T3XSCALE && TPS65010 select SOC_TSC2101 help Adds battery driver support Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2006-10-18 17:25:05 UTC (rev 632) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2006-10-18 17:27:52 UTC (rev 633) @@ -38,7 +38,8 @@ int palmt3_battery_get_max_voltage(struct battery *bat) { - return 4147; // approx. 4.21 V, 2718 as returned by TSC + //return 4147; // approx. 4.21 V, 2718 as returned by TSC + return 4156; // strange, but this is my current upper limit. so it be. } int palmt3_battery_get_min_voltage(struct battery *bat) @@ -98,7 +99,52 @@ .get_max_voltage = palmt3_battery_get_max_voltage, .get_status = palmt3_battery_get_status, }; +/* -------------------------- APM ------------------------------------- */ +static void palmt3_apm_get_power_status(struct apm_power_info *info) +{ + int tps65010_get_charging(void); + int min, max, curr, percent; + curr = palmt3_battery_get_voltage(NULL); + min = palmt3_battery_get_min_voltage(NULL); + max = palmt3_battery_get_max_voltage(NULL); + + curr = curr - min; + if (curr < 0) curr = 0; + max = max - min; + + percent = curr*100/max; + + info->battery_life = percent; + + info->ac_line_status = tps65010_get_charging() ? APM_AC_ONLINE : APM_AC_OFFLINE; + + if (info->ac_line_status) { + info->battery_status = APM_BATTERY_STATUS_CHARGING; + } else { + if (percent > 50) + info->battery_status = APM_BATTERY_STATUS_HIGH; + else if (percent < 5) + info->battery_status = APM_BATTERY_STATUS_CRITICAL; + else + info->battery_status = APM_BATTERY_STATUS_LOW; + } + + /* Consider one "percent" per minute, which is shot in the sky. */ + info->time = percent; + info->units = APM_UNITS_MINS; +} + +typedef void (*apm_get_power_status_t)(struct apm_power_info*); + +int set_apm_get_power_status(apm_get_power_status_t t) +{ + apm_get_power_status = t; + + return 0; +} + + /* -------------------------------------------------------------------- */ static int palmt3_battery_probe(struct device *dev) @@ -122,6 +168,11 @@ return retval; retval = battery_class_register(&palmt3_battery); + if (!retval) { +#ifdef CONFIG_PM + set_apm_get_power_status(palmt3_apm_get_power_status); +#endif + } return retval; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 17:25:19
|
Revision: 632 http://svn.sourceforge.net/hackndev/?rev=632&view=rev Author: farcaller Date: 2006-10-18 10:25:05 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: exported charging status interface Modified Paths: -------------- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2006-10-18 07:50:05 UTC (rev 631) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2006-10-18 17:25:05 UTC (rev 632) @@ -679,6 +679,12 @@ /*-------------------------------------------------------------------------*/ +int tps65010_get_charging(void) +{ + return the_tps->charging; +} +EXPORT_SYMBOL(tps65010_get_charging); + /* Draw from VBUS: * 0 mA -- DON'T DRAW (might supply power instead) * 100 mA -- usb unit load (slowest charge rate) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:50:18
|
Revision: 631 http://svn.sourceforge.net/hackndev/?rev=631&view=rev Author: farcaller Date: 2006-10-18 00:50:05 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: workaround for WBSD bug Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-18 07:35:13 UTC (rev 630) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-18 07:50:05 UTC (rev 631) @@ -175,6 +175,8 @@ }, }; +static long int _PM_backup[3]; + /*** Suspend/Resume ***/ void palmt3_suspend(unsigned long ret) { @@ -182,14 +184,16 @@ // INFO: check arch/arm/mach-pxa/pm.c and pxa25x.c for more info unsigned long * addr; - /* addr = 0xC0000000; + _PM_backup[0] = *addr; *addr = 0xFEEDC0DE; addr = 0xC0000004; + _PM_backup[1] = *addr; *addr = 0xBEEFF00D; - */ + addr = 0xC0000008; + _PM_backup[2] = *addr; *addr = ret; PWER = 0x5C0F; @@ -200,7 +204,16 @@ void palmt3_resume(void) { - // TODO: anything here? + unsigned long * addr; + + addr = 0xC0000000; + *addr = _PM_backup[0]; + + addr = 0xC0000004; + *addr = _PM_backup[1]; + + addr = 0xC0000008; + *addr = _PM_backup[2]; } static struct pxa_ll_pm_ops palmt3_pm_ops = { @@ -220,14 +233,6 @@ static void __init palmt3_init(void) { - unsigned long *addr; - - addr = 0xC0000000; - *addr = 0xFEEDC0DE; - addr = 0xC0000004; - *addr = 0xBEEFF00D; - - set_pxa_fb_info(&palmt3lcd); pxa_pm_set_ll_ops(&palmt3_pm_ops); palmt3_ssp_init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:35:20
|
Revision: 630 http://svn.sourceforge.net/hackndev/?rev=630&view=rev Author: farcaller Date: 2006-10-18 00:35:13 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: Updated flash map to support u-boot, linux partitions temporary deleted. Modified Paths: -------------- linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c Modified: linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c =================================================================== --- linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c 2006-10-18 07:32:54 UTC (rev 629) +++ linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c 2006-10-18 07:35:13 UTC (rev 630) @@ -36,25 +36,24 @@ static struct mtd_partition palmt3_partitions[] = { { .name = "SmallROM", - .size = 0x40000, // 256kb + .size = 0x20000, // 128kb .offset = 0, - // .mask_flags = MTD_WRITEABLE - .mask_flags = MTD_WRITEABLE, + .mask_flags = MTD_WRITEABLE + },{ + .name = "U-BOOT", + .size = 0x20000, // 128kb + .offset = 0x20000, + .mask_flags = MTD_WRITEABLE },{ .name = "BigROM", .size = 0xe00000, // 16mb - 256kb(smallrom) - 256kb - 512kb (14Mb) .offset = 0x40000, .mask_flags = MTD_WRITEABLE, },{ - .name = "lin", - .size = 1024*128, - .offset = 0xf00000, + .name = "uboot-env", + .size = 128*1024, // 128kb + .offset = 0x00fe0000, } - /*,{ - .name = "lin512k", - .size = MTDPART_SIZ_FULL, - .offset = MTDPART_OFS_APPEND, - }*/ }; #define NUM_PARTITIONS (sizeof(palmt3_partitions)/sizeof(palmt3_partitions[0])) @@ -98,10 +97,11 @@ part_type = "builtin"; } - + /* printk(KERN_ERR "WARNING, FLASH PARTITION 2 (/dev/mtdblock2) WILL BE UNLOCKED FOR WRITES!\n"); - mymtd->unlock(mymtd, 0xf00000, 1024*128); - + mymtd->unlock(mymtd, 0xd00000, 3*1024*1024); + mymtd->unlock(mymtd, 0, 0x40000); + */ printk(KERN_INFO "Using %s partition table\n", part_type); add_mtd_partitions(mymtd, mtd_parts, nr_mtd_parts); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:33:00
|
Revision: 629 http://svn.sourceforge.net/hackndev/?rev=629&view=rev Author: farcaller Date: 2006-10-18 00:32:54 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: core PM patch Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-18 07:30:28 UTC (rev 628) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2006-10-18 07:32:54 UTC (rev 629) @@ -181,45 +181,31 @@ // TODO: store return address in checkpoint mem // INFO: check arch/arm/mach-pxa/pm.c and pxa25x.c for more info unsigned long * addr; - addr = 0xC0000FF0; - *addr = 0; - addr = 0xC0000FF4; - *addr = 0; - addr = 0xC0000FF8; - *addr = 0; + + /* + addr = 0xC0000000; + *addr = 0xFEEDC0DE; + addr = 0xC0000004; + *addr = 0xBEEFF00D; + */ + addr = 0xC0000008; + *addr = ret; + + PWER = 0x5C0F; + PFER = 0x3; + PEDR = 0x3; return; } -void palmt3_suspend_prepare(void) -{ -#if 0 - unsigned long * addr; - PSPR = 0x8C000F00; - PWER = 0x0C03; - PRER = 0x0C03; - PFER = 0x0C03; - - addr = 0xC0004800; - //*addr = 0x0000000A; - *addr = 0xF00C02; - - addr = 0xC0000FF4; - *addr = 0xfeedbee2; -#endif -} - void palmt3_resume(void) { // TODO: anything here? - unsigned long * addr; - addr = 0xC0000FF8; - *addr = 0xfeedbee3; } static struct pxa_ll_pm_ops palmt3_pm_ops = { - palmt3_suspend, - palmt3_resume + .suspend = palmt3_suspend, + .resume = palmt3_resume, }; @@ -234,12 +220,14 @@ static void __init palmt3_init(void) { - // usb re-plug - /* FIXME not working here, moved to initrd (via GPIOed) - do { GPCR(85) = GPIO_bit(85); } while (0); - printk("Repowering USB...\n"); - do { GPSR(85) = GPIO_bit(85); } while (0); - */ + unsigned long *addr; + + addr = 0xC0000000; + *addr = 0xFEEDC0DE; + addr = 0xC0000004; + *addr = 0xBEEFF00D; + + set_pxa_fb_info(&palmt3lcd); pxa_pm_set_ll_ops(&palmt3_pm_ops); palmt3_ssp_init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:30:40
|
Revision: 628 http://svn.sourceforge.net/hackndev/?rev=628&view=rev Author: farcaller Date: 2006-10-18 00:30:28 -0700 (Wed, 18 Oct 2006) Log Message: ----------- l4p: PXAPWM PM patch (turns CKEN on) Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-18 07:29:08 UTC (rev 627) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-18 07:30:28 UTC (rev 628) @@ -148,6 +148,7 @@ return PTR_ERR (bl->dev); pxapwmbl_send_intensity(bl, bl->default_intensity); + CKEN = CKEN | (bl->pwm?CKEN1_PWM1:CKEN0_PWM0); bl->intensity = bl->default_intensity; pxapwmbl_limit_intensity(pdev, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:29:15
|
Revision: 627 http://svn.sourceforge.net/hackndev/?rev=627&view=rev Author: farcaller Date: 2006-10-18 00:29:08 -0700 (Wed, 18 Oct 2006) Log Message: ----------- palmt3: TSC2101 PM patch Modified Paths: -------------- linux4palm/linux/trunk/drivers/soc/tsc2101.c Modified: linux4palm/linux/trunk/drivers/soc/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/soc/tsc2101.c 2006-10-18 05:28:46 UTC (rev 626) +++ linux4palm/linux/trunk/drivers/soc/tsc2101.c 2006-10-18 07:29:08 UTC (rev 627) @@ -849,8 +849,10 @@ .bus = &platform_bus_type, .probe = tsc2101_probe, .remove = __exit_p(tsc2101_remove), -// .suspend = tsc2101_suspend, -// .resume = tsc2101_resume, +#ifdef CONFIG_PM + .suspend = tsc2101_suspend, + .resume = tsc2101_resume, +#endif }; static int __init tsc2101_init(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |