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: <sle...@us...> - 2007-07-08 02:05:05
|
Revision: 1117 http://svn.sourceforge.net/hackndev/?rev=1117&view=rev Author: sleep_walker Date: 2007-07-07 19:05:01 -0700 (Sat, 07 Jul 2007) Log Message: ----------- palmtt3: ghost tap fixed, calibration works properly Modified Paths: -------------- linux4palm/linux/trunk/drivers/mfd/tsc2101.c Modified: linux4palm/linux/trunk/drivers/mfd/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-07-07 21:35:41 UTC (rev 1116) +++ linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-07-08 02:05:01 UTC (rev 1117) @@ -645,7 +645,7 @@ //tsc2101_regwrite(devdata, TSC2101_REG_RESETCTL, 0xbb00); /* PINTDAV is data available only */ - tsc2101_regwrite(devdata, TSC2101_REG_STATUS, 0x4000); + tsc2101_regwrite(devdata, TSC2101_REG_STATUS, 0x2000); /* disable buffer mode */ tsc2101_regwrite(devdata, TSC2101_REG_BUFMODE, 0x0); @@ -736,6 +736,7 @@ static int i=0; unsigned long flags; + if (devdata->pendown == 0) { i++; spin_lock_irqsave(&devdata->lock, flags); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-07 15:12:05
|
Revision: 1115 http://svn.sourceforge.net/hackndev/?rev=1115&view=rev Author: sleep_walker Date: 2007-07-07 08:12:01 -0700 (Sat, 07 Jul 2007) Log Message: ----------- BFUGarux: setting default button, let your stylus rest, cowboy... Modified Paths: -------------- linux4palm/BFUGarux/garux-generic.rcp linux4palm/BFUGarux/garux-genericK.rcp Modified: linux4palm/BFUGarux/garux-generic.rcp =================================================================== --- linux4palm/BFUGarux/garux-generic.rcp 2007-07-07 10:14:52 UTC (rev 1114) +++ linux4palm/BFUGarux/garux-generic.rcp 2007-07-07 15:12:01 UTC (rev 1115) @@ -42,6 +42,7 @@ USABLE MENUID MainMenu HELPID GnuGpl +DEFAULTBTNID LinuxButton BEGIN TITLE "BFUGarux Linux Loader" Modified: linux4palm/BFUGarux/garux-genericK.rcp =================================================================== --- linux4palm/BFUGarux/garux-genericK.rcp 2007-07-07 10:14:52 UTC (rev 1114) +++ linux4palm/BFUGarux/garux-genericK.rcp 2007-07-07 15:12:01 UTC (rev 1115) @@ -42,6 +42,7 @@ USABLE MENUID MainMenu HELPID GnuGpl +DEFAULTBTNID LinuxButton BEGIN TITLE "BFUGarux Linux Loader" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-07 10:14:59
|
Revision: 1114 http://svn.sourceforge.net/hackndev/?rev=1114&view=rev Author: sleep_walker Date: 2007-07-07 03:14:52 -0700 (Sat, 07 Jul 2007) Log Message: ----------- palmtt3: cumulative patch - UDC, HW UART, BT UART, IrDA support added (BT+IrDA still not working), Power Button reworked, suspend LED problem fixed, created palmtt3-gpio.h, starting to rename from palmt3 to correct palmtt3 Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c linux4palm/linux/trunk/drivers/i2c/chips/Kconfig linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c linux4palm/linux/trunk/drivers/input/misc/Kconfig linux4palm/linux/trunk/drivers/input/misc/Makefile linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c Added Paths: ----------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-gpio.h Removed Paths: ------------- linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -30,25 +30,28 @@ #include <asm/arch/ssp.h> #include <asm/arch/irq.h> //test #include <asm/arch/hardware.h> //test +#include <asm/arch/irda.h> +#include <linux/delay.h> +#include <asm/arch/udc.h> +#include <asm/arch/serial.h> #include <linux/input.h> #include <linux/soc/tsc2101.h> #include <asm/arch/pxa-pm_ll.h> #include <asm/arch/pxapwm-bl.h> +#include <asm/arch/palmtt3-gpio.h> +#include <asm/arch/tps65010.h> #include "../generic.h" // FIXME move this to include/asm/arch/palmtt3.h some time -#define PALMT3_GPIO_TSC2101_SS (24) -#define PALMT3_GPIO_PENDOWN (37) -#define PALMT3_IRQ_GPIO_PENDOWN IRQ_GPIO(PALMT3_GPIO_PENDOWN) #define DEBUG 1 /*** FRAMEBUFFER ***/ -static void palmt3_pxafb_backlight_power(int level) +static void palmtt3_pxafb_backlight_power(int level) { // just turn it on/off, other controls via backlight class if(level) @@ -57,7 +60,7 @@ CKEN = CKEN & (~CKEN1_PWM1); } -static void palmt3_pxafb_lcd_power(int level, struct fb_var_screeninfo *var) +static void palmtt3_pxafb_lcd_power(int level, struct fb_var_screeninfo *var) { if(level) { GPSR1 = GPIO_bit(38); @@ -74,7 +77,7 @@ /*** framebuffer ***/ -static struct pxafb_mode_info palmt3_lcd_modes[] = { +static struct pxafb_mode_info palmtt3_lcd_modes[] = { { .pixclock = 0, .xres = 320, @@ -90,32 +93,30 @@ } }; -static struct pxafb_mach_info palmt3_lcd_screen[] = { - { - .modes = palmt3_lcd_modes, - .num_modes = ARRAY_SIZE(palmt3_lcd_modes), +static struct pxafb_mach_info palmtt3_lcd_screen = { + .modes = palmtt3_lcd_modes, + .num_modes = ARRAY_SIZE(palmtt3_lcd_modes), .lccr0 = 0x003008F9, .lccr3 = 0x03700002, - .pxafb_backlight_power = &palmt3_pxafb_backlight_power, - .pxafb_lcd_power = &palmt3_pxafb_lcd_power, - } + .pxafb_backlight_power = &palmtt3_pxafb_backlight_power, + .pxafb_lcd_power = &palmtt3_pxafb_lcd_power, }; /*** SSP ***/ -static struct ssp_dev palmt3_ssp_dev; +static struct ssp_dev palmtt3_ssp_dev; -void palmt3_ssp_init(void) +void palmtt3_ssp_init(void) { - printk(KERN_WARNING "palmt3_tsc2101: Resetting SSP, move this to garux?\n"); + printk(KERN_WARNING "palmtt3_tsc2101: Resetting SSP, move this to garux?\n"); SSCR0 &= ~SSCR0_SSE; SSCR1 = SSCR1 & 0x3FFC; - if (ssp_init(&palmt3_ssp_dev, 1, 0)) - printk(KERN_ERR "palmt3_tsc2101: Unable to register SSP handler!\n"); + if (ssp_init(&palmtt3_ssp_dev, 1, 0)) + printk(KERN_ERR "palmtt3_tsc2101: Unable to register SSP handler!\n"); else { - ssp_enable(&palmt3_ssp_dev); - printk(KERN_INFO "palmt3_tsc2101: SSP device initialized\n"); + ssp_enable(&palmtt3_ssp_dev); + printk(KERN_INFO "palmtt3_tsc2101: SSP device initialized\n"); } return; @@ -123,77 +124,77 @@ struct ssp_state ssp1; -void palmt3_ssp_suspend(void) +void palmtt3_ssp_suspend(void) { - ssp_disable(&palmt3_ssp_dev); - ssp_save_state(&palmt3_ssp_dev,&ssp1); + ssp_disable(&palmtt3_ssp_dev); + ssp_save_state(&palmtt3_ssp_dev,&ssp1); // FIXME power off TSC2101? } -void palmt3_ssp_resume(void) +void palmtt3_ssp_resume(void) { // FIXME power on TSC2101? - ssp_restore_state(&palmt3_ssp_dev,&ssp1); - ssp_enable(&palmt3_ssp_dev); + ssp_restore_state(&palmtt3_ssp_dev,&ssp1); + ssp_enable(&palmtt3_ssp_dev); } /*** Touchscreen/Sound/Battery Status ***/ -void palmt3_tsc2101_send(int read, int command, int *values, int numval) +void palmtt3_tsc2101_send(int read, int command, int *values, int numval) { u32 ret; int i; - GPCR0 = GPIO_bit(PALMT3_GPIO_TSC2101_SS); + GPCR0 = GPIO_bit(PALMTT3_GPIO_TSC2101_SS); - ssp_write_word(&palmt3_ssp_dev, command | read); - ssp_read_word(&palmt3_ssp_dev, &ret); /* Dummy read */ + ssp_write_word(&palmtt3_ssp_dev, command | read); + ssp_read_word(&palmtt3_ssp_dev, &ret); /* Dummy read */ for (i = 0; i < numval; i++) { if (read) { - ssp_write_word(&palmt3_ssp_dev, 0); - ssp_read_word(&palmt3_ssp_dev, &values[i]); + ssp_write_word(&palmtt3_ssp_dev, 0); + ssp_read_word(&palmtt3_ssp_dev, &values[i]); } else { - ssp_write_word(&palmt3_ssp_dev, values[i]); - ssp_read_word(&palmt3_ssp_dev, &ret); /* Dummy read */ + ssp_write_word(&palmtt3_ssp_dev, values[i]); + ssp_read_word(&palmtt3_ssp_dev, &ret); /* Dummy read */ } } - GPSR0 = GPIO_bit(PALMT3_GPIO_TSC2101_SS); + GPSR0 = GPIO_bit(PALMTT3_GPIO_TSC2101_SS); } -static int palmt3_tsc2101_pendown(void) +static int palmtt3_tsc2101_pendown(void) { // FIXME PALMT3_GPIO_PENDOWN - if ((GPLR(PALMT3_GPIO_PENDOWN) & GPIO_bit(PALMT3_GPIO_PENDOWN)) == 0) + if ((GPLR(PALMTT3_GPIO_PENDOWN) & GPIO_bit(PALMTT3_GPIO_PENDOWN)) == 0) return 1; return 0; } -static struct tsc2101_platform_info palmt3_tsc2101_info = { - .send = palmt3_tsc2101_send, - .suspend = palmt3_ssp_suspend, - .resume = palmt3_ssp_resume, - .irq = PALMT3_IRQ_GPIO_PENDOWN, - .pendown = palmt3_tsc2101_pendown, +static struct tsc2101_platform_info palmtt3_tsc2101_info = { + .send = palmtt3_tsc2101_send, + .suspend = palmtt3_ssp_suspend, + .resume = palmtt3_ssp_resume, + .irq = PALMTT3_IRQ_GPIO_PENDOWN, + .pendown = palmtt3_tsc2101_pendown, }; struct platform_device tsc2101_device = { .name = "tsc2101", .dev = { - .platform_data = &palmt3_tsc2101_info, + .platform_data = &palmtt3_tsc2101_info, }, .id = -1, }; /*** Buttons ***/ -static struct platform_device palmt3_btn_device = { - .name = "palmt3-btn", +static struct platform_device palmtt3_btn_device = { + .name = "palmtt3-btn", .id = -1, }; /* Backlight ***/ -static struct pxapwmbl_platform_data palmt3_backlight_data = { +static struct pxapwmbl_platform_data palmtt3_backlight_data = { .pwm = 1, .max_intensity = 0x100, .default_intensity = 0x50, @@ -210,23 +211,195 @@ /*** Power button ***/ static struct platform_device palmtt3_power_button = { - .name = "palmtt3-pwr_btn", + .name = "tps65010-pwr_btn", .id = -1, }; -static struct platform_device palmt3_backlight_device = { +/*** IRDA ***/ + +static void palmtt3_irda_transceiver_mode(struct device *dev, int mode) +{ + unsigned long flags; + + local_irq_save(flags); + + if (mode & IR_SIRMODE){ + printk (KERN_INFO "IrDA: setting mode to SIR\n"); + } + else if (mode & IR_FIRMODE){ + printk (KERN_INFO "IrDA: setting mode to FIR\n"); + } + if (mode & IR_OFF){ + printk (KERN_INFO "IrDA: turning OFF\n"); + SET_GPIO(GPIO_NR_PALMTT3_IR_DISABLE, 1); + } + else { + printk (KERN_INFO "IrDA: turning ON\n"); + SET_GPIO(GPIO_NR_PALMTT3_IR_DISABLE, 0); + SET_GPIO(GPIO46_STRXD_MD, 1); + mdelay(30); + SET_GPIO(GPIO46_STRXD_MD, 0); + } + + local_irq_restore(flags); +} + + +static struct pxaficp_platform_data palmtt3_ficp_platform_data = { + .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, + .transceiver_mode = palmtt3_irda_transceiver_mode, +}; + + +/*** Backlight ***/ +static struct platform_device palmtt3_backlight_device = { .name = "pxapwm-bl", .dev = { - .platform_data = &palmt3_backlight_data, + .platform_data = &palmtt3_backlight_data, }, }; +/******* + * USB * + *******/ + +static int palmtt3_udc_is_connected (void){ + int ret = GET_GPIO(GPIO_NR_PALMTT3_USB_DETECT); + if (ret) + printk (KERN_INFO "palmtt3_udc: device detected [USB_DETECT: %d]\n",ret); + else + printk (KERN_INFO "palmtt3_udc: no device detected [USB_DETECT: %d]\n",ret); + + return ret; +} + +static void palmtt3_udc_command (int cmd){ + + switch (cmd) { + case PXA2XX_UDC_CMD_DISCONNECT: + SET_GPIO(GPIO_NR_PALMTT3_PUC_USB_POWER, 0); + SET_GPIO(GPIO_NR_PALMTT3_USB_POWER, 1); + printk(KERN_INFO "palmtt3_udc: got command PXA2XX_UDC_CMD_DISCONNECT\n"); + break; + case PXA2XX_UDC_CMD_CONNECT: + SET_GPIO(GPIO_NR_PALMTT3_USB_POWER, 0); + SET_GPIO(GPIO_NR_PALMTT3_PUC_USB_POWER, 1); + printk(KERN_INFO "palmtt3_udc: got command PXA2XX_UDC_CMD_CONNECT\n"); + break; + default: + printk("palmtt3_udc: unknown command '%d'\n", cmd); + } +} + +static struct pxa2xx_udc_mach_info palmtt3_udc_mach_info __initdata = { + .udc_is_connected = palmtt3_udc_is_connected, + .udc_command = palmtt3_udc_command, +}; + + +/*** HW UART - serial in PUC ***/ +int palmtt3_hwuart_state; + +void palmtt3_hwuart_configure(int state) +{ + switch (state) { + case PXA_UART_CFG_PRE_STARTUP: + break; + case PXA_UART_CFG_POST_STARTUP: + SET_GPIO(35,0); + SET_GPIO(35,1); + palmtt3_hwuart_state = 1; + break; + case PXA_UART_CFG_PRE_SHUTDOWN: + SET_GPIO(35,0); + palmtt3_hwuart_state = 0; + break; + case PXA_UART_CFG_POST_SHUTDOWN: + break; + default: + printk("palmtt3_hwuart_configure: bad request %d\n",state); + break; + } +} + +static int palmtt3_hwuart_suspend(struct platform_device *dev, pm_message_t state) +{ + palmtt3_hwuart_configure(PXA_UART_CFG_PRE_SHUTDOWN); + return 0; +} + +static int palmtt3_hwuart_resume(struct platform_device *dev) +{ + palmtt3_hwuart_configure(PXA_UART_CFG_POST_STARTUP); + return 0; +} + +struct platform_pxa_serial_funcs palmtt3_hwuart = { + .configure = palmtt3_hwuart_configure, +/* + .set_txrx = palmtt3_hwuart_set_txrx, + .get_txrx = NULL, +*/ + .suspend = palmtt3_hwuart_suspend, + .resume = palmtt3_hwuart_resume, +}; + +/* Bluetooth */ + +void bcm2035_bt_reset(int on) +{ + printk(KERN_NOTICE "Switch BT reset %d\n", on); + if (on) + SET_GPIO(GPIO_NR_PALMTT3_RESET, 1); + else + SET_GPIO(GPIO_NR_PALMTT3_RESET, 0 ); +} +EXPORT_SYMBOL(bcm2035_bt_reset); + +void bcm2035_bt_power(int on) +{ + printk(KERN_NOTICE "Switch BT power %d\n", on); + if (on) + tps65010_set_gpio_out_value(GPIO_NR_PALMTT3_TPS65010_BT_POWER,1); + else + tps65010_set_gpio_out_value(GPIO_NR_PALMTT3_TPS65010_BT_POWER,0); +} +EXPORT_SYMBOL(bcm2035_bt_power); + + +struct bcm2035_bt_funcs { + void (*configure) ( int state ); +}; + +static struct bcm2035_bt_funcs bt_funcs; + +static void +bcm2035_bt_configure( int state ) +{ + if (bt_funcs.configure != NULL) + bt_funcs.configure( state ); +} + +static struct platform_pxa_serial_funcs bcm2035_pxa_bt_funcs = { + .configure = bcm2035_bt_configure, +}; + +static struct platform_device bcm2035_bt = { + .name = "bcm2035-bt", + .id = -1, + .dev = { + .platform_data = &bt_funcs, + }, +}; + + + /*** Suspend/Resume ***/ #ifdef CONFIG_PM static long int _PM_backup[3]; -void palmt3_suspend(unsigned long ret) +void palmtt3_suspend(unsigned long ret) { unsigned long * addr; @@ -242,12 +415,24 @@ _PM_backup[2] = *addr; *addr = ret; - PWER = 0x5C0F; - PFER = 0x3; - PEDR = 0x3; + /* event settings for waking-up */ + PWER = 0; + PWER |= PWER_RTC; /* enabling RTC alarm for wake-up */ + PWER |= PWER_WEP1; /* enabling RTC alarm for wake-up */ + PWER |= PWER_GPIO0; /* calendar/contacts/voice */ + PWER |= PWER_GPIO1; /* Active low GP_reset */ +/* PWER |= PWER_GPIO2; card insert - disabled - linux dislike ejecting card with mounted filesystem :) */ + PWER |= PWER_GPIO3; /* slider */ + PWER |= PWER_GPIO10; /* 5nav up/down/left/right */ + PWER |= PWER_GPIO11; /* memo/todo/center */ + PWER |= PWER_GPIO12; /* HotSync button on cradle */ + PWER |= PWER_GPIO14; /* power button */ + + PFER = PWER_GPIO0 | PWER_GPIO1 | PWER_GPIO11 | PWER_GPIO14; + PEDR = PWER_GPIO0 | PWER_GPIO1; } -void palmt3_resume(void) +void palmtt3_resume(void) { unsigned long * addr; @@ -261,9 +446,9 @@ *addr = _PM_backup[2]; } -static struct pxa_ll_pm_ops palmt3_pm_ops = { - .suspend = palmt3_suspend, - .resume = palmt3_resume, +static struct pxa_ll_pm_ops palmtt3_pm_ops = { + .suspend = palmtt3_suspend, + .resume = palmtt3_resume, }; #endif @@ -272,19 +457,25 @@ static struct platform_device *devices[] __initdata = { //&palmt3_bl_device, &tsc2101_device, - &palmt3_btn_device, - &palmt3_backlight_device, + &palmtt3_btn_device, + &palmtt3_backlight_device, &palmtt3_led_device, &palmtt3_power_button, + &bcm2035_bt, }; -static void __init palmt3_init(void) + +static void __init palmtt3_init(void) { - set_pxa_fb_info(palmt3_lcd_screen); #ifdef CONFIG_PM - pxa_pm_set_ll_ops(&palmt3_pm_ops); + pxa_pm_set_ll_ops(&palmtt3_pm_ops); #endif - palmt3_ssp_init(); + palmtt3_ssp_init(); + pxa_set_ficp_info(&palmtt3_ficp_platform_data); + set_pxa_fb_info(&palmtt3_lcd_screen); + pxa_set_udc_info(&palmtt3_udc_mach_info); + pxa_set_hwuart_info(&palmtt3_hwuart); + pxa_set_btuart_info(&bcm2035_pxa_bt_funcs); platform_add_devices (devices, ARRAY_SIZE (devices)); } @@ -296,5 +487,5 @@ .map_io = pxa_map_io, .init_irq = pxa_init_irq, .timer = &pxa_timer, - .init_machine = palmt3_init + .init_machine = palmtt3_init MACHINE_END Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -37,13 +37,13 @@ #define BATTERY_CHECK_INTERVAL (HZ * 60) /* every 60 seconds */ -int palmt3_battery_get_max_voltage(struct battery *bat) +int palmtt3_battery_get_max_voltage(struct battery *bat) { //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) +int palmtt3_battery_get_min_voltage(struct battery *bat) { return 3710; // 3.71 V, Critical Threshold set by PalmOS } @@ -53,7 +53,7 @@ return 1; } -int palmt3_battery_get_voltage(struct battery *bat) +int palmtt3_battery_get_voltage(struct battery *bat) { struct device_driver *tscdrv; struct device *tscdev; @@ -83,51 +83,51 @@ return (batv*6250)/4096; } -int palmt3_charger_get_usb_status(struct charger *cha) +int palmtt3_charger_get_usb_status(struct charger *cha) { u8 tps65010_get_chgstatus(void); return ((tps65010_get_chgstatus() & TPS_CHG_USB)?1:0); } -int palmt3_charger_get_ac_status(struct charger *cha) +int palmtt3_charger_get_ac_status(struct charger *cha) { u8 tps65010_get_chgstatus(void); return ((tps65010_get_chgstatus() & TPS_CHG_AC)?1:0); } #ifdef CONFIG_BATTCHARGE_MONITOR -static struct battery palmt3_battery = { - .name = "palmt3_batt", +static struct battery palmtt3_battery = { + .name = "palmtt3_batt", .id = "Li-Ion battery", .min_voltage = 3710, .max_voltage = 4156, .v_current = -1, .temp = -1, - .get_voltage = palmt3_battery_get_voltage, + .get_voltage = palmtt3_battery_get_voltage, }; -static struct charger palmt3_usb_charger = { - .name = "palmt3_usb", +static struct charger palmtt3_usb_charger = { + .name = "palmtt3_usb", .id = "USB", - .get_status = palmt3_charger_get_usb_status, + .get_status = palmtt3_charger_get_usb_status, }; -static struct charger palmt3_ac_charger = { - .name = "palmt3_ac", +static struct charger palmtt3_ac_charger = { + .name = "palmtt3_ac", .id = "AC", - .get_status = palmt3_charger_get_ac_status, + .get_status = palmtt3_charger_get_ac_status, }; #endif /* -------------------------- APM ------------------------------------- */ -static void palmt3_apm_get_power_status(struct apm_power_info *info) +static void palmtt3_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 = palmtt3_battery_get_voltage(NULL); + min = palmtt3_battery_get_min_voltage(NULL); + max = palmtt3_battery_get_max_voltage(NULL); curr = curr - min; if (curr < 0) curr = 0; @@ -167,58 +167,58 @@ /* -------------------------------------------------------------------- */ -static int palmt3_battery_probe(struct device *dev) +static int palmtt3_battery_probe(struct device *dev) { - printk("Battery interface for palmt3 series\n"); + printk("Battery interface for palmtt3 series\n"); return 0; } -static struct device_driver palmt3_battery_driver = { - .name = "palmt3_battchargemon", +static struct device_driver palmtt3_battery_driver = { + .name = "palmtt3_battchargemon", .bus = &platform_bus_type, - .probe = palmt3_battery_probe, + .probe = palmtt3_battery_probe, }; -static int __init palmt3_battery_init(void) +static int __init palmtt3_battery_init(void) { int retval; - retval = driver_register(&palmt3_battery_driver); + retval = driver_register(&palmtt3_battery_driver); if (retval) return retval; #ifdef CONFIG_BATTCHARGE_MONITOR - retval = battery_class_register(&palmt3_battery); - retval = charger_class_register(&palmt3_usb_charger); - retval = charger_class_register(&palmt3_ac_charger); + retval = battery_class_register(&palmtt3_battery); + retval = charger_class_register(&palmtt3_usb_charger); + retval = charger_class_register(&palmtt3_ac_charger); - battery_attach_charger(&palmt3_battery, &palmt3_usb_charger); - battery_attach_charger(&palmt3_battery, &palmt3_ac_charger); + battery_attach_charger(&palmtt3_battery, &palmtt3_usb_charger); + battery_attach_charger(&palmtt3_battery, &palmtt3_ac_charger); - battery_update_charge_link(&palmt3_battery); + battery_update_charge_link(&palmtt3_battery); #endif if (!retval) { #ifdef CONFIG_PM - set_apm_get_power_status(palmt3_apm_get_power_status); + set_apm_get_power_status(palmtt3_apm_get_power_status); #endif } return retval; } -static void __exit palmt3_battery_exit(void) +static void __exit palmtt3_battery_exit(void) { #ifdef CONFIG_BATTCHARGE_MONITOR - battery_remove_charger(0, &palmt3_ac_charger); - battery_remove_charger(0, &palmt3_usb_charger); + battery_remove_charger(0, &palmtt3_ac_charger); + battery_remove_charger(0, &palmtt3_usb_charger); - charger_class_unregister(&palmt3_usb_charger); - charger_class_unregister(&palmt3_ac_charger); - battery_class_unregister(&palmt3_battery); - driver_unregister(&palmt3_battery_driver); + charger_class_unregister(&palmtt3_usb_charger); + charger_class_unregister(&palmtt3_ac_charger); + battery_class_unregister(&palmtt3_battery); + driver_unregister(&palmtt3_battery_driver); #endif } -module_init(palmt3_battery_init); -module_exit(palmt3_battery_exit); +module_init(palmtt3_battery_init); +module_exit(palmtt3_battery_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Vladimir Pouzanov"); Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -1,5 +1,5 @@ /* - * Palm T|T3 hardware buttons + * Palm Tungsten|T3 hardware buttons * * Author: Vladimir "Farcaller" Pouzanov <far...@gm...>, Martin Kupec * @@ -77,24 +77,24 @@ struct input_dev *buttons_dev; -static struct workqueue_struct *palmt3_workqueue; -static struct work_struct palmt3_irq_task; +static struct workqueue_struct *palmtt3_workqueue; +static struct work_struct palmtt3_irq_task; static spinlock_t btn_lock = SPIN_LOCK_UNLOCKED; u16 key_status; u8 slider; -static irqreturn_t palmt3_btn_handle(int irq, void *dev_id) +static irqreturn_t palmtt3_btn_handle(int irq, void *dev_id) { if((int) dev_id == 3) slider = 1; - queue_work(palmt3_workqueue, &palmt3_irq_task); + queue_work(palmtt3_workqueue, &palmtt3_irq_task); return IRQ_HANDLED; } -static void palmt3_irq_queuework(struct work_struct *data) +static void palmtt3_irq_queuework(struct work_struct *data) { unsigned long flags; int row, gpio, i; @@ -225,7 +225,7 @@ } } -static int palmt3_btn_probe(struct platform_device *dev) +static int palmtt3_btn_probe(struct platform_device *dev) { unsigned long flags, ret; @@ -251,8 +251,8 @@ key_status = 0; - palmt3_workqueue = create_workqueue("palmt3btnw"); - INIT_WORK(&palmt3_irq_task, palmt3_irq_queuework); + palmtt3_workqueue = create_workqueue("palmtt3btnw"); + INIT_WORK(&palmtt3_irq_task, palmtt3_irq_queuework); /* Configure GPIOs as Output and low */ spin_lock_irqsave(&btn_lock, flags); @@ -274,7 +274,7 @@ spin_unlock_irqrestore(&btn_lock, flags); #define REG_GPIO(x, e) \ - ret = request_irq (IRQ_GPIO(x), palmt3_btn_handle, SA_SAMPLE_RANDOM, "palmt3_btn", (void*)x); \ + ret = request_irq (IRQ_GPIO(x), palmtt3_btn_handle, SA_SAMPLE_RANDOM, "palmtt3_btn", (void*)x); \ set_irq_type (IRQ_GPIO(x), e); \ if(ret!=0) { \ DBG("Request GPIO: %d failed\n", x); \ @@ -291,9 +291,9 @@ return 0; } -static int palmt3_btn_remove (struct platform_device *dev) +static int palmtt3_btn_remove (struct platform_device *dev) { - destroy_workqueue(palmt3_workqueue); + destroy_workqueue(palmtt3_workqueue); input_unregister_device(buttons_dev); free_irq(IRQ_GPIO(0), (void*) 0); @@ -303,31 +303,31 @@ return 0; } -static struct platform_driver palmt3_buttons_driver = { +static struct platform_driver palmtt3_buttons_driver = { .driver = { - .name = "palmt3-btn", + .name = "palmtt3-btn", .owner = THIS_MODULE, }, - .probe = palmt3_btn_probe, - .remove = palmt3_btn_remove, + .probe = palmtt3_btn_probe, + .remove = palmtt3_btn_remove, #ifdef CONFIG_PM .suspend = NULL, .resume = NULL, #endif }; -static int __init palmt3_btn_init(void) +static int __init palmtt3_btn_init(void) { - return platform_driver_register(&palmt3_buttons_driver); + return platform_driver_register(&palmtt3_buttons_driver); } -static void __exit palmt3_btn_cleanup(void) +static void __exit palmtt3_btn_cleanup(void) { - platform_driver_unregister(&palmt3_buttons_driver); + platform_driver_unregister(&palmtt3_buttons_driver); } -module_init(palmt3_btn_init); -module_exit(palmt3_btn_cleanup); +module_init(palmtt3_btn_init); +module_exit(palmtt3_btn_cleanup); MODULE_AUTHOR("Martin Kupec"); MODULE_DESCRIPTION("Palm T|T3 Buttons driver"); Modified: linux4palm/linux/trunk/drivers/i2c/chips/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/Kconfig 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/i2c/chips/Kconfig 2007-07-07 10:14:52 UTC (rev 1114) @@ -115,7 +115,7 @@ # and having mostly OMAP-specific board support config TPS65010 tristate "TPS6501x Power Management chips" - depends on I2C && (ARCH_OMAP || (MACH_T3XSCALE && INPUT_PALMTT3_PWRBTN)) + depends on I2C && (ARCH_OMAP || MACH_T3XSCALE) default y if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_OSK help If you say yes here you get support for the TPS6501x series of @@ -126,6 +126,14 @@ This driver can also be built as a module. If so, the module will be called tps65010. +config TPS65010_PWRBTN + bool "TPS65010 Power button support" + depends on TPS65010 + default y if MACH_T3XSCALE + help + If you say yes here you get support for PB_ONOFF pins on TPS6501x + series of Power Management chips. This will create input device. + config SENSORS_M41T00 tristate "ST M41T00 RTC chip" depends on I2C && PPC32 Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -41,8 +41,15 @@ // FIXME xscale GPIOs #include <asm/arch/irqs.h> -#if defined(CONFIG_INPUT_PALMTT3_PWRBTN_MODULE) || defined(CONFIG_INPUT_PALMTT3_PWRBTN) -extern int palmtt3_pwr_btn_press(void); +#ifdef CONFIG_TPS65010_PWRBTN +#include <linux/input.h> +#include <linux/input_pda.h> +#include <linux/platform_device.h> + +#define BTN_HOLD_DELAY msecs_to_jiffies(100) + +int tps65010_pwr_btn_press(void); +int tps65010_pwr_btn_release(void); #endif #define T3_TPS65010_GPIO 14 @@ -103,6 +110,10 @@ unsigned model:8; u16 vbus; unsigned long flags; +#ifdef CONFIG_TPS65010_PWRBTN + u8 button_pressed; +#endif + #define FLAG_VBUS_CHANGED 0 #define FLAG_IRQ_ENABLE 1 @@ -113,7 +124,7 @@ /* not currently tracking GPIO state */ }; -#define POWER_POLL_DELAY msecs_to_jiffies(500) +#define POWER_POLL_DELAY msecs_to_jiffies(5000) /*-------------------------------------------------------------------------*/ @@ -211,6 +222,16 @@ #endif +/* + * This function clears button press information on suspend. + * Without this resuming up with power button sends event to suspend. + */ +static int tps65010_resume(struct i2c_client *client) +{ + i2c_smbus_read_byte_data(client, TPS_REGSTATUS); + return 0; +} + #ifdef CONFIG_DEBUG_FS static int dbg_show(struct seq_file *s, void *_) @@ -363,8 +384,9 @@ if (tmp & TPS_REG_ONOFF) { pr_info("%s: power off button\n", DRIVER_NAME); -#if defined(CONFIG_INPUT_PALMTT3_PWRBTN_MODULE) || defined(CONFIG_INPUT_PALMTT3_PWRBTN) - palmtt3_pwr_btn_press(); +#ifdef CONFIG_TPS65010_PWRBTN + tps65010_pwr_btn_press(); + tps->button_pressed = 1; #endif #if 0 @@ -459,6 +481,16 @@ tps->chgconf = tmp; show_chgconfig(tps->por, "update vbus", tmp); } +#ifdef CONFIG_TPS65010_PWRBTN + if (tps->button_pressed) { + if ((1 << 7) & i2c_smbus_read_byte_data(&tps->client, TPS_REGSTATUS)) + schedule_delayed_work(&tps->work, BTN_HOLD_DELAY); + else { + tps->button_pressed = 0; + tps65010_pwr_btn_release(); + } + } +#endif if (test_and_clear_bit(FLAG_IRQ_ENABLE, &tps->flags)) enable_irq(tps->irq); @@ -540,6 +572,10 @@ tps->client.addr = address; tps->client.adapter = bus; tps->client.driver = &tps65010_driver; + tps->client.driver->resume = &tps65010_resume; +#ifdef CONFIG_TPS65010_PWRBTN + tps->button_pressed = 0; +#endif strlcpy(tps->client.name, DRIVER_NAME, I2C_NAME_SIZE); status = i2c_attach_client(&tps->client); @@ -650,8 +686,8 @@ */ tps->nmask1 = ~0; (void) i2c_smbus_write_byte_data(&tps->client, TPS_MASK1, ~tps->nmask1); + tps->nmask2 = TPS_REG_ONOFF; - tps->nmask2 = TPS_REG_ONOFF; if (tps->model == TPS65013) tps->nmask2 |= TPS_REG_NO_CHG; (void) i2c_smbus_write_byte_data(&tps->client, TPS_MASK2, ~tps->nmask2); @@ -1052,7 +1088,83 @@ EXPORT_SYMBOL(tps65013_set_low_pwr); /*-------------------------------------------------------------------------*/ +/* NOTE: PB_ONOFF pins are supported here as input_device + * + */ +#ifdef CONFIG_TPS65010_PWRBTN +#define PWRBTN_REPEAT_DELAY 1000 +#define PWRBTN_REPEAT_PERIOD 500 +struct input_dev *pwr_btn_input; +char keycode = KEY_F8; + + +int tps65010_pwr_btn_press(void) +{ + printk("tps65010_pwr_btn_press\n"); + input_report_key(pwr_btn_input, keycode, 1); + input_sync(pwr_btn_input); + return 0; +} + +int tps65010_pwr_btn_release(void) +{ + printk("tps65010_pwr_btn_release\n"); + input_report_key(pwr_btn_input, keycode, 0); + input_sync(pwr_btn_input); + return 0; +} + + +static int __init tps65010_pwr_btn_probe(struct platform_device *pdev) +{ + + pwr_btn_input = input_allocate_device(); + if (!pwr_btn_input) { + printk("Input device wasn't allocated!\n"); + goto err1; + } + + pwr_btn_input->name = "tps65010-pwr_btn"; + pwr_btn_input->id.bustype = BUS_HOST; + set_bit(EV_KEY, pwr_btn_input->evbit); + + set_bit(EV_REP, pwr_btn_input->evbit); +/* + pwr_btn_input->rep[REP_DELAY] = PWRBTN_REPEAT_DELAY; + pwr_btn_input->rep[REP_PERIOD] = PWRBTN_REPEAT_PERIOD; +*/ + set_bit(keycode,pwr_btn_input->keybit); + input_register_device(pwr_btn_input); + + return 0; +err1: + return -ENOMEM; +} + + +static int tps65010_pwr_btn_remove(struct platform_device *pdev) +{ + input_unregister_device(pwr_btn_input); + return 0; +} + +static struct platform_driver tps65010_pwr_btn_driver = { + .driver = { + .name = "tps65010-pwr_btn", + .owner = THIS_MODULE, + }, + .probe = tps65010_pwr_btn_probe, + .remove = tps65010_pwr_btn_remove, + .suspend = NULL, + .resume = NULL, + +}; +#endif + + + + static int __init tps_init(void) { u32 tries = 3; @@ -1120,6 +1232,9 @@ } #endif +#ifdef CONFIG_TPS65010_PWRBTN + status &= platform_driver_register(&tps65010_pwr_btn_driver); +#endif return status; } /* NOTE: this MUST be initialized before the other parts of the system @@ -1133,7 +1248,9 @@ static void __exit tps_exit(void) { +#ifdef CONFIG_TPS65010_PWRBTN + platform_driver_unregister(&tps65010_pwr_btn_driver); +#endif i2c_del_driver(&tps65010_driver); } module_exit(tps_exit); - Modified: linux4palm/linux/trunk/drivers/input/misc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/Kconfig 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/input/misc/Kconfig 2007-07-07 10:14:52 UTC (rev 1114) @@ -89,10 +89,4 @@ Say Y here if you want to support the built-in real time clock of the HP SDC controller. -config INPUT_PALMTT3_PWRBTN - tristate "Palm Tungsten|T3 Power Button" - depends on MACH_T3XSCALE - help - Say Y here if you want to support the power button of Palm Tungsten|T3 Power Button. - endif Modified: linux4palm/linux/trunk/drivers/input/misc/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/Makefile 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/input/misc/Makefile 2007-07-07 10:14:52 UTC (rev 1114) @@ -12,4 +12,3 @@ obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o -obj-$(CONFIG_INPUT_PALMTT3_PWRBTN) += palmtt3-pwr_btn.o Deleted: linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -1,96 +0,0 @@ -/* - * Palm Tungsten|T3 Power Button Driver - * - * Author: Tomas Cech <Tom...@ma...> - * - * 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/init.h> -#include <linux/input.h> -#include <linux/input_pda.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <linux/platform_device.h> -#include <asm/irq.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/irqs.h> - -#define PWRBTN_REPEAT_DELAY 1000 -#define PWRBTN_REPEAT_PERIOD 500 -struct input_dev *pwr_btn_input; -char keycode = KEY_F8; - - -int palmtt3_pwr_btn_press(void) { - printk("palmtt3_pwr_btn_press\n"); - input_report_key(pwr_btn_input, keycode, 1); - input_report_key(pwr_btn_input, keycode, 0); - input_sync(pwr_btn_input); - return 0; -} - -EXPORT_SYMBOL(palmtt3_pwr_btn_press); - -static int __init palmtt3_pwr_btn_probe(struct platform_device *pdev) -{ - - pwr_btn_input = input_allocate_device(); - if (!pwr_btn_input) { - printk("Input device wasn't allocated!\n"); - goto err1; - } - - pwr_btn_input->name = "palmtt3-pwr_btn"; - pwr_btn_input->id.bustype = BUS_HOST; - set_bit(EV_KEY, pwr_btn_input->evbit); - set_bit(keycode,pwr_btn_input->keybit); - input_register_device(pwr_btn_input); - - return 0; -err1: - return -ENOMEM; -} - - -static int palmtt3_pwr_btn_remove(struct platform_device *pdev) -{ - input_unregister_device(pwr_btn_input); - return 0; -} - -static struct platform_driver palmtt3_pwr_btn_driver = { - .driver = { - .name = "palmtt3-pwr_btn", - .owner = THIS_MODULE, - }, - .probe = palmtt3_pwr_btn_probe, - .remove = palmtt3_pwr_btn_remove, - .suspend = NULL, - .resume = NULL, - -}; - -static int __devinit palmtt3_pwr_btn_init(void) -{ - return platform_driver_register(&palmtt3_pwr_btn_driver); -} - -static void __exit palmtt3_pwr_btn_exit(void) -{ - platform_driver_unregister(&palmtt3_pwr_btn_driver); -} - -module_init(palmtt3_pwr_btn_init); -module_exit(palmtt3_pwr_btn_exit); - -MODULE_AUTHOR("Tomas Cech <Tom...@ma...>"); -MODULE_DESCRIPTION("Power Button for Palm Tungsten|T3"); -MODULE_LICENSE("GPL"); Modified: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-07 09:02:20 UTC (rev 1113) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-07 10:14:52 UTC (rev 1114) @@ -49,7 +49,8 @@ if (value) palmtt3led_work.led1 = ON; else - palmtt3led_work.led1 = OFF; +/* NOTE: This is set to OFF, not to OFF... It shows charging status - plugged/unplugged... */ + palmtt3led_work.led1 = UNDER_CHG_CTRL; schedule_work(&(palmtt3led_work.work)); } @@ -67,8 +68,7 @@ if (value) palmtt3led_work.led1 = BLINK; else -/* NOTE: This is set to OFF, not to OFF... It shows charging status - plugged/unplugged... */ - palmtt3led_work.led1 = UNDER_CHG_CTRL; + palmtt3led_work.led1 = OFF; schedule_work(&(palmtt3led_work.work)); } @@ -120,6 +120,20 @@ return 0; } +static int palmtt3led_suspend_late(struct platform_device *dev, pm_message_t state) +{ + tps65010_set_led(LED1, OFF); + tps65010_set_led(LED2, OFF); + tps65010_set_vib(OFF); + return 0; +} + +static int palmtt3led_resume_early(struct platform_device *dev) +{ + schedule_work(&(palmtt3led_work.work)); + return 0; +} + static int palmtt3led_resume(struct platform_device *dev) { led_classdev_resume(&palmtt3_red_led); @@ -163,6 +177,9 @@ led_classdev_unregister(&palmtt3_green_blink_led); } + palmtt3led_work.led1 = UNDER_CHG_CTRL; + palmtt3led_work.led2 = OFF; + palmtt3led_work.vibra = OFF; INIT_WORK(&(palmtt3led_work.work),tps650101_scheduled_leds); return ret; } @@ -183,6 +200,8 @@ #ifdef CONFIG_PM .suspend = palmtt3led_suspend, .resume = palmtt3led_resume, + .suspend_late = palmtt3led_suspend_late, + .resume_early = palmtt3led_resume_early, #endif .driver = { .name = "palmtt3-led", Added: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-gpio.h (rev 0) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-gpio.h 2007-07-07 10:14:52 UTC (rev 1114) @@ -0,0 +1,54 @@ +/* + * GPIOs and interrupts for Palm Tungsten|T3 Handheld Computer + * + * Copied from on palmt5-gpio.h by Marek Vasut and T|T3 files + * + * Authors: Tomas Cech <Tom...@ma...> + * + * 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. + * + * + * this code is in a very early stage: + * - use it at your own risk + * - any help is encouraged and will be highly appreciated + * + */ + +#ifndef _INCLUDE_PALMTT3_GPIO_H_ + +#define _INCLUDE_PALMTT3_GPIO_H_ + + +#define T3_TPS65010_GPIO 14 +#define PALMTT3_GPIO_TSC2101_SS (24) +#define PALMTT3_GPIO_PENDOWN (37) +#define PALMTT3_IRQ_GPIO_PENDOWN IRQ_GPIO(PALMTT3_GPIO_PENDOWN) + +#define GPIO_NR_PALMTT3_ICP_RXD 46 // Infrared receive pin +#define GPIO_NR_PALMTT3_ICP_TXD 47 // Infrared transmit pin +#define GPIO_NR_PALMTT3_IR_DISABLE 36 + +#define GPIO_NR_PALMTT3_ICP_RXD_MD (GPIO_NR_PALMTT3_ICP_RXD | GPIO_ALT_FN_1_IN) +#define GPIO_NR_PALMTT3_ICP_TXD_MD (GPIO_NR_PALMTT3_ICP_TXD | GPIO_ALT_FN_2_OUT) + +#define GPIO_NR_PALMTT3_USB_POWER 53 +#define GPIO_NR_PALMTT3_PUC_USB_POWER 85 +#define GPIO_NR_PALMTT3_USB_DETECT 9 + +#define GPIO_NR_PALMTT3_TPS65010_BT_POWER 4 +#define GPIO_NR_PALMTT3_RESET 84 + + +#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) + +#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. |
From: <bob...@us...> - 2007-07-07 09:02:21
|
Revision: 1113 http://svn.sourceforge.net/hackndev/?rev=1113&view=rev Author: bobofdoom Date: 2007-07-07 02:02:20 -0700 (Sat, 07 Jul 2007) Log Message: ----------- TOOLS: serial-loader: Setup GPIOs on startup to enable LCD + backlight. Modified Paths: -------------- linux4palm/tools/serial-loader/bin2sandal.py Modified: linux4palm/tools/serial-loader/bin2sandal.py =================================================================== --- linux4palm/tools/serial-loader/bin2sandal.py 2007-07-07 08:51:32 UTC (rev 1112) +++ linux4palm/tools/serial-loader/bin2sandal.py 2007-07-07 09:02:20 UTC (rev 1113) @@ -36,6 +36,34 @@ if len(sys.argv) > 2: outf = file(sys.argv[2], 'wb') +def put(s): + for c in s: + outf.write(c) + outf.flush() + time.sleep(0.001) + +# setup gpios +put('w 0x40e0000c=0xc3ef001c\r\n') # GPDR0 +put('w 0x40e00010=0xff22ab93\r\n') # GPDR1 +put('w 0x40e00014=0x9b1cffff\r\n') # GPDR2 +put('w 0x40e0010c=0x01f7e785\r\n') # GPDR3 + +put('w 0x40e00054=0x08000000\r\n') # GAFR0_L +put('w 0x40e00058=0xa51a8002\r\n') # GAFR0_U +#put('w 0x40e0005c=0x69989940\r\n') # GAFR1_L +#put('w 0x40e00060=0x69989940\r\n') # GAFR1_U +put('w 0x40e00064=0x0aaaaaaa\r\n') # GAFR2_L +put('w 0x40e00068=0x08040c08\r\n') # GAFR2_U +put('w 0x40e0006c=0x010a950c\r\n') # GAFR3_L +put('w 0x40e00070=0x00001400\r\n') # GAFR3_U + +put('w 0x40e00018=0x051ba5ff\r\n') # GPSR0 +put('w 0x40e0001c=0x65fd5fbc\r\n') # GPSR1 +put('w 0x40e00020=0x42fb2d93\r\n') # GPSR2 +put('w 0x40e00118=0x0066138d\r\n') # GPSR3 + +put('\r\n') + address = LOAD_ADDR while 1: @@ -46,7 +74,7 @@ value, = struct.unpack('<I', data) - outf.write('w 0x%x=0x%x\r\n' % (address, value)) + put('w 0x%x=0x%x\r\n' % (address, value)) address += 4 @@ -54,4 +82,4 @@ outf.flush() time.sleep(0.02) -outf.write('x 0x%x\r\n' % LOAD_ADDR) +put('x 0x%x\r\n' % LOAD_ADDR) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-07 08:51:33
|
Revision: 1112 http://svn.sourceforge.net/hackndev/?rev=1112&view=rev Author: bobofdoom Date: 2007-07-07 01:51:32 -0700 (Sat, 07 Jul 2007) Log Message: ----------- PalmLD: Configure MMC GPIOs on boot. Closes: 21 Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-07 04:17:31 UTC (rev 1111) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-07 08:51:32 UTC (rev 1112) @@ -68,6 +68,14 @@ { int err; + pxa_gpio_mode(GPIO32_MMCCLK_MD); + pxa_gpio_mode(GPIO112_MMCCMD_MD); + pxa_gpio_mode(GPIO92_MMCDAT0_MD); + pxa_gpio_mode(GPIO109_MMCDAT1_MD); + pxa_gpio_mode(GPIO110_MMCDAT2_MD); + pxa_gpio_mode(GPIO111_MMCDAT3_MD); + pxa_gpio_mode(GPIO_NR_PALMLD_SD_DETECT_N | GPIO_IN); + /** * Setup an interrupt for detecting card insert/remove events */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-07 04:17:33
|
Revision: 1111 http://svn.sourceforge.net/hackndev/?rev=1111&view=rev Author: bobofdoom Date: 2007-07-06 21:17:31 -0700 (Fri, 06 Jul 2007) Log Message: ----------- TOOLS: Added license note (GPL 2 or 3) to serial-loader. Modified Paths: -------------- linux4palm/tools/serial-loader/README Modified: linux4palm/tools/serial-loader/README =================================================================== --- linux4palm/tools/serial-loader/README 2007-07-07 04:08:39 UTC (rev 1110) +++ linux4palm/tools/serial-loader/README 2007-07-07 04:17:31 UTC (rev 1111) @@ -49,7 +49,24 @@ mem=32M console=ttyS0,115200 +License +------- +Copyright (C) 2007 Alex Osborne + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 +or at your option version 3 as published by the Free Software Foundation + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ---- Alex Osborne <alex at-sign hackndev dot com> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-07 04:08:43
|
Revision: 1110 http://svn.sourceforge.net/hackndev/?rev=1110&view=rev Author: bobofdoom Date: 2007-07-06 21:08:39 -0700 (Fri, 06 Jul 2007) Log Message: ----------- TOOLS: Initial revision of a quick and dirty bootloader for the palmld's "sandal" serial recovery console. Added Paths: ----------- linux4palm/tools/serial-loader/ linux4palm/tools/serial-loader/Makefile linux4palm/tools/serial-loader/README linux4palm/tools/serial-loader/bin2sandal.py linux4palm/tools/serial-loader/ql.py linux4palm/tools/serial-loader/quickload.S linux4palm/tools/serial-loader/quickload.lds Added: linux4palm/tools/serial-loader/Makefile =================================================================== --- linux4palm/tools/serial-loader/Makefile (rev 0) +++ linux4palm/tools/serial-loader/Makefile 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,21 @@ +CROSS_COMPILE?=arm-softfloat-linux-gnueabi- +CC=${CROSS_COMPILE}gcc +OBJCOPY=${CROSS_COMPILE}objcopy +LDFLAGS=-nostdlib -Wall -pipe -Tquickload.lds -g -O2 +CFLAGS=-g -O2 + +SRCS=quickload.S #quickload.c + +all: quickload.sandal + +quickload.sandal: quickload.bin + ./bin2sandal.py quickload.bin quickload.sandal + +quickload.bin: quickload.elf + ${OBJCOPY} -O binary quickload.elf quickload.bin + +quickload.elf: ${SRCS} quickload.lds + ${CC} $(LDFLAGS) ${SRCS} -o quickload.elf + +clean: + rm -f quickload.bin quickload.elf quickload.sandal *.s Added: linux4palm/tools/serial-loader/README =================================================================== --- linux4palm/tools/serial-loader/README (rev 0) +++ linux4palm/tools/serial-loader/README 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,55 @@ +-------------------- +Serial Loading Tools +-------------------- + +This collection of tools enables you to boot Linux on a palmld PDA via the +'Sandal' recovery console on the serial port. They may also be useful for other +devices. + +Usage +----- + +Connect PDA to PC's serial port. You'll need to convert between the PDA's TTL +level serial port and your PCs RS232. Alternatively you can get a something +like a Nokia DKU-5 data cable which does TTL serial -> USB conversion. + +Open the serial port using something like minicom at a baud rate of 115200 with +both software and hardware flow control disabled. + +Reset the PDA while holding down the hotsync button. The LCD should remain off +indicating the recovery console has been entered. On the PC you should see the +Sandal prompt. Check to make sure the link is working by typing a command such +as "w 0". + +Compile the 'quickload' bootloader by typing 'make'. Upload the bootloader to +the PDA using a command like: + + ./bin2sandal.py -d quickload.bin > /dev/ttyUSB0 + +In minicom you should see a bunch memory write commands hopefully ending in +quickload's prompt "Q?" . + +Upload your kernel image using ql.py: + + ./ql.py < zImage > /dev/ttyUSB0 + +This may take a while, ql.py will print the progress percentage and you should +see the bootloader replying with lots of dots in minicom. When the upload is +complete ql.py will exit and the bootloader will print 'G' and then attempt to +jump to the image. + + +Kernel Note +----------- + +Quickload doesn't support passing a kernel command line at the moment so you'll +want to compile one into kernel itself. Normally you'll want to at least +specify the RAM size of the device and put the console on the serial port like +this: + + mem=32M console=ttyS0,115200 + + +---- +Alex Osborne +<alex at-sign hackndev dot com> Added: linux4palm/tools/serial-loader/bin2sandal.py =================================================================== --- linux4palm/tools/serial-loader/bin2sandal.py (rev 0) +++ linux4palm/tools/serial-loader/bin2sandal.py 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,57 @@ +#!/usr/bin/env python +# +# This script takes an executable binary image (such as a zImage) and spits out +# a bunch of commands for the "Sandal" recovery console on the LD which loads +# the image into RAM and then executes it. +# +# eg. ./bin2sandal -d quickload.bin > /dev/ttyUSB0 +# +# The -d option introduces a short delay to prevent the Sandal console from being +# overwhelmed. +# +# Author: Alex Osborne <alex at-sign hackndev dot com> +# Created: Jul 2007 + +LOAD_ADDR=0xa0000000 + +import sys +import struct +import time + +if len(sys.argv) > 1 and sys.argv[1] in ['-h', '--help']: + print 'Usage: %s [-d] [input binary file] [output sandal commands file]' % sys.argv[0] + sys.exit(1) + +inf = sys.stdin +outf = sys.stdout +delay = False + +if len(sys.argv) > 1 and sys.argv[1] == '-d': + delay = True + sys.argv.pop(1) + +if len(sys.argv) > 1: + inf = file(sys.argv[1], 'rb') + +if len(sys.argv) > 2: + outf = file(sys.argv[2], 'wb') + +address = LOAD_ADDR + +while 1: + data = inf.read(4) + if not data: break + + data += '\0' * (4 - len(data)) # pad with zeros to make full dword + + value, = struct.unpack('<I', data) + + outf.write('w 0x%x=0x%x\r\n' % (address, value)) + + address += 4 + + if delay: + outf.flush() + time.sleep(0.02) + +outf.write('x 0x%x\r\n' % LOAD_ADDR) Property changes on: linux4palm/tools/serial-loader/bin2sandal.py ___________________________________________________________________ Name: svn:executable + * Added: linux4palm/tools/serial-loader/ql.py =================================================================== --- linux4palm/tools/serial-loader/ql.py (rev 0) +++ linux4palm/tools/serial-loader/ql.py 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# +# Quick and dirty script for sending an image to the 'quickload' serial +# bootloader. +# +# eg. ./ql.py < zImage > /dev/ttyUSB0 +# +# Author: Alex Osborne <alex at-sign hackndev dot com> +# Created: July 2007 + +import sys +import struct +import time + +image = sys.stdin.read() + +# anything before a 'G' will be echoed by bootloader +sys.stdout.write('ql.py: uploading image...\r\n') + +# notify bootloader to begin listening +sys.stdout.write('G') + +# output the size of the image +sys.stdout.write(struct.pack('<I', len(image))) + +# write out image +i = 0 +for c in image: + sys.stdout.write(c) + sys.stdout.flush() + + # print progress percentage + i += 1 + if (i % 1000) == 0: + sys.stderr.write('%f\n' % (i / float(len(image)) * 100)) + sys.stderr.flush() Property changes on: linux4palm/tools/serial-loader/ql.py ___________________________________________________________________ Name: svn:executable + * Added: linux4palm/tools/serial-loader/quickload.S =================================================================== --- linux4palm/tools/serial-loader/quickload.S (rev 0) +++ linux4palm/tools/serial-loader/quickload.S 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,138 @@ +@ quickload.S - primitive serial bootloader for pxa devices +@ +@ This bootloader enables you to load and execute a kernel image via the serial +@ port using a very simple transfer protocol. The bootloader expects the system +@ to have the MMU disabled. +@ +@ Protocol: +@ +@ Upon starting the bootloader will output the prompt 'Q?'. It will then read +@ echo characters until it encounters a 'G' character. This echo mode is to +@ allow reliability testing of the link and to soak up any stray characters that +@ may have been received. Upon receiving 'G' the bootloader will read a DWORD +@ which it treats as the length of the kernel image. It will then read that +@ many bytes loading them into RAM starting at 0xA0008000. It prints a '.' +@ character every 256 or so bytes. After the image loading is complete it +@ prints 'D' and jumps to the start of the image. +@ +@ Author: Alex Osborne <alex at-sign hackndev dot com> +@ Created: July 2007 +@ + +.text +.globl _start +_start: + b _copier + +@ magic number for tools to recognize us (currently unused) + .word 0xb007104d + +@ here we store how many bytes will be uploaded +data_length: + .word 0x0 + +_copier: +@ figure out where we are loaded + mov r7, pc + sub r7, #(_copier-_start+8) + +@ r5 := FFUART base + mov r5, #0x40000000 + orr r5, #0x00100000 + +@ show our ready prompt "Q?" + mov r0, #'Q' + bl ffuart_putc + mov r0, #'?' + bl ffuart_putc + +@ echo until we get a 'G' indicating start of transmission +wait_ready: + bl ffuart_getc + bl ffuart_putc + cmp r0, #'G' + bne wait_ready + +@ read in the length of the image + mov r0, #0 + str r0, [r7, #8] + + bl ffuart_getc + strb r0, [r7, #8] + bl ffuart_getc + strb r0, [r7, #8 + 1] + bl ffuart_getc + strb r0, [r7, #8 + 2] + bl ffuart_getc + strb r0, [r7, #8 + 3] + + +@ start loading in the image + mov r1, #0xa0000000 + orr r1, #0x00008000 + ldr r2, [r7, #8] @ remaining bytes + +_loop: + @ if no remaining bytes, goto done + cmp r2, #0 + beq done + + @ decrement remaining bytes + sub r2, #1 + + @ print '.' every now and then + and r0, r2, #0xff + cmp r0, #0 + mov r0, #'.' + bleq ffuart_putc + + @ get a character + bl ffuart_getc + + @ store it in RAM + strb r0, [r1] + + @ increment our storage location + add r1, #1 + + + b _loop + +done: + mov r0, #'D' + bl ffuart_putc + + @ setup the kernel parameters + mov r0, #0 + mov r1, #0x340 @ mach id + orr r1, #0x003 @ 0x343 = palmld + mov r2, #0 @ atag base + + @ jump to the kernel image + mov r3, #0xa0000000 + orr r3, #0x00008000 + mov pc, r3 + +ffuart_putc: +@ wait for LSR to show we're ready to transmit + ldr r6, [r5, #0x14] @ get LSR + and r6, #0x32 @ is TDRQ set? + cmp r6, #0 + beq ffuart_putc + + str r0, [r5] @ put character into THR + + mov pc, lr + +ffuart_getc: +@ wait for LSR to show we're ready to receive + ldr r6, [r5, #0x14] @ get LSR + and r6, #1 @ is DR set? + cmp r6, #0 + beq ffuart_getc + + ldr r0, [r5] @ get character from RBR + + mov pc, lr + + Added: linux4palm/tools/serial-loader/quickload.lds =================================================================== --- linux4palm/tools/serial-loader/quickload.lds (rev 0) +++ linux4palm/tools/serial-loader/quickload.lds 2007-07-07 04:08:39 UTC (rev 1110) @@ -0,0 +1,14 @@ +SECTIONS +{ + /* This is the location that bootmenu will be copied to. + Set it to a safe place that will not squash any PalmOS + data. + */ + . = 0xa0100000; + + .text : { *(.text) } + .data : { *(.data) } + .bss : { *(.bss) } + _end = .; + _length = _end - _start; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-06 11:51:04
|
Revision: 1109 http://svn.sourceforge.net/hackndev/?rev=1109&view=rev Author: bobofdoom Date: 2007-07-06 04:51:00 -0700 (Fri, 06 Jul 2007) Log Message: ----------- qemu: Enable specifying a ROM image with the environment variable 'QEMU_ROM' for palmld machine. Modified Paths: -------------- qemu/trunk/hw/palm.c Modified: qemu/trunk/hw/palm.c =================================================================== --- qemu/trunk/hw/palm.c 2007-07-06 08:56:42 UTC (rev 1108) +++ qemu/trunk/hw/palm.c 2007-07-06 11:51:00 UTC (rev 1109) @@ -930,7 +930,8 @@ uint32_t ld_ram = 0x02000000; uint32_t ld_rom = 0x00080000; uint32_t ld_ram_int = 0x00040000; - struct pxa2xx_state_s *cpu; + struct pxa2xx_state_s *cpu; + char *rom_file = getenv("QEMU_ROM"); cpu = pxa270_init(ram_size, ds, "pxa270-c0"); @@ -964,13 +965,16 @@ ld_microdrive_attach(cpu); /* Setup initial (reset) machine state */ -// cpu->env->regs[15] = 0; cpu->env->regs[15] = PXA2XX_SDRAM_BASE; + if (rom_file) + cpu->env->regs[15] = 0; memset(phys_ram_base, 0, ld_ram); memset(phys_ram_base + ld_ram, 0, ld_rom); -// load_image("../../BOOTROM/palmld.rom", phys_ram_base + ld_ram); + if (rom_file) + load_image(rom_file, phys_ram_base + ld_ram); + arm_load_kernel(cpu->env, ld_ram, kernel_filename, kernel_cmdline, initrd_filename, 835, PXA2XX_SDRAM_BASE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-06 08:56:47
|
Revision: 1108 http://svn.sourceforge.net/hackndev/?rev=1108&view=rev Author: marex_z71 Date: 2007-07-06 01:56:42 -0700 (Fri, 06 Jul 2007) Log Message: ----------- PalmLD, PalmTX, PalmZ72, PalmT5: drop some useless ifdefs from battery driver Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_battery.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt5/palmt5_battery.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_battery.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_battery.c 2007-07-05 18:20:31 UTC (rev 1107) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_battery.c 2007-07-06 08:56:42 UTC (rev 1108) @@ -247,7 +247,6 @@ /* register battery to APM layer */ bat.battery_registered = 0; -#ifdef CONFIG_POWER_SUPPLY if(power_supply_register(NULL, &palmld_battery)) { printk(KERN_ERR "palmld_ac97_probe: could not register battery class\n"); } @@ -255,7 +254,6 @@ bat.battery_registered = 1; printk("Battery registered\n"); } -#endif #if defined(CONFIG_APM_EMULATION) || defined(CONFIG_APM_MODULE) apm_get_power_status_orig = apm_get_power_status; apm_get_power_status = palmld_apm_get_power_status; @@ -272,9 +270,7 @@ static void __exit palmld_wm97xx_exit(void) { /* TODO - recover APM callback to original state */ -#ifdef CONFIG_POWER_SUPPLY power_supply_unregister(&palmld_battery); -#endif driver_unregister(&palmld_wm97xx_driver); } Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt5/palmt5_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt5/palmt5_battery.c 2007-07-05 18:20:31 UTC (rev 1107) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt5/palmt5_battery.c 2007-07-06 08:56:42 UTC (rev 1108) @@ -257,7 +257,6 @@ /* register battery to APM layer */ bat.battery_registered = 0; -#ifdef CONFIG_POWER_SUPPLY if(power_supply_register(NULL, &palmt5_battery)) { printk(KERN_ERR "palmt5_ac97_probe: could not register battery class\n"); } @@ -265,7 +264,6 @@ bat.battery_registered = 1; printk("Battery registered\n"); } -#endif #if defined(CONFIG_APM_EMULATION) || defined(CONFIG_APM_MODULE) apm_get_power_status_orig = apm_get_power_status; apm_get_power_status = palmt5_apm_get_power_status; @@ -282,9 +280,7 @@ static void __exit palmt5_wm97xx_exit(void) { /* TODO - recover APM callback to original state */ -#ifdef CONFIG_POWER_SUPPLY power_supply_unregister(&palmt5_battery); -#endif driver_unregister(&palmt5_wm97xx_driver); } Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_battery.c 2007-07-05 18:20:31 UTC (rev 1107) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_battery.c 2007-07-06 08:56:42 UTC (rev 1108) @@ -262,7 +262,6 @@ /* register battery to APM layer */ bat.battery_registered = 0; -#ifdef CONFIG_POWER_SUPPLY if(power_supply_register(NULL, &palmtx_battery)) { printk(KERN_ERR "palmtx_ac97_probe: could not register battery class\n"); } @@ -270,7 +269,6 @@ bat.battery_registered = 1; printk("Battery registered\n"); } -#endif #if defined(CONFIG_APM_EMULATION) || defined(CONFIG_APM_MODULE) apm_get_power_status_orig = apm_get_power_status; apm_get_power_status = palmtx_apm_get_power_status; @@ -287,9 +285,7 @@ static void __exit palmtx_wm97xx_exit(void) { /* TODO - recover APM callback to original state */ -#ifdef CONFIG_POWER_SUPPLY power_supply_unregister(&palmtx_battery); -#endif driver_unregister(&palmtx_wm97xx_driver); } Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_battery.c 2007-07-05 18:20:31 UTC (rev 1107) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_battery.c 2007-07-06 08:56:42 UTC (rev 1108) @@ -262,7 +262,6 @@ /* register battery to APM layer */ bat.battery_registered = 0; -#ifdef CONFIG_POWER_SUPPLY if(power_supply_register(NULL, &palmz72_battery)) { printk(KERN_ERR "palmz72_ac97_probe: could not register battery class\n"); } @@ -270,7 +269,6 @@ bat.battery_registered = 1; printk("Battery registered\n"); } -#endif #if defined(CONFIG_APM_EMULATION) || defined(CONFIG_APM_MODULE) apm_get_power_status_orig = apm_get_power_status; apm_get_power_status = palmz72_apm_get_power_status; @@ -287,9 +285,7 @@ static void __exit palmz72_wm97xx_exit(void) { /* TODO - recover APM callback to original state */ -#ifdef CONFIG_POWER_SUPPLY power_supply_unregister(&palmz72_battery); -#endif driver_unregister(&palmz72_wm97xx_driver); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-05 18:20:35
|
Revision: 1107 http://svn.sourceforge.net/hackndev/?rev=1107&view=rev Author: sleep_walker Date: 2007-07-05 11:20:31 -0700 (Thu, 05 Jul 2007) Log Message: ----------- palmt3: forgoten file Added Paths: ----------- linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c Added: linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c (rev 0) +++ linux4palm/linux/trunk/drivers/input/misc/palmtt3-pwr_btn.c 2007-07-05 18:20:31 UTC (rev 1107) @@ -0,0 +1,96 @@ +/* + * Palm Tungsten|T3 Power Button Driver + * + * Author: Tomas Cech <Tom...@ma...> + * + * 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/init.h> +#include <linux/input.h> +#include <linux/input_pda.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <asm/irq.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/irqs.h> + +#define PWRBTN_REPEAT_DELAY 1000 +#define PWRBTN_REPEAT_PERIOD 500 +struct input_dev *pwr_btn_input; +char keycode = KEY_F8; + + +int palmtt3_pwr_btn_press(void) { + printk("palmtt3_pwr_btn_press\n"); + input_report_key(pwr_btn_input, keycode, 1); + input_report_key(pwr_btn_input, keycode, 0); + input_sync(pwr_btn_input); + return 0; +} + +EXPORT_SYMBOL(palmtt3_pwr_btn_press); + +static int __init palmtt3_pwr_btn_probe(struct platform_device *pdev) +{ + + pwr_btn_input = input_allocate_device(); + if (!pwr_btn_input) { + printk("Input device wasn't allocated!\n"); + goto err1; + } + + pwr_btn_input->name = "palmtt3-pwr_btn"; + pwr_btn_input->id.bustype = BUS_HOST; + set_bit(EV_KEY, pwr_btn_input->evbit); + set_bit(keycode,pwr_btn_input->keybit); + input_register_device(pwr_btn_input); + + return 0; +err1: + return -ENOMEM; +} + + +static int palmtt3_pwr_btn_remove(struct platform_device *pdev) +{ + input_unregister_device(pwr_btn_input); + return 0; +} + +static struct platform_driver palmtt3_pwr_btn_driver = { + .driver = { + .name = "palmtt3-pwr_btn", + .owner = THIS_MODULE, + }, + .probe = palmtt3_pwr_btn_probe, + .remove = palmtt3_pwr_btn_remove, + .suspend = NULL, + .resume = NULL, + +}; + +static int __devinit palmtt3_pwr_btn_init(void) +{ + return platform_driver_register(&palmtt3_pwr_btn_driver); +} + +static void __exit palmtt3_pwr_btn_exit(void) +{ + platform_driver_unregister(&palmtt3_pwr_btn_driver); +} + +module_init(palmtt3_pwr_btn_init); +module_exit(palmtt3_pwr_btn_exit); + +MODULE_AUTHOR("Tomas Cech <Tom...@ma...>"); +MODULE_DESCRIPTION("Power Button for Palm Tungsten|T3"); +MODULE_LICENSE("GPL"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-05 14:05:16
|
Revision: 1106 http://svn.sourceforge.net/hackndev/?rev=1106&view=rev Author: sleep_walker Date: 2007-07-05 07:04:39 -0700 (Thu, 05 Jul 2007) Log Message: ----------- palmtt3: wbsd led 'triggered', leds are safer, gpioed-ng would compile everytime Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c linux4palm/linux/trunk/drivers/misc/gpioed-ng.c linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c Modified: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -20,46 +20,65 @@ #include <asm/arch/tps65010.h> +struct palmtt3led_work_type { + struct work_struct work; + int led1; + int led2; + int vibra; +} palmtt3led_work; + + +static void tps650101_scheduled_leds(struct work_struct *work) +{ + tps65010_set_led(LED1,palmtt3led_work.led1); + tps65010_set_led(LED2,palmtt3led_work.led2); + tps65010_set_vib(palmtt3led_work.vibra); +} + static void palmtt3led_red_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED2, ON); + palmtt3led_work.led2 = ON; else - tps65010_set_led(LED2, OFF); + palmtt3led_work.led2 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_green_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED1, ON); + palmtt3led_work.led1 = ON; else -/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ - tps65010_set_led(LED1, UNDER_CHG_CTRL); + palmtt3led_work.led1 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_red_blink_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED2, BLINK); + palmtt3led_work.led2 = BLINK; else - tps65010_set_led(LED2, OFF); + palmtt3led_work.led2 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_green_blink_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED1, BLINK); + palmtt3led_work.led1 = BLINK; else -/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ - tps65010_set_led(LED1, UNDER_CHG_CTRL); +/* NOTE: This is set to OFF, not to OFF... It shows charging status - plugged/unplugged... */ + palmtt3led_work.led1 = UNDER_CHG_CTRL; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3_vibra_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_vib(ON); + palmtt3led_work.vibra = ON; else - tps65010_set_vib(OFF); + palmtt3led_work.vibra = OFF; + schedule_work(&(palmtt3led_work.work)); } @@ -144,6 +163,7 @@ led_classdev_unregister(&palmtt3_green_blink_led); } + INIT_WORK(&(palmtt3led_work.work),tps650101_scheduled_leds); return ret; } Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -98,6 +98,7 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); break; #ifdef CONFIG_MACH_T3XSCALE +#if defined(CONFIG_TPS65010) || (defined(CONFIG_GPIOEDNG_MODULE) && defined(CONFIG_TPS65010_MODULE)) case 'T': tps65010_set_gpio_out_value(id, 1); printk(KERN_ERR "GPIOed: GPIO %lu set high on TPS65010\n", id); @@ -107,6 +108,7 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low on TPS65010\n", id); break; #endif +#endif case 'd': GPDR(id) &= ~(GPIO_bit(id)); break; Modified: linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c =================================================================== --- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -22,6 +22,7 @@ #include <linux/mmc/host.h> #include <linux/blkdev.h> #include <linux/mmc/protocol.h> +#include <linux/leds.h> #include <linux/highmem.h> @@ -1269,15 +1270,10 @@ tps65010_set_gpio_out_value(GPIO3, HIGH); } - if(host->tps_duty & TPS_LED_OFF) + if(host->tps_duty & TPS_LED_ON) { - DBG("Turning led off\n"); - tps65010_set_led(LED2, OFF); - } - else if(host->tps_duty & TPS_LED_ON) - { DBG("Blinking led\n"); - tps65010_set_led(LED2, ON); + ledtrig_mmc_activity(); } host->tps_duty = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-05 11:04:07
|
Revision: 1105 http://svn.sourceforge.net/hackndev/?rev=1105&view=rev Author: sleep_walker Date: 2007-07-05 04:03:48 -0700 (Thu, 05 Jul 2007) Log Message: ----------- palmtt3: cumulative patch - led support, power button initial support Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c linux4palm/linux/trunk/drivers/i2c/chips/Kconfig linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c linux4palm/linux/trunk/drivers/input/misc/Kconfig linux4palm/linux/trunk/drivers/input/misc/Makefile linux4palm/linux/trunk/drivers/leds/Kconfig linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-07-05 11:03:48 UTC (rev 1105) @@ -36,9 +36,10 @@ #include <asm/arch/pxa-pm_ll.h> #include <asm/arch/pxapwm-bl.h> + #include "../generic.h" -// FIXME move this to include/asm/arch/plamt3.h some time +// FIXME move this to include/asm/arch/palmtt3.h some time #define PALMT3_GPIO_TSC2101_SS (24) #define PALMT3_GPIO_PENDOWN (37) #define PALMT3_IRQ_GPIO_PENDOWN IRQ_GPIO(PALMT3_GPIO_PENDOWN) @@ -201,6 +202,19 @@ .period = 0x12B, }; +/*** LEDs ***/ +static struct platform_device palmtt3_led_device = { + .name = "palmtt3-led", + .id = -1, +}; + +/*** Power button ***/ +static struct platform_device palmtt3_power_button = { + .name = "palmtt3-pwr_btn", + .id = -1, +}; + + static struct platform_device palmt3_backlight_device = { .name = "pxapwm-bl", .dev = { @@ -215,7 +229,7 @@ void palmt3_suspend(unsigned long ret) { unsigned long * addr; - + addr = (unsigned long *) 0xC0000000; _PM_backup[0] = *addr; *addr = 0xFEEDC0DE; @@ -260,6 +274,8 @@ &tsc2101_device, &palmt3_btn_device, &palmt3_backlight_device, + &palmtt3_led_device, + &palmtt3_power_button, }; static void __init palmt3_init(void) Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-07-05 11:03:48 UTC (rev 1105) @@ -230,7 +230,7 @@ unsigned long flags, ret; buttons_dev = input_allocate_device(); - buttons_dev->evbit[0] = BIT(EV_KEY); + buttons_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); buttons_dev->name = "Palm T|T3 buttons"; buttons_dev->id.bustype = BUS_HOST; Modified: linux4palm/linux/trunk/drivers/i2c/chips/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/Kconfig 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/i2c/chips/Kconfig 2007-07-05 11:03:48 UTC (rev 1105) @@ -115,7 +115,7 @@ # and having mostly OMAP-specific board support config TPS65010 tristate "TPS6501x Power Management chips" - depends on I2C && (ARCH_OMAP || MACH_T3XSCALE) + depends on I2C && (ARCH_OMAP || (MACH_T3XSCALE && INPUT_PALMTT3_PWRBTN)) default y if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_OSK help If you say yes here you get support for the TPS6501x series of Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-07-05 11:03:48 UTC (rev 1105) @@ -40,6 +40,11 @@ #ifdef CONFIG_MACH_T3XSCALE // T3 patch // FIXME xscale GPIOs #include <asm/arch/irqs.h> + +#if defined(CONFIG_INPUT_PALMTT3_PWRBTN_MODULE) || defined(CONFIG_INPUT_PALMTT3_PWRBTN) +extern int palmtt3_pwr_btn_press(void); +#endif + #define T3_TPS65010_GPIO 14 #else @@ -48,7 +53,6 @@ #endif // T3 patch #include <asm/arch/tps65010.h> - /*-------------------------------------------------------------------------*/ #define DRIVER_VERSION "2 May 2005" @@ -109,7 +113,7 @@ /* not currently tracking GPIO state */ }; -#define POWER_POLL_DELAY msecs_to_jiffies(5000) +#define POWER_POLL_DELAY msecs_to_jiffies(500) /*-------------------------------------------------------------------------*/ @@ -358,6 +362,11 @@ /* "off" usually means deep sleep */ if (tmp & TPS_REG_ONOFF) { pr_info("%s: power off button\n", DRIVER_NAME); + +#if defined(CONFIG_INPUT_PALMTT3_PWRBTN_MODULE) || defined(CONFIG_INPUT_PALMTT3_PWRBTN) + palmtt3_pwr_btn_press(); +#endif + #if 0 /* REVISIT: this might need its own workqueue * plus tweaks including deadlock avoidance ... @@ -547,11 +556,11 @@ #ifdef CONFIG_ARM #ifdef CONFIG_MACH_T3XSCALE // T3 patch - irqflags = SA_SAMPLE_RANDOM; + irqflags = IRQF_SAMPLE_RANDOM; tps->model = TPS65010; tps->irq = IRQ_GPIO(T3_TPS65010_GPIO); // is it ok to do this here? -// set_irq_type (IRQ_GPIO(T3_TPS65010_GPIO), IRQT_FALLING); + set_irq_type (IRQ_GPIO(T3_TPS65010_GPIO), IRQT_FALLING); #else if (machine_is_omap_h2()) { tps->model = TPS65010; Modified: linux4palm/linux/trunk/drivers/input/misc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/Kconfig 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/input/misc/Kconfig 2007-07-05 11:03:48 UTC (rev 1105) @@ -89,4 +89,10 @@ Say Y here if you want to support the built-in real time clock of the HP SDC controller. +config INPUT_PALMTT3_PWRBTN + tristate "Palm Tungsten|T3 Power Button" + depends on MACH_T3XSCALE + help + Say Y here if you want to support the power button of Palm Tungsten|T3 Power Button. + endif Modified: linux4palm/linux/trunk/drivers/input/misc/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/input/misc/Makefile 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/input/misc/Makefile 2007-07-05 11:03:48 UTC (rev 1105) @@ -12,3 +12,4 @@ obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o +obj-$(CONFIG_INPUT_PALMTT3_PWRBTN) += palmtt3-pwr_btn.o Modified: linux4palm/linux/trunk/drivers/leds/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/leds/Kconfig 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/leds/Kconfig 2007-07-05 11:03:48 UTC (rev 1105) @@ -198,7 +198,7 @@ config LEDS_TRIGGER_MMC_CARD bool "LED MMC Card Trigger" - depends on LEDS_TRIGGERS && MMC_PXA && ARCH_PXA + depends on LEDS_TRIGGERS && ARCH_PXA && (MMC_PXA || MMC_WBSD_PALMT3) help This allows LEDs to be controlled by MMC card activity on Intel PXA 25x/26x/27x MMC interface . If unsure, say Y. Modified: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-04 13:03:04 UTC (rev 1104) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-05 11:03:48 UTC (rev 1105) @@ -1,5 +1,5 @@ /* - * Palm LifeDrive LED Driver + * Palm Tungsten|T3 LED Driver * * Author: Tomas Cech <Tom...@ma...> * @@ -22,41 +22,82 @@ static void palmtt3led_red_set(struct led_classdev *led_cdev, enum led_brightness value) { - if (value <= 85) - tps65010_set_led(LED2, OFF); - else - if (value <= 170) + if (value) tps65010_set_led(LED2, ON); else - tps65010_set_led(LED2, BLINK); + tps65010_set_led(LED2, OFF); } static void palmtt3led_green_set(struct led_classdev *led_cdev, enum led_brightness value) { - if (value <= 85) - tps65010_set_led(LED1, OFF); - else - if (value <= 170) + if (value) tps65010_set_led(LED1, ON); else +/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ + tps65010_set_led(LED1, UNDER_CHG_CTRL); +} + +static void palmtt3led_red_blink_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value) + tps65010_set_led(LED2, BLINK); + else + tps65010_set_led(LED2, OFF); +} + +static void palmtt3led_green_blink_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value) tps65010_set_led(LED1, BLINK); + else +/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ + tps65010_set_led(LED1, UNDER_CHG_CTRL); } +static void palmtt3_vibra_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value) + tps65010_set_vib(ON); + else + tps65010_set_vib(OFF); +} + + static struct led_classdev palmtt3_red_led = { - .name = "palmtt3:red", + .name = "red", .brightness_set = palmtt3led_red_set, + .default_trigger = "mmc-card", }; static struct led_classdev palmtt3_green_led = { - .name = "palmtt3:green", + .name = "green", .brightness_set = palmtt3led_green_set, }; +static struct led_classdev palmtt3_red_blink_led = { + .name = "red_blink", + .brightness_set = palmtt3led_red_blink_set, +}; + +static struct led_classdev palmtt3_green_blink_led = { + .name = "green_blink", + .brightness_set = palmtt3led_green_blink_set, +}; + +static struct led_classdev palmtt3_vibra = { + .name = "vibra", + .brightness_set = palmtt3_vibra_set, +}; + + #ifdef CONFIG_PM static int palmtt3led_suspend(struct platform_device *dev, pm_message_t state) { led_classdev_suspend(&palmtt3_red_led); led_classdev_suspend(&palmtt3_green_led); + led_classdev_suspend(&palmtt3_red_blink_led); + led_classdev_suspend(&palmtt3_green_blink_led); + led_classdev_suspend(&palmtt3_vibra); return 0; } @@ -64,6 +105,9 @@ { led_classdev_resume(&palmtt3_red_led); led_classdev_resume(&palmtt3_green_led); + led_classdev_resume(&palmtt3_red_blink_led); + led_classdev_resume(&palmtt3_green_blink_led); + led_classdev_resume(&palmtt3_vibra); return 0; } #endif @@ -80,6 +124,26 @@ if (ret < 0) led_classdev_unregister(&palmtt3_red_led); + ret = led_classdev_register(&pdev->dev, &palmtt3_red_blink_led); + if (ret < 0) { + led_classdev_unregister(&palmtt3_red_led); + led_classdev_unregister(&palmtt3_green_led); + } + + ret = led_classdev_register(&pdev->dev, &palmtt3_green_blink_led); + if (ret < 0) { + led_classdev_unregister(&palmtt3_red_led); + led_classdev_unregister(&palmtt3_green_led); + led_classdev_unregister(&palmtt3_red_blink_led); + } + ret = led_classdev_register(&pdev->dev, &palmtt3_vibra); + if (ret < 0) { + led_classdev_unregister(&palmtt3_red_led); + led_classdev_unregister(&palmtt3_green_led); + led_classdev_unregister(&palmtt3_red_blink_led); + led_classdev_unregister(&palmtt3_green_blink_led); + } + return ret; } @@ -87,6 +151,9 @@ { led_classdev_unregister(&palmtt3_red_led); led_classdev_unregister(&palmtt3_green_led); + led_classdev_unregister(&palmtt3_red_blink_led); + led_classdev_unregister(&palmtt3_green_blink_led); + led_classdev_unregister(&palmtt3_vibra); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-04 13:03:07
|
Revision: 1104 http://svn.sourceforge.net/hackndev/?rev=1104&view=rev Author: happy-slapin Date: 2007-07-04 06:03:04 -0700 (Wed, 04 Jul 2007) Log Message: ----------- Kill more crap Closes: 1 Removed Paths: ------------- test-bz1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-04 12:54:19
|
Revision: 1103 http://svn.sourceforge.net/hackndev/?rev=1103&view=rev Author: happy-slapin Date: 2007-07-04 05:54:16 -0700 (Wed, 04 Jul 2007) Log Message: ----------- Removing test dir. Closes: 1 Removed Paths: ------------- test-bz2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-04 11:55:17
|
Revision: 1102 http://svn.sourceforge.net/hackndev/?rev=1102&view=rev Author: marex_z71 Date: 2007-07-04 04:54:28 -0700 (Wed, 04 Jul 2007) Log Message: ----------- PalmLD: unify led names in sysfs Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/leds-palmld.c Modified: linux4palm/linux/trunk/drivers/leds/leds-palmld.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmld.c 2007-07-02 23:19:50 UTC (rev 1101) +++ linux4palm/linux/trunk/drivers/leds/leds-palmld.c 2007-07-04 11:54:28 UTC (rev 1102) @@ -36,12 +36,12 @@ } static struct led_classdev palmld_amber_led = { - .name = "palmld:amber", + .name = "amber", .brightness_set = palmldled_amber_set, }; static struct led_classdev palmld_green_led = { - .name = "palmld:green", + .name = "green", .brightness_set = palmldled_green_set, }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-02 23:19:54
|
Revision: 1101 http://svn.sourceforge.net/hackndev/?rev=1101&view=rev Author: happy-slapin Date: 2007-07-02 16:19:50 -0700 (Mon, 02 Jul 2007) Log Message: ----------- Bugzilla: Closing test bug. Closes: 1 Added Paths: ----------- test-bz2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-02 22:20:42
|
Revision: 1100 http://svn.sourceforge.net/hackndev/?rev=1100&view=rev Author: happy-slapin Date: 2007-07-02 15:19:49 -0700 (Mon, 02 Jul 2007) Log Message: ----------- Bugzilla: testing SVN integration Bugs: 1 Added Paths: ----------- test-bz1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-02 21:48:46
|
Revision: 1099 http://svn.sourceforge.net/hackndev/?rev=1099&view=rev Author: happy-slapin Date: 2007-07-02 14:48:39 -0700 (Mon, 02 Jul 2007) Log Message: ----------- Bugs: 100,200,300 Added Paths: ----------- test-bz/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-06-30 15:52:47
|
Revision: 1098 http://svn.sourceforge.net/hackndev/?rev=1098&view=rev Author: happy-slapin Date: 2007-06-30 08:52:40 -0700 (Sat, 30 Jun 2007) Log Message: ----------- z72: making stuff work for now Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c linux4palm/linux/trunk/drivers/media/video/pxa_camera_ioctl.c linux4palm/linux/trunk/drivers/usb/storage/sddr55.c linux4palm/linux/trunk/drivers/usb/storage/sddr55.h Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-06-30 12:03:02 UTC (rev 1097) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-06-30 15:52:40 UTC (rev 1098) @@ -406,7 +406,7 @@ .reset_gpio = 34, .power_gpio = 32, }; - +#if 0 static struct platform_device ov9640 = { .name = "ov96xx", .id = -1, @@ -414,8 +414,8 @@ .platform_data = &ov9640_data, }, }; +#endif - /**************** * Init Machine * ****************/ @@ -430,7 +430,9 @@ #endif &palmz72_led_device, &bcm2035_bt, +#if 0 &ov9640, +#endif }; /*********************************************************************** @@ -453,40 +455,22 @@ pxa_gpio_mode(85 | GPIO_ALT_FN_3_IN); /* CIF_LV */ pxa_gpio_mode(84 | GPIO_ALT_FN_3_IN); /* CIF_FV */ +#if 0 pxa_gpio_mode(32 | GPIO_OUT); pxa_gpio_mode(34 | GPIO_OUT); -#if 0 set_GPIO_mode(50 | GPIO_OUT); /*CIF_PD */ set_GPIO_mode(19 | GPIO_IN); /*CIF_RST */ #endif - - return; } -#if 0 -void ov9640_set_powerdown_gpio(void) -{ - /* Not implemented */ -} -void ov9640_clear_powerdown_gpio(void) -{ - /* Not implemented */ -} -EXPORT_SYMBOL_GPL(ov9640_gpio_init); -EXPORT_SYMBOL_GPL(ov9640_set_powerdown_gpio); -EXPORT_SYMBOL_GPL(ov9640_clear_powerdown_gpio); /*********************************************************************** * * end of OV9640 Functions * ***********************************************************************/ -#endif - static void __init palmz72_init(void) { - GCR &= ~GCR_PRIRDY_IEN; - // disable interrupt to prevent WM9712 constantly interrupting the CPU // and preventing the boot process to complete (Thanx Alex & Shadowmite!) Modified: linux4palm/linux/trunk/drivers/media/video/pxa_camera_ioctl.c =================================================================== --- linux4palm/linux/trunk/drivers/media/video/pxa_camera_ioctl.c 2007-06-30 12:03:02 UTC (rev 1097) +++ linux4palm/linux/trunk/drivers/media/video/pxa_camera_ioctl.c 2007-06-30 15:52:40 UTC (rev 1098) @@ -104,6 +104,7 @@ } return 0; } + static int pxa_camera_VIDIOCGWIN(p_camera_context_t cam_ctx, void * param) { struct video_window vw; @@ -116,6 +117,7 @@ } return 0; } + static int pxa_camera_VIDIOCSWIN(p_camera_context_t cam_ctx, void * param) { struct video_window vw; @@ -147,6 +149,7 @@ return camera_set_capture_format(cam_ctx); } + static int pxa_camera_VIDIOCSPICT(p_camera_context_t cam_ctx, void * param) { struct video_picture vp; Modified: linux4palm/linux/trunk/drivers/usb/storage/sddr55.c =================================================================== --- linux4palm/linux/trunk/drivers/usb/storage/sddr55.c 2007-06-30 12:03:02 UTC (rev 1097) +++ linux4palm/linux/trunk/drivers/usb/storage/sddr55.c 2007-06-30 15:52:40 UTC (rev 1098) @@ -1,6 +1,6 @@ /* Driver for SanDisk SDDR-55 SmartMedia reader * - * $Id:$ + * $Id$ * * SDDR55 driver v0.1: * Modified: linux4palm/linux/trunk/drivers/usb/storage/sddr55.h =================================================================== --- linux4palm/linux/trunk/drivers/usb/storage/sddr55.h 2007-06-30 12:03:02 UTC (rev 1097) +++ linux4palm/linux/trunk/drivers/usb/storage/sddr55.h 2007-06-30 15:52:40 UTC (rev 1098) @@ -1,7 +1,7 @@ /* Driver for SanDisk SDDR-55 SmartMedia reader * Header File * - * $Id:$ + * $Id$ * * Current development and maintenance by: * (c) 2002 Simon Munton This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-06-30 12:03:05
|
Revision: 1097 http://svn.sourceforge.net/hackndev/?rev=1097&view=rev Author: balrog-kun Date: 2007-06-30 05:03:02 -0700 (Sat, 30 Jun 2007) Log Message: ----------- Account for merging of include/asm/hardware/ipaq-asic-led.h, by Elleo Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/leds-palmt650.c Modified: linux4palm/linux/trunk/drivers/leds/leds-palmt650.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmt650.c 2007-06-30 01:13:00 UTC (rev 1096) +++ linux4palm/linux/trunk/drivers/leds/leds-palmt650.c 2007-06-30 12:03:02 UTC (rev 1097) @@ -28,7 +28,7 @@ #define ASIC6_LED_AutoStopCount 0x0c /* LED TimeBase bits */ -#include <asm/hardware/ipaq-asic-led.h> +#include <asm/hardware/ipaq-asic2.h> static void *asic6_base; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-06-30 01:13:04
|
Revision: 1096 http://svn.sourceforge.net/hackndev/?rev=1096&view=rev Author: happy-slapin Date: 2007-06-29 18:13:00 -0700 (Fri, 29 Jun 2007) Log Message: ----------- z72: enabling camera clock in device file for now Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/gpio_map.txt linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/gpio_map.txt =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/gpio_map.txt 2007-06-29 01:08:29 UTC (rev 1095) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/gpio_map.txt 2007-06-30 01:13:00 UTC (rev 1096) @@ -90,7 +90,7 @@ GPIO_88 0 O 00 LED GPIO_89 0 O 01 AC97_SYSCLK GPIO_90 0 O 00 -GPIO_91 1 O 00 +GPIO_91 1 O 00 1->0 disables I2C0? GPIO_92 0 O 00 GPIO_93 1 I 02 CIF_DD6 GPIO_94 0 I 00 Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-06-29 01:08:29 UTC (rev 1095) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-06-30 01:13:00 UTC (rev 1096) @@ -511,6 +511,7 @@ break; } + pxa_set_cken(CKEN24_CAMERA, 1); set_pxa_fb_info( &palmz72_lcd_screen ); pxa_set_btuart_info(&bcm2035_pxa_bt_funcs); pxa_set_mci_info( &palmz72_mci_platform_data ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-06-29 01:08:35
|
Revision: 1095 http://svn.sourceforge.net/hackndev/?rev=1095&view=rev Author: happy-slapin Date: 2007-06-28 18:08:29 -0700 (Thu, 28 Jun 2007) Log Message: ----------- palmz72: Updated defconfig Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig Modified: linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig 2007-06-29 00:10:46 UTC (rev 1094) +++ linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig 2007-06-29 01:08:29 UTC (rev 1095) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21-hnd2 -# Mon Jun 25 14:07:33 2007 +# Fri Jun 29 05:00:38 2007 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -708,9 +708,48 @@ # # I2C support # -# CONFIG_I2C is not set +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y # +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set +CONFIG_I2C_ALGOPXA=y + +# +# I2C Hardware Bus support +# +CONFIG_I2C_PXA=y +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_I2C_ADCM2650 is not set +# CONFIG_SENSORS_PCF8574 is not set +# 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_I2C_OV9640 is not set +CONFIG_I2C_OV96XX=y +CONFIG_I2C_DEBUG_CORE=y +CONFIG_I2C_DEBUG_ALGO=y +CONFIG_I2C_DEBUG_BUS=y +CONFIG_I2C_DEBUG_CHIP=y + +# # SPI support # CONFIG_SPI=y @@ -738,10 +777,46 @@ CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ASB100 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set # CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set @@ -805,9 +880,31 @@ # # Multimedia devices # -# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y # +# Video Capture Adapters +# + +# +# Video Capture Adapters +# +# CONFIG_VIDEO_ADV_DEBUG is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +CONFIG_PXACI=m + +# +# Radio Adapters +# + +# # Digital Video Broadcasting Devices # # CONFIG_DVB is not set @@ -908,6 +1005,7 @@ CONFIG_SND_PXA2xx_I2SOUND=y CONFIG_SND_PXA2XX_PCM=y CONFIG_SND_PXA2XX_AC97=y +# CONFIG_SND_RECON is not set # # SoC audio support @@ -998,9 +1096,15 @@ # RTC drivers # # CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_DS1307 is not set # CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_PCF8563 is not set # CONFIG_RTC_DRV_RS5C348 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-06-29 00:10:47
|
Revision: 1094 http://svn.sourceforge.net/hackndev/?rev=1094&view=rev Author: marex_z71 Date: 2007-06-28 17:10:46 -0700 (Thu, 28 Jun 2007) Log Message: ----------- PalmLD: opie doesnt seem to like F13 as rotate key, who cares, lets use F6 Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-06-29 00:08:27 UTC (rev 1093) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-06-29 00:10:46 UTC (rev 1094) @@ -282,7 +282,7 @@ }, { /* row 3 */ - KEY_F13, /* Rotate display */ + KEY_F6, /* Rotate display */ KEY_ENTER, /* Nav centre */ KEY_LEFT, /* Nav left */ }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-06-29 00:08:31
|
Revision: 1093 http://svn.sourceforge.net/hackndev/?rev=1093&view=rev Author: sleep_walker Date: 2007-06-28 17:08:27 -0700 (Thu, 28 Jun 2007) Log Message: ----------- palmtt3: added led device, tsc2101 PLL set to other values Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/Kconfig linux4palm/linux/trunk/drivers/leds/Makefile linux4palm/linux/trunk/drivers/mfd/tsc2101.c linux4palm/linux/trunk/drivers/misc/gpioed-ng.c Added Paths: ----------- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c Modified: linux4palm/linux/trunk/drivers/leds/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/leds/Kconfig 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/leds/Kconfig 2007-06-29 00:08:27 UTC (rev 1093) @@ -129,6 +129,12 @@ help This option enables support for the LEDs on Palm LifeDrive. +config LEDS_PALMTT3 + tristate "LED Support for Palm Tungsten|T3" + depends LEDS_CLASS && MACH_T3XSCALE && TPS65010 + help + This option enables support for the LEDs on Palm Tungsten|T3. + config LEDS_PALMZ72 tristate "LED Support for PalmOne Zire 72" depends LEDS_CLASS && MACH_PALMZ72 Modified: linux4palm/linux/trunk/drivers/leds/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/leds/Makefile 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/leds/Makefile 2007-06-29 00:08:27 UTC (rev 1093) @@ -26,6 +26,7 @@ # Hack&Dev drivers obj-$(CONFIG_LEDS_PALMLD) += leds-palmld.o +obj-$(CONFIG_LEDS_PALMTT3) += leds-palmtt3.o obj-$(CONFIG_LEDS_PALMZ72) += led-palmz72.o obj-$(CONFIG_LEDS_PALMT650) += leds-palmt650.o Added: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c (rev 0) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -0,0 +1,120 @@ +/* + * Palm LifeDrive LED Driver + * + * Author: Tomas Cech <Tom...@ma...> + * + * 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/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/leds.h> +#include <asm/mach-types.h> +#include <asm/arch/hardware.h> +#include <asm/arch/pxa-regs.h> +#include <asm/hardware/scoop.h> +#include <asm/arch/tps65010.h> + + +static void palmtt3led_red_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value <= 85) + tps65010_set_led(LED2, OFF); + else + if (value <= 170) + tps65010_set_led(LED2, ON); + else + tps65010_set_led(LED2, BLINK); +} + +static void palmtt3led_green_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value <= 85) + tps65010_set_led(LED1, OFF); + else + if (value <= 170) + tps65010_set_led(LED1, ON); + else + tps65010_set_led(LED1, BLINK); +} + +static struct led_classdev palmtt3_red_led = { + .name = "palmtt3:red", + .brightness_set = palmtt3led_red_set, +}; + +static struct led_classdev palmtt3_green_led = { + .name = "palmtt3:green", + .brightness_set = palmtt3led_green_set, +}; + +#ifdef CONFIG_PM +static int palmtt3led_suspend(struct platform_device *dev, pm_message_t state) +{ + led_classdev_suspend(&palmtt3_red_led); + led_classdev_suspend(&palmtt3_green_led); + return 0; +} + +static int palmtt3led_resume(struct platform_device *dev) +{ + led_classdev_resume(&palmtt3_red_led); + led_classdev_resume(&palmtt3_green_led); + return 0; +} +#endif + +static int palmtt3led_probe(struct platform_device *pdev) +{ + int ret; + + ret = led_classdev_register(&pdev->dev, &palmtt3_red_led); + if (ret < 0) + return ret; + + ret = led_classdev_register(&pdev->dev, &palmtt3_green_led); + if (ret < 0) + led_classdev_unregister(&palmtt3_red_led); + + return ret; +} + +static int palmtt3led_remove(struct platform_device *pdev) +{ + led_classdev_unregister(&palmtt3_red_led); + led_classdev_unregister(&palmtt3_green_led); + return 0; +} + +static struct platform_driver palmtt3led_driver = { + .probe = palmtt3led_probe, + .remove = palmtt3led_remove, +#ifdef CONFIG_PM + .suspend = palmtt3led_suspend, + .resume = palmtt3led_resume, +#endif + .driver = { + .name = "palmtt3-led", + }, +}; + +static int __init palmtt3led_init(void) +{ + return platform_driver_register(&palmtt3led_driver); +} + +static void __exit palmtt3led_exit(void) +{ + platform_driver_unregister(&palmtt3led_driver); +} + +module_init(palmtt3led_init); +module_exit(palmtt3led_exit); + +MODULE_AUTHOR("Tomas Cech <Tom...@ma..."); +MODULE_DESCRIPTION("Palm Tungsten|T3 LED driver"); +MODULE_LICENSE("GPL"); Modified: linux4palm/linux/trunk/drivers/mfd/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -227,8 +227,8 @@ if (fs_44) { /* 44.1 khz - 12 MHz Mclk */ printk("selected 44.1khz PLL\n"); - tsc2101_regwrite(snd_data, TSC2101_REG_PLL1, TSC2101_PLL_ENABLE | TSC2101_PLL_PVAL(2) | TSC2101_PLL_JVAL(7)); - tsc2101_regwrite(snd_data, TSC2101_REG_PLL2, TSC2101_PLL2_DVAL(5740)); + tsc2101_regwrite(snd_data, TSC2101_REG_PLL1, TSC2101_PLL_ENABLE | TSC2101_PLL_PVAL(1) | TSC2101_PLL_JVAL(7)); + tsc2101_regwrite(snd_data, TSC2101_REG_PLL2, TSC2101_PLL2_DVAL(5264)); } else { /* 48 khz - 12 Mhz Mclk */ printk("selected 48khz PLL\n"); Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -98,7 +98,6 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); break; #ifdef CONFIG_MACH_T3XSCALE -#ifdef CONFIG_TPS65010 case 'T': tps65010_set_gpio_out_value(id, 1); printk(KERN_ERR "GPIOed: GPIO %lu set high on TPS65010\n", id); @@ -108,7 +107,6 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low on TPS65010\n", id); break; #endif -#endif case 'd': GPDR(id) &= ~(GPIO_bit(id)); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-06-28 18:15:10
|
Revision: 1091 http://svn.sourceforge.net/hackndev/?rev=1091&view=rev Author: happy-slapin Date: 2007-06-28 11:15:08 -0700 (Thu, 28 Jun 2007) Log Message: ----------- z72: camera.txt update Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/camera.txt Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/camera.txt =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/camera.txt 2007-06-28 18:09:50 UTC (rev 1090) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/camera.txt 2007-06-28 18:15:08 UTC (rev 1091) @@ -37,7 +37,7 @@ XX X XXXX XXX Camera: off on GPIO32 1 0 -GPIO41 0 1 +GPIO41 0 1 # FF_RTS, strange... GPLR2 Camera off @@ -55,6 +55,6 @@ XXX XXXX XXXX XXX XXXX XXXX XXXX Camera: off on -GPIO76 1 0 +GPIO76 1 0 # L_PCLK_WR, seems just accidentally GPIO91 1 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |