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...> - 2006-12-08 20:26:11
|
Revision: 705 http://svn.sourceforge.net/hackndev/?rev=705&view=rev Author: sleep_walker Date: 2006-12-08 12:26:04 -0800 (Fri, 08 Dec 2006) Log Message: ----------- l4p: BFUGarux - I modified something, but forgot what it was... Modified Paths: -------------- linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/Makefile Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-08 19:14:05 UTC (rev 704) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-08 20:26:04 UTC (rev 705) @@ -1012,6 +1012,9 @@ } handled = true; break; + case BFUModListTrigger: + BFUSettingsValues.modlist = pEvent->data.popSelect.selection; + break; } // *** ADD EVENT HANDLING HERE *** // default: Modified: linux4palm/BFUGarux/Makefile =================================================================== --- linux4palm/BFUGarux/Makefile 2006-12-08 19:14:05 UTC (rev 704) +++ linux4palm/BFUGarux/Makefile 2006-12-08 20:26:04 UTC (rev 705) @@ -30,7 +30,7 @@ @echo " NoBFU - do not include BFUSettings" @echo @echo "for kEdAR:" - @echo " REVK=NUMBER SVNREV=SVN_REVISION_NUMBER make palmtt3 BFUk" + @echo " REVK=NUMBER VER=k0$REVK SVNREV=SVN_REVISION_NUMBER make palmtt3 BFUk" @echo palmte: @@ -101,7 +101,7 @@ BFUk: image.bin ./garux.h.sh echo "#define with_BFUSettings" >> garux.h - cat garux-genericK.rcp BFUSettings.Rsrc | sed -e 's/#here could be menu/ MENUITEM "BFUSettings" MenuBFU/' -e "s/REVISION/$(REVK)/" -e "s/SVN_REV/$(SVNREV)/" > garux.rcp + cat garux-genericK.rcp BFUSettings.Rsrc | sed -e 's/#here could be menu/ MENUITEM "BFUSettings" MenuBFU/' -e "s/REVISION/$(VER)/" -e "s/SVN_REV/$(SVNREV)/" > garux.rcp make garux.$(REVK).prc NoBFU: image.bin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 19:14:10
|
Revision: 704 http://svn.sourceforge.net/hackndev/?rev=704&view=rev Author: farcaller Date: 2006-12-08 11:14:05 -0800 (Fri, 08 Dec 2006) Log Message: ----------- l4p: wtf is cvsignore doing there?.. Removed Paths: ------------- linux4palm/linux/trunk/arch/arm/common/ipaq/.cvsignore Deleted: linux4palm/linux/trunk/arch/arm/common/ipaq/.cvsignore =================================================================== --- linux4palm/linux/trunk/arch/arm/common/ipaq/.cvsignore 2006-12-08 19:05:36 UTC (rev 703) +++ linux4palm/linux/trunk/arch/arm/common/ipaq/.cvsignore 2006-12-08 19:14:05 UTC (rev 704) @@ -1,4 +0,0 @@ -*.cmd -*.ko -*.mod.c - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 19:05:39
|
Revision: 703 http://svn.sourceforge.net/hackndev/?rev=703&view=rev Author: farcaller Date: 2006-12-08 11:05:36 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: tsc2101 ts code depends on SOC_TSC2101, not selects it Modified Paths: -------------- linux4palm/linux/trunk/drivers/input/touchscreen/Kconfig Modified: linux4palm/linux/trunk/drivers/input/touchscreen/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/input/touchscreen/Kconfig 2006-12-08 19:04:03 UTC (rev 702) +++ linux4palm/linux/trunk/drivers/input/touchscreen/Kconfig 2006-12-08 19:05:36 UTC (rev 703) @@ -51,8 +51,7 @@ config TOUCHSCREEN_TSC2101 tristate "TI TSC2101 touchscreen input driver" - depends on (MACH_HX2750 || MACH_T3XSCALE) && INPUT && INPUT_TOUCHSCREEN - select SOC_TSC2101 + depends on (MACH_HX2750 || MACH_T3XSCALE) && INPUT && INPUT_TOUCHSCREEN && SOC_TSC2101 default y help Say Y here to enable the driver for the touchscreen on the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 19:04:09
|
Revision: 702 http://svn.sourceforge.net/hackndev/?rev=702&view=rev Author: farcaller Date: 2006-12-08 11:04:03 -0800 (Fri, 08 Dec 2006) Log Message: ----------- l4p: small patches to battchargemon Modified Paths: -------------- linux4palm/linux/trunk/drivers/misc/Kconfig linux4palm/linux/trunk/drivers/misc/Makefile linux4palm/linux/trunk/drivers/misc/battchargemon.c Modified: linux4palm/linux/trunk/drivers/misc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/misc/Kconfig 2006-12-08 18:57:48 UTC (rev 701) +++ linux4palm/linux/trunk/drivers/misc/Kconfig 2006-12-08 19:04:03 UTC (rev 702) @@ -34,6 +34,12 @@ Say Y here to enable generic battery status reporting in the /sys filesystem. +config BATTCHARGE_MONITOR + tristate "Battery and charger monitoring" + help + Say Y here to enable monitoring of battery and charger using + sysfs interface. + config H2200_BATTERY tristate "iPAQ H2200 battery control" depends on ARCH_H2200 && IPAQ_HAMCOP && BATTERY_MONITOR Modified: linux4palm/linux/trunk/drivers/misc/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/misc/Makefile 2006-12-08 18:57:48 UTC (rev 701) +++ linux4palm/linux/trunk/drivers/misc/Makefile 2006-12-08 19:04:03 UTC (rev 702) @@ -6,6 +6,7 @@ obj-$(CONFIG_IBM_ASM) += ibmasm/ obj-$(CONFIG_HDPU_FEATURES) += hdpuftrs/ obj-$(CONFIG_BATTERY_MONITOR) += battery.o +obj-$(CONFIG_BATTCHARGE_MONITOR) += battchargemon.o obj-$(CONFIG_MCP) += mcp-core.o obj-$(CONFIG_MCP_SA1100) += mcp-sa1100.o obj-$(CONFIG_MCP_UCB1x00) += ucb1x00-core.o Modified: linux4palm/linux/trunk/drivers/misc/battchargemon.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/battchargemon.c 2006-12-08 18:57:48 UTC (rev 701) +++ linux4palm/linux/trunk/drivers/misc/battchargemon.c 2006-12-08 19:04:03 UTC (rev 702) @@ -119,13 +119,10 @@ create_entry_conditional(max_voltage); create_entry_conditional(v_current); create_entry_conditional(temp); - printk(KERN_ERR "\n\n\tBATT: gw = 0x%p\n", bat->get_voltage); if(bat->get_voltage) { class_device_create_file(&bat->class_dev, &battery_class_device_attr_voltage); - printk(KERN_ERR "BATT: adding voltage\n"); if((bat->min_voltage != -1) && (bat->max_voltage != -1)) { class_device_create_file(&bat->class_dev, &battery_class_device_attr_charge); - printk(KERN_ERR "BATT: and charge\n"); } } @@ -174,7 +171,6 @@ // TODO: do we need to grab charger device driver here? it would be removed // anyway in correctly written driver... list_add(&cha->list, &batt->attached_chargers); - printk(KERN_ERR "BATT: Adding %s to %s chargers\n", cha->name, batt->name); return 0; } EXPORT_SYMBOL(battery_attach_charger); @@ -191,10 +187,8 @@ struct charger *cha; sysfs_remove_link(&batt->class_dev.kobj, "charger"); list_for_each_entry(cha, &batt->attached_chargers, list) { - printk(KERN_ERR "BATT: LL: %s = %d\n", cha->name, cha->get_status(cha)); if(cha->get_status(cha)) { sysfs_create_link(&batt->class_dev.kobj, &cha->class_dev.kobj, "charger"); - printk(KERN_ERR "BATT: LL: linked\n"); return; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 18:57:53
|
Revision: 701 http://svn.sourceforge.net/hackndev/?rev=701&view=rev Author: farcaller Date: 2006-12-08 10:57:48 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: tsc2101 depends on SND_PXA2xx_I2SOUND rather than selects it Modified Paths: -------------- linux4palm/linux/trunk/drivers/soc/Kconfig Modified: linux4palm/linux/trunk/drivers/soc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/soc/Kconfig 2006-12-08 18:56:15 UTC (rev 700) +++ linux4palm/linux/trunk/drivers/soc/Kconfig 2006-12-08 18:57:48 UTC (rev 701) @@ -65,8 +65,7 @@ config SOC_TSC2101 tristate "Support for TI TSC2101 Touchscreen and Audio Codec" - depends on TOUCHSCREEN_TSC2101 - select SND_PXA2xx_I2SOUND + depends on TOUCHSCREEN_TSC2101 && SND_PXA2xx_I2SOUND help Support for TI TSC2101 Touchscreen and Audio Codec This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 18:56:19
|
Revision: 700 http://svn.sourceforge.net/hackndev/?rev=700&view=rev Author: farcaller Date: 2006-12-08 10:56:15 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: added tps65010_get_chgstatus, updated tps65010_get_charging Modified Paths: -------------- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2006-12-08 18:55:03 UTC (rev 699) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2006-12-08 18:56:15 UTC (rev 700) @@ -681,10 +681,21 @@ int tps65010_get_charging(void) { - return the_tps->charging; + if(the_tps) + return the_tps->charging; + else + return 0; } EXPORT_SYMBOL(tps65010_get_charging); +u8 tps65010_get_chgstatus(void) { + if(the_tps) + return the_tps->chgstatus; + else + return 0; +} +EXPORT_SYMBOL(tps65010_get_chgstatus); + /* Draw from VBUS: * 0 mA -- DON'T DRAW (might supply power instead) * 100 mA -- usb unit load (slowest charge rate) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 18:55:07
|
Revision: 699 http://svn.sourceforge.net/hackndev/?rev=699&view=rev Author: farcaller Date: 2006-12-08 10:55:03 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: updated to reflect latest battchargemon changes Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2006-12-08 18:54:18 UTC (rev 698) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2006-12-08 18:55:03 UTC (rev 699) @@ -23,7 +23,7 @@ #include <linux/delay.h> #include <linux/jiffies.h> #include <linux/platform_device.h> -#include <linux/battery.h> +#include <linux/battchargemon.h> #include <asm/io.h> #include <asm/irq.h> @@ -32,6 +32,7 @@ #include <asm/arch/pxa-regs.h> #include <linux/soc/tsc2101.h> +#include <asm/arch/tps65010.h> #define BATTERY_CHECK_INTERVAL (HZ * 60) /* every 60 seconds */ @@ -69,6 +70,8 @@ put_device(tscdev); put_driver(tscdrv); + battery_update_charge_link(bat); + /* Vbat = B/{2^N} * 5 * VREF where @@ -79,26 +82,40 @@ return (batv*6250)/4096; } -#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) +int palmt3_charger_get_usb_status(struct charger *cha) +{ + u8 tps65010_get_chgstatus(void); + return ((tps65010_get_chgstatus() & TPS_CHG_USB)?1:0); +} -int palmt3_battery_get_status(struct battery *bat) +int palmt3_charger_get_ac_status(struct charger *cha) { - int status; - - status = GET_GPIO(14) ? - BATTERY_STATUS_NOT_CHARGING : BATTERY_STATUS_CHARGING; - - return status; + u8 tps65010_get_chgstatus(void); + return ((tps65010_get_chgstatus() & TPS_CHG_AC)?1:0); } static struct battery palmt3_battery = { - .name = "palmt3_batt", - .id = "battery0", + .name = "palmt3_batt", + .id = "Li-Ion battery", + .min_voltage = 3710, + .max_voltage = 4156, + .v_current = -1, + .temp = -1, .get_voltage = palmt3_battery_get_voltage, - .get_min_voltage = palmt3_battery_get_min_voltage, - .get_max_voltage = palmt3_battery_get_max_voltage, - .get_status = palmt3_battery_get_status, }; + +static struct charger palmt3_usb_charger = { + .name = "palmt3_usb", + .id = "USB", + .get_status = palmt3_charger_get_usb_status, +}; + +static struct charger palmt3_ac_charger = { + .name = "palmt3_ac", + .id = "AC", + .get_status = palmt3_charger_get_ac_status, +}; + /* -------------------------- APM ------------------------------------- */ static void palmt3_apm_get_power_status(struct apm_power_info *info) { @@ -154,7 +171,7 @@ } static struct device_driver palmt3_battery_driver = { - .name = "palmt3_batt", + .name = "palmt3_battchargemon", .bus = &platform_bus_type, .probe = palmt3_battery_probe, }; @@ -168,6 +185,13 @@ return retval; retval = battery_class_register(&palmt3_battery); + retval = charger_class_register(&palmt3_usb_charger); + retval = charger_class_register(&palmt3_ac_charger); + + battery_attach_charger(&palmt3_battery, &palmt3_usb_charger); + battery_attach_charger(&palmt3_battery, &palmt3_ac_charger); + + battery_update_charge_link(&palmt3_battery); if (!retval) { #ifdef CONFIG_PM set_apm_get_power_status(palmt3_apm_get_power_status); @@ -178,6 +202,11 @@ static void __exit palmt3_battery_exit(void) { + battery_remove_charger(0, &palmt3_ac_charger); + battery_remove_charger(0, &palmt3_usb_charger); + + charger_class_unregister(&palmt3_usb_charger); + charger_class_unregister(&palmt3_ac_charger); battery_class_unregister(&palmt3_battery); driver_unregister(&palmt3_battery_driver); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 18:54:20
|
Revision: 698 http://svn.sourceforge.net/hackndev/?rev=698&view=rev Author: farcaller Date: 2006-12-08 10:54:18 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: battery depends on SOC_TSC2101 rather than selects it Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2006-12-08 18:53:22 UTC (rev 697) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2006-12-08 18:54:18 UTC (rev 698) @@ -12,8 +12,7 @@ config PALM_T3_BATTERY tristate "Battery monitoring support" - depends on MACH_T3XSCALE && TPS65010 - select SOC_TSC2101 + depends on MACH_T3XSCALE && TPS65010 && SOC_TSC2101 help Adds battery driver support This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-08 18:53:32
|
Revision: 697 http://svn.sourceforge.net/hackndev/?rev=697&view=rev Author: farcaller Date: 2006-12-08 10:53:22 -0800 (Fri, 08 Dec 2006) Log Message: ----------- palmt3: updated button mapping to look like LD Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2006-12-08 17:01:58 UTC (rev 696) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2006-12-08 18:53:22 UTC (rev 697) @@ -53,19 +53,22 @@ #define T3BTN_TODO 8 #define T3BTN_CENTER 9 -#define T3KEY_CALENDAR KEY_SPACE -#define T3KEY_VOICE KEY_TAB -#define T3KEY_CONTACT KEY_C +#define T3KEY_VOICE KEY_F7 + +#define T3KEY_CALENDAR KEY_F9 +#define T3KEY_CONTACT KEY_F11 +#define T3KEY_MEMO KEY_F10 +#define T3KEY_TODO KEY_F12 + #define T3KEY_UP KEY_UP #define T3KEY_DOWN KEY_DOWN #define T3KEY_LEFT KEY_LEFT #define T3KEY_RIGHT KEY_RIGHT -#define T3KEY_MEMO KEY_M -#define T3KEY_TODO KEY_T #define T3KEY_CENTER KEY_ENTER -#define T3SLIDER_OPEN KEY_O -#define T3SLIDER_CLOSE KEY_P +#define T3SLIDER_OPEN KEY_F6 +#define T3SLIDER_CLOSE KEY_F5 + #define GET_KEY_BIT(vkey, bit) ((vkey >> (bit) ) & 0x01) #define SET_KEY_BIT(vkey, bit) (vkey |= (1 << (bit)) ) #define CLEAR_KEY_BIT(vkey, bit) (vkey &= ~(1 << (bit)) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-12-08 17:02:09
|
Revision: 696 http://svn.sourceforge.net/hackndev/?rev=696&view=rev Author: cristianop Date: 2006-12-08 09:01:58 -0800 (Fri, 08 Dec 2006) Log Message: ----------- l4p: fix gpe's no backlight problem (configuration of the backligth's driver data) Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-12-07 15:49:20 UTC (rev 695) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-12-08 17:01:58 UTC (rev 696) @@ -31,9 +31,9 @@ intensity &= bl->limit_mask; // set intensity to 0 if in power saving or fb is blanked - if (bl->power != FB_BLANK_UNBLANK) + if (bl->dev->props->power != FB_BLANK_UNBLANK) intensity = 0; - if (bl->fb_blank != FB_BLANK_UNBLANK) + if (bl->dev->props->fb_blank != FB_BLANK_UNBLANK) intensity = 0; /* Does the backlight frequency need to be configured on a per device basis? @@ -60,6 +60,7 @@ } } + //printk("pxapwmbl: setting intensity to %d [bl->intensity = %d]\n", intensity, bl->intensity); switch (bl->pwm) { case 0: PWM_CTRL0 = prescaler; @@ -88,6 +89,9 @@ pxapwmbl_mach_turn_bl_off(); } } + + bl->dev->props->brightness = intensity; + bl->intensity=intensity; spin_unlock_irqrestore(&bl->lock, flags); } @@ -125,8 +129,9 @@ if (intensity < 0) intensity = 0; + pxapwmbl_send_intensity(bl, intensity); - bl->intensity=intensity; + return 0; } @@ -165,11 +170,13 @@ pxapwmbl_mach_turn_bl_on = bl->turn_bl_on; pxapwmbl_mach_turn_bl_off = bl->turn_bl_off; - bl->intensity = 0; bl->limit = 0; bl->lock = SPIN_LOCK_UNLOCKED; - - bl->power = FB_BLANK_UNBLANK; + + pxapwmbl_data.brightness = bl->default_intensity; + pxapwmbl_data.power = FB_BLANK_UNBLANK; + pxapwmbl_data.fb_blank = FB_BLANK_UNBLANK; + bl->off_threshold = 5; bl->dev = backlight_device_register ("pxapwm-bl", bl, &pxapwmbl_data); @@ -189,7 +196,7 @@ { struct pxapwmbl_platform_data *bl = pdev->dev.platform_data; - pxapwmbl_send_intensity(bl, 0); + pxapwmbl_send_intensity(bl, bl->default_intensity); backlight_device_unregister(bl->dev); Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2006-12-07 15:49:20 UTC (rev 695) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2006-12-08 17:01:58 UTC (rev 696) @@ -29,8 +29,6 @@ int prescaler; int intensity; - int power; - int fb_blank; int limit; int off_threshold; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-12-07 15:49:27
|
Revision: 695 http://svn.sourceforge.net/hackndev/?rev=695&view=rev Author: farcaller Date: 2006-12-07 07:49:20 -0800 (Thu, 07 Dec 2006) Log Message: ----------- l4p: new release of battchargemon Modified Paths: -------------- linux4palm/linux/trunk/drivers/misc/battchargemon.c linux4palm/linux/trunk/include/linux/battchargemon.h Modified: linux4palm/linux/trunk/drivers/misc/battchargemon.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/battchargemon.c 2006-12-03 17:25:38 UTC (rev 694) +++ linux4palm/linux/trunk/drivers/misc/battchargemon.c 2006-12-07 15:49:20 UTC (rev 695) @@ -25,26 +25,43 @@ return sprintf(buf, "%s\n", bat->id); } +static ssize_t battery_show_charge(struct class_device *cdev, char *buf) { + int v_normalized, v_max_normalized, voltage, charge; + struct battery *bat = container_of(cdev, struct battery, class_dev); + voltage = bat->get_voltage(bat); + v_normalized = voltage - bat->min_voltage; + v_normalized = (v_normalized>0) ? v_normalized : 0; + v_max_normalized = bat->max_voltage - bat->min_voltage; + charge = v_normalized * 100 / v_max_normalized; + charge = (charge>0) ? (charge<100?charge:100) : 0; + return sprintf(buf, "%d%%\n", charge); +} + static ssize_t charger_show_id(struct class_device *cdev, char *buf) { struct charger *bat = container_of(cdev, struct charger, class_dev); return sprintf(buf, "%s\n", bat->id); } +static ssize_t battery_show_voltage(struct class_device *cdev, char *buf) { + struct battery *cl = container_of(cdev, struct battery, class_dev); + return sprintf(buf, "%d\n", cl->get_voltage(cl)); +} + +static ssize_t charger_show_status(struct class_device *cdev, char *buf) { + struct charger *cl = container_of(cdev, struct charger, class_dev); + return sprintf(buf, "%d\n", cl->get_status(cl)); +} + #define show_int_val(_class, _name) \ static ssize_t _class##_show_##_name(struct class_device *cdev, char *buf) { \ struct _class *cl = container_of(cdev, struct _class, class_dev); \ - if (cl->get_##_name) \ - return sprintf(buf, "%d\n", cl->get_##_name(cl)); \ - return 0; \ + return sprintf(buf, "%d\n", cl->_name); \ } show_int_val(battery, min_voltage); show_int_val(battery, max_voltage); -show_int_val(battery, voltage); -show_int_val(battery, current); +show_int_val(battery, v_current); show_int_val(battery, temp); -show_int_val(battery, charge); -show_int_val(charger, status); static struct class battery_class = { .name = "battery", @@ -68,7 +85,7 @@ static CLS_DEV_ATTR (battery, min_voltage, 0444, battery_show_min_voltage, NULL); static CLS_DEV_ATTR (battery, max_voltage, 0444, battery_show_max_voltage, NULL); static CLS_DEV_ATTR (battery, voltage, 0444, battery_show_voltage, NULL); -static CLS_DEV_ATTR (battery, current, 0444, battery_show_current, NULL); +static CLS_DEV_ATTR (battery, v_current, 0444, battery_show_v_current, NULL); static CLS_DEV_ATTR (battery, temp, 0444, battery_show_temp, NULL); static CLS_DEV_ATTR (battery, charge, 0444, battery_show_charge, NULL); @@ -78,12 +95,16 @@ /**** class registration ****/ #define create_entry_conditional(_name) \ -if(bat->get_##_name) \ - class_device_create_file(&bat->class_dev, &battery_class_device_attr_##_name); + if(bat->_name != -1) \ + class_device_create_file(&bat->class_dev, &battery_class_device_attr_##_name); int battery_class_register(struct battery *bat) { int rc = 0; + + // init list + bat->attached_chargers.next = &bat->attached_chargers; + bat->attached_chargers.prev = &bat->attached_chargers; WARN_ON(!bat->name); bat->class_dev.class = &battery_class; @@ -96,10 +117,17 @@ class_device_create_file(&bat->class_dev, &battery_class_device_attr_id); create_entry_conditional(min_voltage); create_entry_conditional(max_voltage); - create_entry_conditional(voltage); - create_entry_conditional(current); + create_entry_conditional(v_current); create_entry_conditional(temp); - create_entry_conditional(charge); + printk(KERN_ERR "\n\n\tBATT: gw = 0x%p\n", bat->get_voltage); + if(bat->get_voltage) { + class_device_create_file(&bat->class_dev, &battery_class_device_attr_voltage); + printk(KERN_ERR "BATT: adding voltage\n"); + if((bat->min_voltage != -1) && (bat->max_voltage != -1)) { + class_device_create_file(&bat->class_dev, &battery_class_device_attr_charge); + printk(KERN_ERR "BATT: and charge\n"); + } + } out: return rc; @@ -115,7 +143,6 @@ int charger_class_register(struct charger *cha) { int rc = 0; - WARN_ON(!cha->name); cha->class_dev.class = &charger_class; strcpy(cha->class_dev.class_id, cha->name); @@ -125,8 +152,7 @@ if(cha->id) class_device_create_file(&cha->class_dev, &charger_class_device_attr_id); - if(cha->get_status) - class_device_create_file(&cha->class_dev, &charger_class_device_attr_status); + class_device_create_file(&cha->class_dev, &charger_class_device_attr_status); out: return rc; @@ -139,13 +165,50 @@ } EXPORT_SYMBOL (charger_class_unregister); +/**** cherger attaching ****/ + +// FIXME: there's no way to attach one charger to two batteries using lists.h +// possible workarounds: implement own linked list? +int battery_attach_charger(struct battery *batt, struct charger *cha) +{ + // TODO: do we need to grab charger device driver here? it would be removed + // anyway in correctly written driver... + list_add(&cha->list, &batt->attached_chargers); + printk(KERN_ERR "BATT: Adding %s to %s chargers\n", cha->name, batt->name); + return 0; +} +EXPORT_SYMBOL(battery_attach_charger); + +int battery_remove_charger(struct battery *batt, struct charger *cha) +{ + list_del(&cha->list); + return 0; +} +EXPORT_SYMBOL(battery_remove_charger); + +void battery_update_charge_link(struct battery *batt) +{ + struct charger *cha; + sysfs_remove_link(&batt->class_dev.kobj, "charger"); + list_for_each_entry(cha, &batt->attached_chargers, list) { + printk(KERN_ERR "BATT: LL: %s = %d\n", cha->name, cha->get_status(cha)); + if(cha->get_status(cha)) { + sysfs_create_link(&batt->class_dev.kobj, &cha->class_dev.kobj, "charger"); + printk(KERN_ERR "BATT: LL: linked\n"); + return; + } + } +} +EXPORT_SYMBOL(battery_update_charge_link); + /**** module init/exit ****/ static int __init battcharge_class_init(void) { int ret = class_register(&battery_class); - if(likely(ret)) { - if(likely((ret = class_register(&charger_class)) == 0)) { + if(!ret) { + ret = class_register(&charger_class); + if(!ret) { return 0; } else { class_unregister(&battery_class); Modified: linux4palm/linux/trunk/include/linux/battchargemon.h =================================================================== --- linux4palm/linux/trunk/include/linux/battchargemon.h 2006-12-03 17:25:38 UTC (rev 694) +++ linux4palm/linux/trunk/include/linux/battchargemon.h 2006-12-07 15:49:20 UTC (rev 695) @@ -18,15 +18,16 @@ struct class_device class_dev; const char *name; char *id; - int (*get_min_voltage)(struct battery *); - int (*get_max_voltage)(struct battery *); - int (*get_voltage)(struct battery *); - int (*get_current)(struct battery *); + int min_voltage; + int max_voltage; + + int v_current; + int temp; - int (*get_temp)(struct battery *); + int (*get_voltage)(struct battery *); - int (*get_charge)(struct battery *); + struct list_head attached_chargers; }; struct charger { @@ -37,11 +38,19 @@ #define CHARGER_DISCONNECTED 0 #define CHARGER_CONNECTED 1 int (*get_status)(struct charger *); + + struct list_head list; }; extern int battery_class_register(struct battery *); extern void battery_class_unregister(struct battery *); +extern int charger_class_register(struct charger *); +extern void charger_class_unregister(struct charger *); +extern int battery_attach_charger(struct battery *batt, struct charger *cha); +extern int battery_remove_charger(struct battery *batt, struct charger *cha); +extern void battery_update_charge_link(struct battery *batt); + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-12-03 17:25:46
|
Revision: 694 http://svn.sourceforge.net/hackndev/?rev=694&view=rev Author: sleep_walker Date: 2006-12-03 09:25:38 -0800 (Sun, 03 Dec 2006) Log Message: ----------- l4p: BFUGarux - forgotten resource Added Paths: ----------- linux4palm/BFUGarux/garux-genericK.rcp Added: linux4palm/BFUGarux/garux-genericK.rcp =================================================================== --- linux4palm/BFUGarux/garux-genericK.rcp (rev 0) +++ linux4palm/BFUGarux/garux-genericK.rcp 2006-12-03 17:25:38 UTC (rev 694) @@ -0,0 +1,129 @@ +/* + * garux.rcp + * + * Linux Loader for the Palm OS. + * + * Copyright (C) 2005 Romain Goyet + * Author: Romain Goyet [r....@gm...] + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include "gui.h" + +ALERT ID BFUAlert + INFORMATION +BEGIN + TITLE "BFUAlert" + MESSAGE "^1^2^3" + BUTTONS "OK" +END + +APPLICATIONICONNAME ID 7778 "BFUGarux" + +ICON +BEGIN + BITMAP "icons/icon_bw.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_hrK.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 +END + +SMALLICON +BEGIN + BITMAP "icons/icon_bw_s.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_hr_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 +END + +FORM ID MainForm AT (0 0 160 160) //2 2 156 156) +NOFRAME +USABLE +MENUID MainMenu +HELPID GnuGpl +BEGIN + TITLE "BFUGarux Linux Loader" + + LABEL "Linux 2.6.17-hnd0 T3" ID 2000 AT (CENTER 20) FONT 2 + + LABEL "REVISION SVN r. SVN_REV" ID 2001 AT (3 40) FONT 0 + LABEL "B.A.C.K.U.P. RAM !!! :-)" ID 2002 AT (3 PREVBOTTOM+1) FONT 0 + LABEL " boot=" ID 2003 AT (3 PREVBOTTOM+5) FONT 0 + FIELD ID KernelParam AT (PREVRIGHT+1 PREVTOP 100 55) MAXCHARS 1024 UNDERLINED MULTIPLELINES + + + BUTTON "Start Linux" ID LinuxButton AT (7 PREVBOTTOM+21 AUTO AUTO) + BUTTON "Quit to PalmOS" ID PalmOSButton AT (74 PREVTOP AUTO AUTO) +END + +MENU ID MainMenu +BEGIN + PULLDOWN "Options" + BEGIN + MENUITEM "About BFUGarux" MenuAbout +#here could be menu + MENUITEM "Quit" MenuQuit + END +END + +FORM ID AltForm AT (0 0 160 160) //2 2 156 156) +USABLE +MODAL +HELPID GnuGpl +BEGIN + TITLE "BFUGarux Linux Loader" + + LABEL "BFUGarux bootloader" ID 2005 AT (CENTER 20) FONT 2 + + LABEL "Wrong device !!!" ID 2006 AT (CENTER 40) FONT 1 + LABEL "You are not using a Tungsten E," ID 2006 AT (3 PREVBOTTOM+1) FONT 0 + LABEL "T2, T3 or LifeDrive." ID 2007 AT (3 PREVBOTTOM+1) FONT 0 + LABEL "This software is not compatible with" ID 2008 AT (3 PREVBOTTOM+1) FONT 0 + LABEL "the hardware you're using." ID 2009 AT (3 PREVBOTTOM+1) FONT 0 + + BUTTON "Quit to PalmOS" ID PalmOSButton AT (CENTER 110 AUTO AUTO) +END + +ALERT ID StartupAlert +WARNING +BEGIN + TITLE "Backup warning" + MESSAGE "Caution : You are about to unload the PalmOS from memory. ALL your data will be lost. Please ensure you backed-up your data before using this software." + BUTTON "I did a backup" "Back to PalmOS" + +END + + +STRING GnuGpl "(BFU)Garux, PalmOS Linux loader.\n"\ + "Copyright (C) 2005\n"\ + "\n"\ + "This program is free softwa-\n"\ + "re. you can redistribute it\n"\ + "and/or modify it under the\n"\ + "terms of the GNU General\n"\ + "Public License as published\n"\ + "by the Free Software\n"\ + "Foundation.\n"\ + "\n"\ + "This program is distributed\n"\ + "in the hope that it will be\n"\ + "useful, but WITHOUT ANY\n"\ + "WARRANTY; without even\n"\ + "the implied warranty of\n"\ + "MERCHANTABILITY or\n"\ + "FITNESS FOR A PARTICULAR\n"\ + "PURPOSE. See the GNU\n"\ + "General Public License for\n"\ + "more details.\n"\ + "\n"\ + "You should have received a\n"\ + "copy of the GNU General\n"\ + "Public License along with\n"\ + "this program; if not, write\n"\ + "to the Free Software\n"\ + "Foundation, Inc., 59 Temple\n"\ + "Place, Suite 330, Boston, MA\n"\ + "02111-1307 USA" + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-12-03 15:18:17
|
Revision: 693 http://svn.sourceforge.net/hackndev/?rev=693&view=rev Author: sleep_walker Date: 2006-12-03 07:02:13 -0800 (Sun, 03 Dec 2006) Log Message: ----------- l4p: BFUGarux-removed modules support for now, too buggy,added kEdAR's releases generation Modified Paths: -------------- linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/BFUSettings.Rsrc linux4palm/BFUGarux/Makefile Added Paths: ----------- linux4palm/BFUGarux/icons/icon_hrK.bmp Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-03 13:46:39 UTC (rev 692) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-03 15:02:13 UTC (rev 693) @@ -1,6 +1,6 @@ //#define BFU_VERBOSE -#define MODULES_DEBUG -#define MODULES_VERBOSE_DEBUG +//#define MODULES_DEBUG +//#define MODULES_VERBOSE_DEBUG // #define BFUContentsTest #define BFUSaveContentsTest @@ -106,8 +106,8 @@ Boolean UseSclBar,CardIn; + - static Boolean BFUCopySettingsStruct(BFUSettingsType *source,BFUSettingsType *dest) { UInt8 i; @@ -513,7 +513,7 @@ BFUPrefsVolRefNum = volRefNum; break; default: - //what did I missed??? + //what did I miss??? BFUdoDie("Send please Sleep_Walker this: VFSImportDatabaseFromFile and following number",err); return false; } @@ -587,9 +587,12 @@ break; case dmErrCantFind: break; -/* case 526: - BFUdoDie("Delete result was 526",0); - break;*/ + case 526: + if (BFUPrefsFound) + { + BFUdoDie("Delete result was 526",0); + } + break; default: BFUdoDie("Couldn't delete previously saved preferences.",err); return false; @@ -1234,7 +1237,7 @@ { CtlSetValue(getObjectPtr(pForm,BFUSave2CardBox),BFUSettingsValues.save2card); if ((CardIn = BFUInitFileLists())) - BFUInitTable(); + ;//BFUInitTable(); else BFUdoDie("No card or error occured.",0); BFUInitModList(); @@ -1328,8 +1331,9 @@ static void BFUModulesFormSaveFields(FormType *pForm) { +/* BFUSaveNames(); - BFUdoDie("Removing listHandle",0); + if (listHandle) { #ifdef MODULES_VERBOSE_DEBUG @@ -1339,19 +1343,27 @@ MemHandleFree(listHandle); listHandle = 0; } + +#ifdef MODULES_VERBOSE_DEBUG BFUdoDie("Removing ptrHandle",0); +#endif if (ptrHandle) { MemHandleFree(ptrHandle); ptrHandle = 0; } +*/ +#ifdef MODULES_VERBOSE_DEBUG BFUdoDie("Removing modListHandle",0); +#endif if (modListHandle) { MemHandleFree(modListHandle); modListHandle = 0; } +#ifdef MODULES_VERBOSE_DEBUG BFUdoDie("Removing modPtrHandle",0); +#endif if (modPtrHandle) { MemHandleFree(modPtrHandle); @@ -1438,7 +1450,7 @@ size = 0; - msize=1; + msize = 1; listHandle = 0; ptrHandle = 0; modPtrHandle = 0; @@ -1481,7 +1493,7 @@ { if (BFUIsSquashFS(fileName)) { - BFUPush2List(fileName); + //BFUPush2List(fileName); } else if (BFUIsModList(fileName)) Modified: linux4palm/BFUGarux/BFUSettings.Rsrc =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc 2006-12-03 13:46:39 UTC (rev 692) +++ linux4palm/BFUGarux/BFUSettings.Rsrc 2006-12-03 15:02:13 UTC (rev 693) @@ -81,10 +81,10 @@ POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 - TABLE ID BFUModulesTable AT (2 39 157 97) ROWS 8 COLUMNS 2 COLUMNWIDTHS 120 8 + TABLE ID BFUModulesTable AT (4 46 145 85) ROWS 24 COLUMNS 2 COLUMNWIDTHS 120 15 LABEL "Modules list:" ID 8210 AT (9 31) USABLE FONT 1 POPUPTRIGGER "Custom" ID BFUModListTrigger AT (72 29 47 15) USABLE LEFTANCHOR - SCROLLBAR ID BFUModScrollBar AT (150 46 7 85) USABLE VALUE 0 MIN 0 MAX 0 PAGESIZE 1 + SCROLLBAR ID BFUModScrollBar AT (151 46 7 85) USABLE VALUE 0 MIN 0 MAX 0 PAGESIZE 1 END FORM ID BFUToolsForm AT (0 0 160 160) Modified: linux4palm/BFUGarux/Makefile =================================================================== --- linux4palm/BFUGarux/Makefile 2006-12-03 13:46:39 UTC (rev 692) +++ linux4palm/BFUGarux/Makefile 2006-12-03 15:02:13 UTC (rev 693) @@ -1,6 +1,7 @@ # Main Makefile for Garux Bootloader # Copyright 2oo5 Romain Goyet + CC-68K = m68k-palmos-gcc CC-ARM = arm-palmos-gcc CFLAGS = -Wall -O2 -s @@ -27,6 +28,10 @@ @echo "<BFU> has to be:" @echo " BFU - include BFUSettings enhancements (makes Garux 15k bigger)" @echo " NoBFU - do not include BFUSettings" + @echo + @echo "for kEdAR:" + @echo " REVK=NUMBER SVNREV=SVN_REVISION_NUMBER make palmtt3 BFUk" + @echo palmte: cp mach-palmte.h mach.h @@ -61,6 +66,10 @@ garux-clean.prc: garux.h garux-clean asmloader gui image.bin build-prc -n garux-clean -c ARML garux-clean asmloader page????.bin tAIB????.bin tAIN????.bin tFRM????.bin tSTR????.bin MBAR????.bin Talt????.bin +# for kEdAR's releases +garux.$(REVK).prc: garux.h garux-clean asmloader gui image.bin + build-prc -n BFUGarux$(REVK) -c ARML garux-clean asmloader page????.bin tAIB????.bin tAIN????.bin tFRM????.bin tSTR????.bin MBAR????.bin Talt????.bin + asmloader: asmloader.o $(CC-ARM) $(CFLAGS) -nostartfiles -o asmloader asmloader.o @@ -88,6 +97,13 @@ cat garux-generic.rcp BFUSettings.Rsrc | sed 's/#here could be menu/ MENUITEM "BFUSettings" MenuBFU/' > garux.rcp make garux-clean.prc +# for kEdAR's releases +BFUk: image.bin + ./garux.h.sh + echo "#define with_BFUSettings" >> garux.h + cat garux-genericK.rcp BFUSettings.Rsrc | sed -e 's/#here could be menu/ MENUITEM "BFUSettings" MenuBFU/' -e "s/REVISION/$(REVK)/" -e "s/SVN_REV/$(SVNREV)/" > garux.rcp + make garux.$(REVK).prc + NoBFU: image.bin ./garux.h.sh cat garux-generic.rcp | sed 's/#here could be menu//' > garux.rcp Added: linux4palm/BFUGarux/icons/icon_hrK.bmp =================================================================== (Binary files differ) Property changes on: linux4palm/BFUGarux/icons/icon_hrK.bmp ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cri...@us...> - 2006-12-03 13:46:45
|
Revision: 692 http://svn.sourceforge.net/hackndev/?rev=692&view=rev Author: cristianop Date: 2006-12-03 05:46:39 -0800 (Sun, 03 Dec 2006) Log Message: ----------- palmtx: added irda support; some cleanup ... Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-12-02 19:44:15 UTC (rev 691) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2006-12-03 13:46:39 UTC (rev 692) @@ -5,4 +5,5 @@ obj-$(CONFIG_MACH_XSCALE_PALMTX) += palmtx.o obj-$(CONFIG_PALMTX_AC97) += palmld_ac97.o obj-$(CONFIG_PALMTX_LCD) += palmtx_lcd.o +obj-$(CONFIG_PM) += palmtx_pm.o #obj-$(CONFIG_PALMTX_PCMCIA) += palmtx_pcmcia.o Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-12-02 19:44:15 UTC (rev 691) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2006-12-03 13:46:39 UTC (rev 692) @@ -36,6 +36,7 @@ #include <asm/arch/pxa-dmabounce.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/udc.h> +#include <asm/arch/irda.h> #include <asm/arch/pxa27x_keyboard.h> #include <asm/arch/pxapwm-bl.h> @@ -187,86 +188,58 @@ .name = "palmtx-lcd", }; -/** - * IRDA - */ -/* Uncomment the following line to get serial console via SIR work from - * the very early booting stage. This is not useful for end-user. - */ -// #define EARLY_SIR_CONSOLE -#define IR_TRANSCEIVER_ON SET_HX4700_GPIO_N(IR_ON, 1) -#define IR_TRANSCEIVER_OFF SET_HX4700_GPIO_N(IR_ON, 0) +// IRDA -static void palmtx_irda_configure (struct uart_pxa_port *up, int enable) +static void palmtx_irda_transceiver_mode(struct device *dev, int mode) { - /* Switch STUART RX/TX pins to SIR */ - pxa_gpio_mode( GPIO_NR_PALMTX_ICP_RXD_MD ); - pxa_gpio_mode( GPIO_NR_PALMTX_ICP_TXD_MD ); + unsigned long flags; - /* make sure FIR ICP is off */ - ICCR0 = 0; + local_irq_save(flags); - if (enable) { - /* configure STUART to for SIR */ - STISR = STISR_XMODE | STISR_RCVEIR | STISR_RXPL; - //IR_TRANSCEIVER_ON; - } else { - STISR = 0; - //IR_TRANSCEIVER_OFF; - } -} + if (mode & IR_SIRMODE){ + printk (KERN_INFO "palmtx_irda: setting mode to SIR\n"); + } + else if (mode & IR_FIRMODE){ + printk (KERN_INFO "palmtx_irda: setting mode to FIR\n"); + } + if (mode & IR_OFF){ + printk (KERN_INFO "palmtx_irda: turning tranceiver OFF\n"); + SET_GPIO(GPIO_NR_PALMTX_IR_DISABLE, 1); + } + else { + printk (KERN_INFO "palmtx_irda: turning tranceiver ON\n"); + SET_GPIO(GPIO_NR_PALMTX_IR_DISABLE, 0); + SET_GPIO(GPIO_NR_PALMTX_ICP_TXD_MD, 1); + mdelay(30); + SET_GPIO(GPIO_NR_PALMTX_ICP_TXD_MD, 0); + } - -static void palmtx_irda_set_txrx (struct uart_pxa_port *up, int txrx) -{ - unsigned old_stisr = STISR; - unsigned new_stisr = old_stisr; - - if (txrx & PXA_SERIAL_TX) { - /* Ignore RX if TX is set */ - txrx &= PXA_SERIAL_TX; - new_stisr |= STISR_XMITIR; - } else - new_stisr &= ~STISR_XMITIR; - - if (txrx & PXA_SERIAL_RX) - new_stisr |= STISR_RCVEIR; - else - new_stisr &= ~STISR_RCVEIR; - - if (new_stisr != old_stisr) { - while (!(STLSR & LSR_TEMT)) - ; - //IR_TRANSCEIVER_OFF; - STISR = new_stisr; - //IR_TRANSCEIVER_ON; - } + local_irq_restore(flags); } -static int palmtx_irda_get_txrx (struct uart_pxa_port *up) -{ - return ((STISR & STISR_XMITIR) ? PXA_SERIAL_TX : 0) | - ((STISR & STISR_RCVEIR) ? PXA_SERIAL_RX : 0); +static struct pxaficp_platform_data palmtx_ficp_platform_data = { + .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, + .transceiver_mode = palmtx_irda_transceiver_mode, +}; -} -static struct platform_pxa_serial_funcs palmtx_pxa_irda_funcs = { - .configure = palmtx_irda_configure, - .set_txrx = palmtx_irda_set_txrx, - .get_txrx = palmtx_irda_get_txrx, -}; + // UDC (USB gadget controller) static int palmtx_udc_is_connected (void){ int ret = !(GET_GPIO(GPIO_NR_PALMTX_USB_DETECT)); - printk (KERN_INFO "palmtx_udc: gpio status is %d\n",ret); + if (ret) + printk (KERN_INFO "palmtx_udc: device detected [USB_DETECT: %d]\n",ret); + else + printk (KERN_INFO "palmtx_udc: no device detected [USB_DETECT: %d]\n",ret); + return ret; } @@ -371,63 +344,41 @@ }; -// grabbed Alex' initialization code: thx! static void __init palmtx_map_io(void) { pxa_map_io(); iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc)); - - /* wake up on */ - - PWER |= PWER_GPIO0 | PWER_RTC | PWER_GPIO12; - PFER |= PWER_GPIO0 | PWER_RTC; - PRER |= PWER_GPIO12; - - /* USB, in theory this can even wake us from deep sleep */ - PWER |= PWER_GPIO3; - PFER |= PWER_GPIO3; - PRER |= PWER_GPIO3; - - PGSR2 |= (1<<30); - PGSR3 |= (1<<7) | (1<<8) | (1<<9); - - PKWR |= GPIO_bit(0) | GPIO_bit(12) | GPIO_bit(3) | (1<<17); - PKSR = 0xffffffff; // clear - - /* Clear reset status */ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; } + static void __init palmtx_init(void) { - - // disable interrupt to prevent WM9712 constantly interrupting the CPU + // disable primary codec interrupt to prevent WM9712 constantly interrupting the CPU // and preventing the boot process to complete (Thanx Alex & Shadowmite!) GCR &= ~GCR_PRIRDY_IEN; - // set AC97's GPIOs + // configure AC97's GPIOs pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD); pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); pxa_gpio_mode(GPIO31_SYNC_AC97_MD); - set_pxa_fb_info(&palmtx_fb); - pxa_set_mci_info( &palmtx_mci_platform_data ); - pxa_set_udc_info(&palmtx_udc_mach_info); - - platform_add_devices( devices, ARRAY_SIZE(devices) ); + set_pxa_fb_info ( &palmtx_fb ); + pxa_set_mci_info ( &palmtx_mci_platform_data ); + pxa_set_udc_info ( &palmtx_udc_mach_info ); + pxa_set_ficp_info ( &palmtx_ficp_platform_data ); - stuart_device.dev.platform_data = &palmtx_pxa_irda_funcs; + platform_add_devices( devices, ARRAY_SIZE(devices) ); + + //stuart_device.dev.platform_data = &palmtx_pxa_irda_funcs; } MACHINE_START(XSCALE_PALMTX, "Palm TX") - //.phys_ram = PALMTX_PHYS_RAM_START, .phys_io = PALMTX_PHYS_IO_START, - //.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .io_pg_offst = io_p2v(0x40000000), .boot_params = 0xa0000100, .map_io = palmtx_map_io, Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c 2006-12-02 19:44:15 UTC (rev 691) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_lcd.c 2006-12-03 13:46:39 UTC (rev 692) @@ -100,24 +100,13 @@ static int palmtx_lcd_suspend(struct device *dev, pm_message_t state) { - struct pm_save_data *save; - - if (!dev->power.saved_state) - dev->power.saved_state = kmalloc(sizeof(struct pm_save_data), GFP_KERNEL); - if (!dev->power.saved_state) - return -ENOMEM; - save = dev->power.saved_state; + palmtx_lcd_set_power(pxafb_lcd_device, FB_BLANK_UNBLANK); return 0; } static int palmtx_lcd_resume(struct device *dev) { - if (dev->power.saved_state) { - struct pm_save_data *save = dev->power.saved_state; - kfree(dev->power.saved_state); - dev->power.saved_state = NULL; - } - + palmtx_lcd_set_power(pxafb_lcd_device, FB_BLANK_POWERDOWN); return 0; } #endif Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2006-12-02 19:44:15 UTC (rev 691) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2006-12-03 13:46:39 UTC (rev 692) @@ -28,6 +28,7 @@ #define _INCLUDE_PALMTX_GPIO_H_ /* GPIOs */ +#define GPIO_NR_PALMTX_GPIO_RESET 1 #define GPIO_NR_PALMTX_POWER_DETECT 90 #define GPIO_NR_PALMTX_HOTSYNC_BUTTON_N 10 @@ -56,6 +57,7 @@ #define GPIO_NR_PALMTX_ICP_RXD 46 // Infrared receive pin #define GPIO_NR_PALMTX_ICP_TXD 47 // Infrared transmit pin +#define GPIO_NR_PALMTX_IR_DISABLE 40 // connected to SD pin of tranceiver (TFBS4710?) ? #define GPIO_NR_PALMTX_ICP_RXD_MD (GPIO_NR_PALMTX_ICP_RXD | GPIO_ALT_FN_1_IN) #define GPIO_NR_PALMTX_ICP_TXD_MD (GPIO_NR_PALMTX_ICP_TXD | GPIO_ALT_FN_2_OUT) @@ -75,4 +77,6 @@ #define IRQ_GPIO_PALMTX_USB_DETECT IRQ_GPIO(GPIO_NR_PALMTX_USB_DETECT) +#define IRQ_GPIO_PALMTX_GPIO_RESET IRQ_GPIO(GPIO_NR_PALMTX_GPIO_RESET) + #endif Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2006-12-02 19:44:15 UTC (rev 691) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2006-12-03 13:46:39 UTC (rev 692) @@ -46,6 +46,11 @@ #define PALMTX_KM_COLS 3 +// TOUCHSCREEN + +#define AC97_LINK_FRAME 21 + + // BATTERY #define PALMTX_BAT_MAX_VOLTAGE 4000 // 3.99v current voltage at max charge as from Filez This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hol...@us...> - 2006-12-02 19:44:18
|
Revision: 691 http://svn.sourceforge.net/hackndev/?rev=691&view=rev Author: holger_bocklet Date: 2006-12-02 11:44:15 -0800 (Sat, 02 Dec 2006) Log Message: ----------- headphone mixer control for ucb1400, backport from alsa 1.0.12, kernel 2.6.18 Modified Paths: -------------- linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c =================================================================== --- linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c 2006-12-02 17:02:45 UTC (rev 690) +++ linux4palm/linux/trunk/sound/pci/ac97/ac97_codec.c 2006-12-02 19:44:15 UTC (rev 691) @@ -151,7 +151,7 @@ { 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk { 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, { 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix -{ 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, +{ 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL }, { 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, { 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c =================================================================== --- linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c 2006-12-02 17:02:45 UTC (rev 690) +++ linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.c 2006-12-02 19:44:15 UTC (rev 691) @@ -2855,3 +2855,33 @@ ac97->res_table = lm4550_restbl; return 0; } + +/* + * UCB1400 codec + */ +static const struct snd_kcontrol_new snd_ac97_controls_ucb1400[] = { +AC97_SINGLE("Headphone Driver", 0x6a, 6, 1, 0), +AC97_SINGLE("DC Filter", 0x6a, 4, 1, 0), +AC97_SINGLE("Smart Power Mode", 0x6c, 4, 3, 0), +}; + +static int patch_ucb1400_specific(struct snd_ac97 * ac97) +{ + int idx, err; + for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_ucb1400); idx++) + if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_ucb1400[idx], ac97))) < 0) + return err; + return 0; +} + +static struct snd_ac97_build_ops patch_ucb1400_ops = { + .build_specific = patch_ucb1400_specific, +}; + +int patch_ucb1400(struct snd_ac97 * ac97) +{ + ac97->build_ops = &patch_ucb1400_ops; + snd_ac97_write(ac97, 0x6a, 0x0050); + snd_ac97_write(ac97, 0x6c, 0x0030); + return 0; +} Modified: linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h =================================================================== --- linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h 2006-12-02 17:02:45 UTC (rev 690) +++ linux4palm/linux/trunk/sound/pci/ac97/ac97_patch.h 2006-12-02 19:44:15 UTC (rev 691) @@ -58,5 +58,6 @@ int patch_vt1616(struct snd_ac97 * ac97); int patch_vt1617a(struct snd_ac97 * ac97); int patch_it2646(struct snd_ac97 * ac97); +int patch_ucb1400(struct snd_ac97 * ac97); int mpatch_si3036(struct snd_ac97 * ac97); int patch_lm4550(struct snd_ac97 * ac97); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-12-02 17:02:49
|
Revision: 690 http://svn.sourceforge.net/hackndev/?rev=690&view=rev Author: sleep_walker Date: 2006-12-02 09:02:45 -0800 (Sat, 02 Dec 2006) Log Message: ----------- l4p: BFUGarux - modules update & very verbose output Modified Paths: -------------- linux4palm/BFUGarux/BFULinuxHelper.c linux4palm/BFUGarux/BFUSettings-alone.c Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-12-02 00:25:32 UTC (rev 689) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-12-02 17:02:45 UTC (rev 690) @@ -73,8 +73,8 @@ char buffer[1025],*end,*ptr; char useNet,source; unsigned char IP[4],i; - long optint; - FILE *stream; + long optint,modint,modlist; + FILE *stream,*modfile; if (argc) stream=fopen(*argv,"r"); else @@ -180,6 +180,18 @@ //RAMdisk size printf("BFURAMDiskSize="); ReadString(&ptr); +//modules; + strchr(ptr,BFUDelimiter); + modint = ReadHexa(4,ptr); + modfile = fopen("/tmp/modfile","w"); + while (modint) + { + fprintf(modfile,"%d\n",modint & 1); + modint >>= 1; + } + ptr += 5; + printf("BFUModList="); + ReadString(&ptr); fclose(stream); return 0; } Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-02 00:25:32 UTC (rev 689) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-02 17:02:45 UTC (rev 690) @@ -79,7 +79,7 @@ void BFUdoDie(const Char * ErrStr,Err error); static Boolean BFUPush2ModList(const Char *name); static Boolean BFUIsModList(const Char *name); -static Boolean BFUReadModLists(UInt16 volRefNum); +//static Boolean BFUReadModLists(UInt16 volRefNum); static Boolean BFUInitModList(); Int16 BFUCompare(void **v1,void **v2,Int32 other); static Boolean BFUInitTable(); @@ -323,7 +323,12 @@ StrCat(BFUCommandLinePart,del); //Modules selection StrPrintF(netSet,"%x",BFUSettingsValues.modules); - BFUdoDie(netSet,0); + StrCat(BFUCommandLinePart,netSet); + StrCat(BFUCommandLinePart,del); + StrPrintF(netSet,"%d",BFUSettingsValues.modlist); + StrCat(BFUCommandLinePart,netSet); + StrCat(BFUCommandLinePart,del); +// #ifdef BFU_VERBOSE BFUdoDie(BFUCommandLinePart,0); #endif @@ -415,6 +420,7 @@ *BFUCommandLinePart='\0'; return false; } + BFUInitFileLists(); BFUPrefs2String(); return true; } @@ -572,8 +578,8 @@ MemHandle handle; BFUSettingsType *data; // BFUdoDie("going to delete dbase",0); - if (BFUPrefsFound) - { +// if (BFUPrefsFound) +// { err = DmDeleteDatabase(cardNo,BFUPrefs); switch(err) { @@ -589,7 +595,7 @@ return false; break; } - } +// } // BFUdoDie("going to create dbase",0); err = DmCreateDatabase(cardNo,"BFUSavedSettings", 'ARML','BFUS',false); if (err != errNone) @@ -1073,6 +1079,9 @@ } handled = true; break; + case BFUModListTrigger: + BFUSettingsValues.modlist = pEvent->data.popSelect.selection; + break; } // *** ADD EVENT HANDLING HERE *** // default: @@ -1458,7 +1467,7 @@ BFUdoDie("Entering BFUReadFileNames()",0); #endif - err = VFSFileOpen(volRefNum,"/"/* "linux2ram"*/,vfsModeRead,&dirRef); + err = VFSFileOpen(volRefNum,BFUSettingsValues.address /*"/" "linux2ram"*/,vfsModeRead,&dirRef); switch(err) { case errNone: @@ -1759,7 +1768,7 @@ BFUdoDie("Couldn't lock new handle. Can't save.",0); return false; } - for (i = 0; i < size ; ++i) + for (i = size-1; i ; --i) { if (TblGetItemInt(tab,i,1)) { @@ -1821,6 +1830,7 @@ BFUdoDie("Unlock ptrHandle",0); #endif MemHandleUnlock(ptrHandle); + BFUSettingsValues.modules = bitmap; #ifdef MODULES_DEBUG BFUdoDie("leaving BFUSaveNames()",0); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-12-02 00:25:37
|
Revision: 689 http://svn.sourceforge.net/hackndev/?rev=689&view=rev Author: sleep_walker Date: 2006-12-01 16:25:32 -0800 (Fri, 01 Dec 2006) Log Message: ----------- l4p: BFUGarux initial module selection support Modified Paths: -------------- linux4palm/BFUGarux/BFUDefaultSettings.h linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/BFUSettings.Rsrc linux4palm/BFUGarux/BFUSettings.Rsrc.h linux4palm/BFUGarux/garux-clean.c Modified: linux4palm/BFUGarux/BFUDefaultSettings.h =================================================================== --- linux4palm/BFUGarux/BFUDefaultSettings.h 2006-12-01 23:16:34 UTC (rev 688) +++ linux4palm/BFUGarux/BFUDefaultSettings.h 2006-12-02 00:25:32 UTC (rev 689) @@ -13,6 +13,7 @@ #define BFUDefaultFileNameOnCard "/BFUSavedSettings.pdb" #define BFUDefaultFileNameSize 256 +#define BFURowsInTable 6 #define BFUDefaultSource 0 #define BFUDefaultAddress "/linux2ram" Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-01 23:16:34 UTC (rev 688) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-12-02 00:25:32 UTC (rev 689) @@ -1,4 +1,11 @@ //#define BFU_VERBOSE +#define MODULES_DEBUG +#define MODULES_VERBOSE_DEBUG + +// #define BFUContentsTest +#define BFUSaveContentsTest + + #include "BFUDefaultSettings.h" #include "BFUSettings.Rsrc.h" @@ -24,6 +31,7 @@ UInt8 mask[4]; //modules UInt32 modules; + UInt8 modlist; //advanced settings UInt8 debug; UInt8 silentBoot; @@ -34,7 +42,6 @@ UInt8 fsck; UInt8 copy2ram; Char RAMdiskSize[BFURAMdiskMaxLength]; - UInt8 save2card; } BFUSettingsType; @@ -66,6 +73,19 @@ static Boolean BFUToolsFormEventHandler (EventPtr pEvent); static Boolean BFUAdvancedFormEventHandler (EventPtr pEvent); static void BFUSetFieldText(FormType *pForm,UInt32 index,Char *new_text,UInt32 MaxLength); +//from modules.c +static Boolean BFUReadFileNames(UInt16 volRefNum); +static Boolean BFUInitFileLists(); +void BFUdoDie(const Char * ErrStr,Err error); +static Boolean BFUPush2ModList(const Char *name); +static Boolean BFUIsModList(const Char *name); +static Boolean BFUReadModLists(UInt16 volRefNum); +static Boolean BFUInitModList(); +Int16 BFUCompare(void **v1,void **v2,Int32 other); +static Boolean BFUInitTable(); +static void BFUSetTableFromBar(Int16 val); +static Boolean BFUSaveNames(); +static Boolean BFUInitModList(); Char BFUCommandLinePart[BFUCommandLinePartLength]; @@ -78,7 +98,16 @@ UInt16 cardNo; //UInt32 volIterator; UInt16 BFUPrefsVolRefNum; +//from modules.c +MemHandle listHandle, modListHandle,modPtrHandle; +MemHandle ptrHandle,saveHandle; +UInt8 size,msize,modCount; +UInt32 mlength,length; +Boolean UseSclBar,CardIn; + + + static Boolean BFUCopySettingsStruct(BFUSettingsType *source,BFUSettingsType *dest) { UInt8 i; @@ -111,6 +140,8 @@ dest->reflash = source->reflash; dest->copy2ram = source->copy2ram; dest->fsck = source->fsck; + dest->modules = source->modules; + dest->modlist = source->modlist; return true; } @@ -173,7 +204,6 @@ options |= BFUSettingsValues.fs; options = options << 2; options |= BFUSettingsValues.source; - // BFUPrintHex(options,optstr); // StrPrintF(optstr,"%x",options); // BFUdoDie(optstr,options); @@ -291,6 +321,9 @@ StrCat(BFUCommandLinePart,BFUSettingsValues.RAMdiskSize); // BFUdoDie(BFUCommandLinePart,0); StrCat(BFUCommandLinePart,del); +//Modules selection + StrPrintF(netSet,"%x",BFUSettingsValues.modules); + BFUdoDie(netSet,0); #ifdef BFU_VERBOSE BFUdoDie(BFUCommandLinePart,0); #endif @@ -336,7 +369,9 @@ BFUSettingsValues.save2card = BFUDefaultSave2Card; BFUSettingsValues.reflash = BFUDefaultReflash; BFUSettingsValues.copy2ram = BFUDefaultCopy2RAM; - BFUSettingsValues.fsck = 0; + BFUSettingsValues.fsck = BFUDefaultFSCK; + BFUSettingsValues.modules = 0; + BFUSettingsValues.modlist = 0; } @@ -855,7 +890,11 @@ Boolean BFUModulesFormEventHandler(EventPtr pEvent) { Boolean handled = false; + Int16 row,val; + TableType *tab; + ScrollBarType *bar; FormPtr pForm = FrmGetActiveForm(); + switch (pEvent->eType) { case frmOpenEvent: // Form's 1st event @@ -888,6 +927,59 @@ break; } break; + case tblEnterEvent: + tab=getObjectPtr(pForm,BFUModulesTable); + row = pEvent->data.tblEnter.row; + val=TblGetItemInt(tab,row,1); + val = (val+1)%2; + TblSetItemInt(tab,row,1,val); + TblSetSelection(tab,row,0); + TblMarkRowInvalid(tab,row); + TblRedrawTable(tab); + break; + case sclRepeatEvent: +// BFUSaveNames(); + tab=getObjectPtr(pForm,BFUModulesTable); + bar = pEvent->data.sclRepeat.pScrollBar; + val = pEvent->data.sclRepeat.newValue; + if (UseSclBar) + { + BFUSetTableFromBar(val); + SclSetScrollBar(bar,val, 0,(UInt16)(size-BFURowsInTable), 1); + SclDrawScrollBar(bar); + } + break; + case keyDownEvent: + if (UseSclBar) + switch(pEvent->data.keyDown.chr) + { + case 11://up + bar=getObjectPtr(pForm,BFUModScrollBar); + SclGetScrollBar(bar,&val,0,0,0); + if (val) + { + --val; + BFUSetTableFromBar(val); + SclSetScrollBar(bar,val, 0, + (UInt16)(size-BFURowsInTable), 1); + SclDrawScrollBar(bar); + } + break; + case 12://down + bar=getObjectPtr(pForm,BFUModScrollBar); + SclGetScrollBar(bar,&val,0,0,0); + if (val<size-BFURowsInTable) + { + ++val; + BFUSetTableFromBar(val); + SclSetScrollBar(bar,val, 0, + (UInt16)(size-BFURowsInTable), 1); + SclDrawScrollBar(bar); + } + + break; + } + break; case popSelectEvent: switch(pEvent->data.popSelect.controlID) { @@ -1132,6 +1224,11 @@ static void BFUModulesFormInit (FormPtr pForm) { CtlSetValue(getObjectPtr(pForm,BFUSave2CardBox),BFUSettingsValues.save2card); + if ((CardIn = BFUInitFileLists())) + BFUInitTable(); + else + BFUdoDie("No card or error occured.",0); + BFUInitModList(); } static void BFUToolsFormInit (FormPtr pForm) @@ -1167,6 +1264,8 @@ static void BFUOKButtonPressed() { BFUPrefs2String(); + if (saveHandle) + MemHandleFree(saveHandle); // FrmCustomAlert(BFUAlert,"Output string:\n",BFUCommandLinePart,NULL); FrmGotoForm(1000); } @@ -1182,6 +1281,8 @@ static void BFUCancelButtonPressed() { *BFUCommandLinePart = '\0'; + if (saveHandle) + MemHandleFree(saveHandle); FrmGotoForm(1000); } @@ -1217,7 +1318,37 @@ static void BFUModulesFormSaveFields(FormType *pForm) -{ +{ + BFUSaveNames(); + BFUdoDie("Removing listHandle",0); + if (listHandle) + { +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Unlock listHandle",0); +#endif + MemHandleUnlock(listHandle); + MemHandleFree(listHandle); + listHandle = 0; + } + BFUdoDie("Removing ptrHandle",0); + if (ptrHandle) + { + MemHandleFree(ptrHandle); + ptrHandle = 0; + } + BFUdoDie("Removing modListHandle",0); + if (modListHandle) + { + MemHandleFree(modListHandle); + modListHandle = 0; + } + BFUdoDie("Removing modPtrHandle",0); + if (modPtrHandle) + { + MemHandleFree(modPtrHandle); + modPtrHandle = 0; + } + return; } static void BFUToolsFormSaveFields(FormType *pForm) @@ -1229,3 +1360,484 @@ StrNCopy(BFUSettingsValues.RAMdiskSize, FldGetTextPtr(getObjectPtr(pForm,BFURAMdiskSizeField)),BFURAMdiskMaxLength); } + +static Boolean BFUPush2List(const Char *name) +{ + Char *ptr; + Err err; + +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Entering BFUPush2List()",0); +#endif + + if (size) + { + ++size; + err = MemHandleResize(listHandle,size*BFUDefaultFileNameSize); + switch (err) + { + case 0: + //OK + break; + default: + BFUdoDie("Cannot resize modListHandle! That's fatal error for this form",0); + return false; + } + } + else + { + size=1; + listHandle=MemHandleNew(BFUDefaultFileNameSize); + } + ptr = MemHandleLock(listHandle); + StrNCopy(ptr+length,name, BFUDefaultFileNameSize); + length += StrLen(name)+1; + MemHandleUnlock(listHandle); +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Leaving BFUPush2List()",0); +#endif + return true; +} + +static Boolean BFUIsSquashFS(const Char *name) +{ + UInt8 l; + if ((l=StrLen(name))>9) + { + if (!StrCaselessCompare(".squashfs",name+l-9)) + return true; + } + return false; +} + + +static Boolean BFUReadFileNames(UInt16 volRefNum) +{ + FileInfoType info; + FileRef dirRef; + UInt32 dirIterator; + Boolean result = true; + Char *fileName = MemPtrNew(256); + Char *ptr, **pptr; +// FormPtr pForm=FrmGetActiveForm(); + Err err; + + +#ifdef BFUContentsTest + UInt32 i; +#endif + + + size = 0; + msize=1; + listHandle = 0; + ptrHandle = 0; + modPtrHandle = 0; + modListHandle = 0; + + if (!fileName) + { + BFUdoDie("Couldn't allocate memory for fileName buffer",0); + return false; + } + + modListHandle = MemHandleNew(BFUDefaultFileNameSize); + if (!modListHandle) + { + BFUdoDie("Couldn't allocate memory for modListHandle",0); + return false; + } + ptr = MemHandleLock(modListHandle); + StrCopy(ptr,"Custom"); + ptr[6]='\0'; + mlength=7;//"Custom" + MemHandleUnlock(modListHandle); + + +#ifdef MODULES_DEBUG + BFUdoDie("Entering BFUReadFileNames()",0); +#endif + + err = VFSFileOpen(volRefNum,"/"/* "linux2ram"*/,vfsModeRead,&dirRef); + switch(err) + { + case errNone: + info.nameP = fileName; + info.nameBufLen = 256; + dirIterator = vfsIteratorStart; + while (dirIterator != vfsIteratorStop) + { + err = VFSDirEntryEnumerate (dirRef, &dirIterator,&info); + if (err == errNone) + { + if (BFUIsSquashFS(fileName)) + { + BFUPush2List(fileName); + } + else + if (BFUIsModList(fileName)) + { + BFUPush2ModList(fileName); + } + + } + else + { + dirIterator = vfsIteratorStop; + result = false; + } + } + } + if (result) + { +//sort names here + if (size) + { + ptr = MemHandleLock(listHandle); + if (!ptr) + { + BFUdoDie("Couldn't lock listHandle",0); + return false; + } + ptrHandle = SysFormPointerArrayToStrings(ptr,size); + if (!ptrHandle) + { + BFUdoDie("ptrHandle error",0); + return false; + } + pptr = MemHandleLock(ptrHandle); + if (size > 1) + SysQSort(pptr, size, sizeof(Char *),(CmpFuncPtr)&BFUCompare,0); + +#ifdef BFUContentsTest + for (i = 0; i < size ; ++i) + { + BFUdoDie(pptr[i],0); + } +#endif +// MemHandleUnlock(listHandle); + MemHandleUnlock(ptrHandle); + } + + ptr = MemHandleLock(modListHandle); + if (!ptr) + { + BFUdoDie("Couldn't lock modListHandle error",0); + return false; + } + + modPtrHandle = SysFormPointerArrayToStrings(ptr,msize); + if (!modPtrHandle) + { + BFUdoDie("modPtrHandle error",0); + return false; + } + pptr = MemHandleLock(modPtrHandle); + if (!modPtrHandle) + { + BFUdoDie("Couldn't lock modPtrHandle",0); + return false; + } + if (size > 1) + SysQSort(pptr, msize, sizeof(Char *), (CmpFuncPtr)(&BFUCompare),0); + +#ifdef BFUContentsTest + for (i = 0; i < msize ; ++i) + { + BFUdoDie(pptr[i],0); + } +#endif + } + MemPtrFree(fileName); + VFSFileClose(dirRef); + return true; +} + +static Boolean BFUInitFileLists() +{ + UInt16 volRefNum; + UInt32 vfsIterator=vfsIteratorStart; + Err err; + Boolean result=false; + +#ifdef MODULES_DEBUG + BFUdoDie("Entering BFUInitFileList()",0); +#endif + + while(vfsIterator != vfsIteratorStop) + { + err = VFSVolumeEnumerate(&volRefNum,&vfsIterator); + switch (err) + { + case errNone: + if ((result=BFUReadFileNames(volRefNum))) + vfsIterator = vfsIteratorStop; + break; + default: + vfsIterator = vfsIteratorStop; + break; + } + } +#ifdef MODULES_DEBUG + BFUdoDie("Leaving BFUInitFileList()",0); +#endif + return result; +} + +static Boolean BFUInitTable() +{ + int i; + Char **ptr; + TableType *table = getObjectPtr(FrmGetActiveForm(),BFUModulesTable); + Int16 numRow = size; + FormPtr pForm = FrmGetActiveForm(); + +#ifdef MODULES_DEBUG + BFUdoDie("Entering BFUInitTable()",0); +#endif + + if (ptrHandle) + ptr = MemHandleLock(ptrHandle); + else + { + BFUdoDie("ptrHandle not allocated,shouldn't happen",0); + return false; + } + for (i=0; i < numRow; ++i) + { + TblSetItemStyle(table,i,1,checkboxTableItem); + TblSetItemInt(table,i,1,0); + TblSetItemStyle(table,i,0,labelTableItem); + TblSetItemPtr(table,i,0,ptr[i]); + TblSetRowUsable(table,i,true); + TblSetRowSelectable(table,i,true); + TblSetRowStaticHeight(table,i,true); + TblSetRowHeight(table,i,15); + } + TblMarkTableInvalid(table); + TblSetColumnSpacing(table,0,7); + TblSetColumnSpacing(table,1,20); + TblSetColumnUsable(table,0,true); + TblSetColumnUsable(table,1,true); + TblHasScrollBar(table,true); + if ((UseSclBar = size>BFURowsInTable)) + { + SclSetScrollBar(getObjectPtr(pForm, + BFUModScrollBar), 0,0, (UInt16)(size-BFURowsInTable),1); +// FrmShowObject(pForm,BFUModScrollBar); + } +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Going to set",0); +#endif + if (UseSclBar) + BFUSetTableFromBar(0); +#ifdef MODULES_DEBUG + BFUdoDie("leaving BFUInitTable()",0); +#endif + return true; +} + +static void BFUSetTableFromBar(Int16 val) +{ + Int16 i; + TableType *tab=getObjectPtr(FrmGetActiveForm(),BFUModulesTable); + +#ifdef MODULES_DEBUG + BFUdoDie("Entering BFUSetTableFromBar()",0); +#endif + + for (i = 0 ; i < size ; ++i) + { + TblSetRowMasked(tab,i,((i>=val)&&(i<val+BFURowsInTable))); + TblSetRowUsable(tab,i,((i>=val)&&(i<val+BFURowsInTable))); + TblMarkRowInvalid(tab,i); + } + TblMarkTableInvalid(tab); + TblRedrawTable(tab); +#ifdef MODULES_DEBUG + BFUdoDie("leaving BFUSetTableFromBar()",0); +#endif +} + +static Boolean BFUPush2ModList(const Char *name) +{ + Char *ptr; + Err err; + +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Entering BFUPush2ModList()",0); +#endif + + if (msize) + { + ++msize; + err = MemHandleResize(modListHandle,msize*BFUDefaultFileNameSize); + switch (err) + { + case 0: + //OK + break; + default: + BFUdoDie("Cannot resize modListHandle! That's fatal error for this form",0); + return false; + } + } + else + { + msize=1; + modListHandle=MemHandleNew(BFUDefaultFileNameSize); + } + ptr = MemHandleLock(modListHandle); + StrNCopy(ptr+mlength,name, BFUDefaultFileNameSize); + mlength += StrLen(name)+1; + MemHandleUnlock(modListHandle); +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("leaving BFUPush2ModList()",0); +#endif + return true; +} + + + +static Boolean BFUIsModList(const Char *name) +{ + Char mod[8];//length of "modlist" + UInt8 l; +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("entering BFUIsModList()",0); +#endif + if ((l=StrLen(name))>11) + { + StrNCopy(mod,name,7); //copy "modlist" from beginning + mod[7]='\0'; + if (!StrCaselessCompare(".txt",name+l-4) && !StrCaselessCompare("modlist",mod)) + return true; + } + return false; +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("leaving BFUIsModList()",0); +#endif +} + + + +Int16 BFUCompare(void **v1,void **v2,Int32 other) +{ + return StrNCaselessCompare((Char *)*v1,(Char *)*v2,BFUDefaultFileNameSize); +} + +static Boolean BFUSaveNames() +{ + Int16 i; + UInt32 len=0,slen; + UInt32 bitmap=0; + Char **pptr,*sptr; + MemHandle ptrs; + TableType *tab=getObjectPtr(FrmGetActiveForm(),BFUModulesTable); + Err err; +#ifdef MODULES_DEBUG + BFUdoDie("entered BFUSaveNames()",0); +#endif + + if (saveHandle) + { + MemHandleFree(saveHandle); + saveHandle = 0; + } + modCount = 0; + if (size) + { + saveHandle = MemHandleNew(BFUDefaultFileNameSize); + if (!saveHandle) + { + BFUdoDie("Couldn't create new handle. Can't save.",0); + return false; + } + pptr = MemHandleLock(ptrHandle); + if (!pptr) + { + BFUdoDie("Couldn't lock new handle. Can't save.",0); + return false; + } + for (i = 0; i < size ; ++i) + { + if (TblGetItemInt(tab,i,1)) + { + ++modCount; + bitmap |=1; + slen = StrLen(pptr[i]); + err=MemHandleResize(saveHandle,len+slen+1); + if (err) + { + BFUdoDie("Couldn't resize new handle. Can't save.",0); + return false; + } + sptr=MemHandleLock(saveHandle); + if (!sptr) + { + BFUdoDie("Couldn't lock resized handle. Can't save.",0); + return false; + } + BFUdoDie(pptr[i],0); + StrNCopy(sptr+len,pptr[i],slen); + len+=slen+1; + sptr[len-1]='\0'; + MemHandleUnlock(saveHandle); + } + bitmap <<=1; + } + bitmap >>=1; +// BFUdoDie("Bitmap",bitmap); +#ifdef BFUSaveContentsTest + sptr=MemHandleLock(saveHandle); + ptrs = SysFormPointerArrayToStrings(sptr,size); + if (!ptrs) + { + BFUdoDie("ptrs error",0); + return false; + } + pptr = MemHandleLock(ptrs); + if (!pptr) + { + BFUdoDie("Couldn't lock ptrs. Can't save.",0); + return false; + } + for (i = 0; i < modCount ; ++i) + { + BFUdoDie(pptr[i],0); + } +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Unlock saveHandle",0); +#endif + MemHandleUnlock(saveHandle); +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Unlock ptrs",0); +#endif + MemHandleUnlock(ptrs); + MemHandleFree(ptrs); + ptrs = 0; +#endif +#ifdef MODULES_VERBOSE_DEBUG + BFUdoDie("Unlock ptrHandle",0); +#endif + MemHandleUnlock(ptrHandle); +#ifdef MODULES_DEBUG + BFUdoDie("leaving BFUSaveNames()",0); +#endif + } + return true; +} + +static Boolean BFUInitModList() +{ + FormPtr pForm=FrmGetActiveForm(); + Char **pptr = MemHandleLock(modPtrHandle); + + LstNewList ((void **)&pForm, BFUModList, 72, 29,85, 44,stdFont, 4,BFUModListTrigger); + LstSetListChoices(getObjectPtr(pForm,BFUModList),pptr,msize); + MemHandleUnlock(modListHandle); + MemHandleUnlock(modPtrHandle); + MemHandleUnlock(modPtrHandle); + return true; +} + Modified: linux4palm/BFUGarux/BFUSettings.Rsrc =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc 2006-12-01 23:16:34 UTC (rev 688) +++ linux4palm/BFUGarux/BFUSettings.Rsrc 2006-12-02 00:25:32 UTC (rev 689) @@ -81,7 +81,10 @@ POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 - TABLE ID BFUModuleTable AT (9 31 141 100) ROWS 8 COLUMNS 2 COLUMNWIDTHS 120 8 + TABLE ID BFUModulesTable AT (2 39 157 97) ROWS 8 COLUMNS 2 COLUMNWIDTHS 120 8 + LABEL "Modules list:" ID 8210 AT (9 31) USABLE FONT 1 + POPUPTRIGGER "Custom" ID BFUModListTrigger AT (72 29 47 15) USABLE LEFTANCHOR + SCROLLBAR ID BFUModScrollBar AT (150 46 7 85) USABLE VALUE 0 MIN 0 MAX 0 PAGESIZE 1 END FORM ID BFUToolsForm AT (0 0 160 160) Modified: linux4palm/BFUGarux/BFUSettings.Rsrc.h =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc.h 2006-12-01 23:16:34 UTC (rev 688) +++ linux4palm/BFUGarux/BFUSettings.Rsrc.h 2006-12-02 00:25:32 UTC (rev 689) @@ -7,8 +7,12 @@ #define BFUSave2CardBox 8543 #define BFUModulesForm 8200 //"BFUSettings - Modules" -#define BFUModuleTable 8201 +#define BFUModulesTable 8201 +#define BFUModListTrigger 8202 +#define BFUModScrollBar 8203 +#define BFUModList 8205 + #define BFUToolsForm 8300 //"BFUSettings - Tools" #define BFUSilentBootBox 8301 #define BFUKeyboardSupportBox 8303 Modified: linux4palm/BFUGarux/garux-clean.c =================================================================== --- linux4palm/BFUGarux/garux-clean.c 2006-12-01 23:16:34 UTC (rev 688) +++ linux4palm/BFUGarux/garux-clean.c 2006-12-02 00:25:32 UTC (rev 689) @@ -82,7 +82,14 @@ StrNCopy(parameters,KernelDefaultParam,KernelParamLength+1); return; } -static void stopApp() {return;} +static void stopApp() +{ +#ifdef with_BFUSettings + if (saveHandle) + MemHandleFree(saveHandle); +#endif + return; +} static void BFUdoDie(const Char * ErrStr,Err error) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-12-01 23:16:37
|
Revision: 688 http://svn.sourceforge.net/hackndev/?rev=688&view=rev Author: bobofdoom Date: 2006-12-01 15:16:34 -0800 (Fri, 01 Dec 2006) Log Message: ----------- all: Moved AC97_LINK_FRAME to wm9712.h Modified Paths: -------------- linux4palm/linux/trunk/include/sound/wm9712.h Modified: linux4palm/linux/trunk/include/sound/wm9712.h =================================================================== --- linux4palm/linux/trunk/include/sound/wm9712.h 2006-12-01 23:14:57 UTC (rev 687) +++ linux4palm/linux/trunk/include/sound/wm9712.h 2006-12-01 23:16:34 UTC (rev 688) @@ -8,6 +8,7 @@ #define AC97_ADD_FUNC 0x58 /* Additional functions */ +#define AC97_LINK_FRAME 21 /* * WM97xx AC97 Touchscreen registers This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-12-01 23:15:24
|
Revision: 687 http://svn.sourceforge.net/hackndev/?rev=687&view=rev Author: bobofdoom Date: 2006-12-01 15:14:57 -0800 (Fri, 01 Dec 2006) Log Message: ----------- palmtx: WM9712 GPIOs should be configured as outputs not inputs. This was working previously due to an error in the header constants. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-11-29 00:33:59 UTC (rev 686) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmld_ac97.c 2006-12-01 23:14:57 UTC (rev 687) @@ -392,12 +392,12 @@ ac97->bus->ops->write(ac97, AC97_WM97XX_DIGITISER2, d2base); /* enable interrupts on codec's gpio 2 (connected to cpu gpio 27) */ - wm97xx_gpio_mode(WM97XX_GPIO_2, WM97XX_GPIO_IN, WM97XX_GPIO_POL_HIGH, + wm97xx_gpio_mode(WM97XX_GPIO_2, WM97XX_GPIO_OUT, WM97XX_GPIO_POL_HIGH, WM97XX_GPIO_NOTSTICKY, WM97XX_GPIO_NOWAKE); wm97xx_gpio_func(WM97XX_GPIO_2, 0); /* enable pen detect interrupt */ - wm97xx_gpio_mode(WM97XX_GPIO_13, WM97XX_GPIO_IN, WM97XX_GPIO_POL_HIGH, + wm97xx_gpio_mode(WM97XX_GPIO_13, WM97XX_GPIO_OUT, WM97XX_GPIO_POL_HIGH, WM97XX_GPIO_STICKY, WM97XX_GPIO_WAKE); /* turn off irq gpio inverting */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-11-29 00:34:05
|
Revision: 686 http://svn.sourceforge.net/hackndev/?rev=686&view=rev Author: sleep_walker Date: 2006-11-28 16:33:59 -0800 (Tue, 28 Nov 2006) Log Message: ----------- l4p: BFULinuxHelper new feature recognition Modified Paths: -------------- linux4palm/BFUGarux/BFULinuxHelper.c Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-28 20:14:20 UTC (rev 685) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-29 00:33:59 UTC (rev 686) @@ -117,6 +117,10 @@ printf("BFUKeyboard=%ld\n",optint & 1); optint >>=1; printf("BFUReflash=%ld\n",optint &1); + optint >>=1; + printf("BFUFSCK=%ld\n",optint &1); + optint >>=1; + printf("BFUCopy2RAM=%ld\n",optint &1); //if length of options is bigger than 4 chars in hexa, read another chars here... // optint = ReadHexa(4,options+4); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hol...@us...> - 2006-11-28 20:14:24
|
Revision: 685 http://svn.sourceforge.net/hackndev/?rev=685&view=rev Author: holger_bocklet Date: 2006-11-28 12:14:20 -0800 (Tue, 28 Nov 2006) Log Message: ----------- cleanup for t|c touchscreen driver Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c 2006-11-28 19:59:12 UTC (rev 684) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c 2006-11-28 20:14:20 UTC (rev 685) @@ -6,7 +6,7 @@ * Author: Holger Bocklet <bit...@gm...> * * There's noting new under the sun, - * So this peace of software ist derived of + * So this piece of software ist derived of * - the ucb1x00-ts by Russell King, Pavel Machek and * - patches for the ucb1400 by Nicols Pitre and * - the wm97xx-driver by Liam Girdwood @@ -14,36 +14,25 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/init.h> #include <linux/interrupt.h> #include <linux/input.h> #include <linux/jiffies.h> -#include <linux/device.h> -#include <linux/workqueue.h> #include <linux/moduleparam.h> #include <linux/wait.h> #include <asm/delay.h> -#include <asm/system.h> #include <asm/arch/hardware.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/irqs.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> - #include <sound/driver.h> #include <sound/core.h> -#include <sound/initval.h> #include <sound/ac97_codec.h> #include <linux/config.h> -#include <linux/slab.h> #include <linux/errno.h> #include <linux/kthread.h> #include <linux/device.h> -#include <linux/mutex.h> #include "ptc_ucb1400.h" @@ -65,8 +54,6 @@ u16 y; }; -//DECLARE_MUTEX(battery_update_mutex); - // Pen sampling frequency (Hz) while touched. // more is not possible cause jiffies are at 100Hz in mach-pxa (why ???) static int cont_rate = 100; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hol...@us...> - 2006-11-28 19:59:21
|
Revision: 684 http://svn.sourceforge.net/hackndev/?rev=684&view=rev Author: holger_bocklet Date: 2006-11-28 11:59:12 -0800 (Tue, 28 Nov 2006) Log Message: ----------- t|c touchscreen driver and updates for mach-pxa/palmtc Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc_keyboard.c Added Paths: ----------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc-gpio.h linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400.h linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Kconfig 2006-11-28 11:35:37 UTC (rev 683) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Kconfig 2006-11-28 19:59:12 UTC (rev 684) @@ -13,3 +13,11 @@ This driver translates button presses on a Palm Tungsten C to Linux input subsystem events +config PALMTC_UCB1400_TS + tristate "Palm Tungsten C ucb1400 touchscreen support" + depends on MACH_OMAP_PALMTC + default y + help + This driver handles the UCB1400 AC97 codec, + which is used to support the touchscreen + Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Makefile 2006-11-28 11:35:37 UTC (rev 683) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/Makefile 2006-11-28 19:59:12 UTC (rev 684) @@ -4,3 +4,5 @@ obj-$(CONFIG_MACH_OMAP_PALMTC) += palmtc.o obj-$(CONFIG_PALMTC_KEYBOARD) += palmtc_keyboard.o +obj-$(CONFIG_PALMTC_AC97) += palmtc_ac97.o +obj-$(CONFIG_PALMTC_UCB1400_TS) += ptc_ucb1400_ts.o Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc-gpio.h =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc-gpio.h (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc-gpio.h 2006-11-28 19:59:12 UTC (rev 684) @@ -0,0 +1,26 @@ +/* + * palmtc-gpio.h + * + * Authors: Holger Bocklet <bit...@gm...> + * + */ + +#ifndef _PALMTC_GPIO_H_ +#define _PALMTC_GPIO_H_ + +#include <asm/arch/pxa-regs.h> + +/* Palm Tungsten C GPIOs */ +#define GPIO_NR_PALMTC_EARPHONE_DETECT 2 +#define GPIO_NR_PALMLD_USB_DETECT 4 +#define GPIO_NR_PALMLD_POWER_DETECT 5 +#define GPIO_NR_PALMTC_HOTSYNC_BUTTON 7 +#define GPIO_NR_PALMTC_SD_DETECT 12 // low->high wenn out, high->low when inserted +#define GPIO_NR_PALMLD_BL_POWER 16 + +//#define GPIO_NR_PALMLD_STD_RXD 46 /* IRDA */ +//#define GPIO_NR_PALMLD_STD_TXD 47 + +#define IRQ_GPIO_PALMTC_SD_DETECT IRQ_GPIO(GPIO_NR_PALMTC_SD_DETECT) + +#endif /* _PALMTC_GPIO_H_ */ Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c 2006-11-28 11:35:37 UTC (rev 683) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c 2006-11-28 19:59:12 UTC (rev 684) @@ -13,6 +13,7 @@ #include <asm/arch/hardware.h> #include <asm/mach/map.h> #include <asm/domain.h> +#include <asm/arch/mmc.h> #include <linux/device.h> #include <linux/platform_device.h> @@ -23,6 +24,7 @@ #include <asm/arch/pxa-regs.h> #include "../generic.h" +#include "palmtc-gpio.h" #define DEBUG @@ -57,10 +59,57 @@ }; + +static int palmtc_mci_init(struct device *dev, irqreturn_t (*palmtc_detect_int)(int, void *, struct pt_regs *), void *data) +{ + int err; + + /** + * Setup an interrupt for detecting card insert/remove events + */ + set_irq_type(IRQ_GPIO_PALMTC_SD_DETECT, IRQT_BOTHEDGE); + err = request_irq(IRQ_GPIO_PALMTC_SD_DETECT, palmtc_detect_int, + SA_INTERRUPT, "SD/MMC card detect", data); + + if(err) { + printk(KERN_ERR "palmld_mci_init: cannot request SD/MMC card detect IRQ\n"); + return -1; + } + + + printk("palmtc_mci_init: irq registered\n"); + + return 0; +} -static struct platform_device palmtc_audio_device = { +static void palmtc_mci_exit(struct device *dev, void *data) +{ + free_irq(IRQ_GPIO_PALMTC_SD_DETECT, data); +} + +static struct pxamci_platform_data palmtc_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = palmtc_mci_init, + /* .setpower = palmld_mci_setpower, */ + .exit = palmtc_mci_exit, + +}; + + +static pxa2xx_audio_ops_t palmtc_audio_ops = { + /* + .startup = palmld_audio_startup, + .shutdown = mst_audio_shutdown, + .suspend = mst_audio_suspend, + .resume = mst_audio_resume, + */ +}; + + +static struct platform_device palmtc_ac97_device = { .name = "pxa2xx-ac97", .id = -1, + .dev = { .platform_data = &palmtc_audio_ops }, }; static struct platform_device palmtc_keyboard_device = { @@ -70,7 +119,7 @@ static struct platform_device *devices[] __initdata = { - &palmtc_audio_device, + &palmtc_ac97_device, &palmtc_keyboard_device, }; @@ -78,13 +127,18 @@ { set_pxa_fb_info(&palmtclcd); GCR &= ~GCR_PRIRDY_IEN; + + pxa_set_mci_info( &palmtc_mci_platform_data ); + platform_add_devices (devices, ARRAY_SIZE (devices)); + } MACHINE_START(OMAP_PALMTC, "Palm Tungsten C") /* Maintainer: P3T3, Petr Blaha <p3...@ce...> */ - .phys_ram = 0xa0000000, +// .phys_ram = 0xa0000000, .phys_io = 0x40000000, + .boot_params = 0xa0000100, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .map_io = pxa_map_io, .init_irq = pxa_init_irq, Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc_keyboard.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc_keyboard.c 2006-11-28 11:35:37 UTC (rev 683) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc_keyboard.c 2006-11-28 19:59:12 UTC (rev 684) @@ -109,10 +109,10 @@ {KEY_D,KEY_KPPLUS,FALSE,0,"D"}, {KEY_H,KEY_MINUS,SHIFT_BIT|FALSE,0,"H/_"}, {KEY_DOT,KEY_SEMICOLON,SHIFT_BIT|FALSE,0,"./:"} }, -/*22*/ {{KEY_A,KEY_2,SHIFT_BIT|FALSE,0,"A/@"}, +/*22*/ {{KEY_A,KEY_EQUAL,FALSE,0,"A/@"}, // changed to "=" {KEY_C,KEY_0,SHIFT_BIT|FALSE,0,"C/)"}, {KEY_Z,KEY_6,FALSE,0,"de:Z us:Y"}, - {KEY_L,KEY_EQUAL,FALSE,0,"L/\xDF"} }, // Keyoard shows "\xDF" but better use "=" + {KEY_L,KEY_COMMA,SHIFT_BIT|FALSE,0,"L/\xDF"} }, // Keyoard shows "\xDF" but better use "<" /*23*/ {{KEY_Q,KEY_1,FALSE,0,"Q"}, //0 {KEY_F,KEY_KPMINUS,FALSE,0,"F"}, //9 {KEY_N,KEY_COMMA,FALSE,0,"N"}, //10 @@ -128,7 +128,7 @@ /*26*/ {{KEY_S,KEY_APOSTROPHE,SHIFT_BIT|FALSE,0,"S"}, {KEY_V,KEY_3,SHIFT_BIT|FALSE,0,"V/#"}, {KEY_M,KEY_SLASH,SHIFT_BIT|FALSE,0,"M/?"}, - {KEY_BACKSPACE,KEY_GRAVE,SHIFT_BIT|FALSE,0,"bs/~"} }, + {KEY_BACKSPACE,KEY_DOT,SHIFT_BIT|FALSE,0,"bs/>"} }, /*27*/ {{KEY_W,KEY_2,FALSE,0,"W"}, {KEY_G,KEY_KPASTERISK,FALSE,0,"G"}, {KEY_K,KEY_APOSTROPHE,FALSE,0,"K"}, @@ -310,7 +310,7 @@ { int row, col; unsigned long ret; - DBG("Probing device\n" ); + //DBG("Probing device\n" ); keyboard_dev = input_allocate_device(); @@ -346,6 +346,7 @@ SA_SAMPLE_RANDOM,"palmtc-kbd", (void*)col_gpio[col]); set_irq_type(IRQ_GPIO(col_gpio[col]), IRQT_BOTHEDGE); } + DBG("device enabled\n"); return 0; } Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400.h =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400.h (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400.h 2006-11-28 19:59:12 UTC (rev 684) @@ -0,0 +1,153 @@ +/* + * linux/drivers/mfd/ucb1400.h + * + * Copyright (C) 2001 Russell King, All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License. + */ + +/* ucb1400 aclink register mappings: */ + +#define UCB_IO_DATA 0x5a +#define UCB_IO_DIR 0x5c +#define UCB_IE_RIS 0x5e +#define UCB_IE_FAL 0x60 +#define UCB_IE_STATUS 0x62 +#define UCB_IE_CLEAR 0x62 +#define UCB_TS_CR 0x64 +#define UCB_ADC_CR 0x66 +#define UCB_ADC_DATA 0x68 +#define UCB_CSR1 0x6a +#define UCB_CSR2 0x6c + +#define UCB_CS_GPIO_AC97_INT (1 << 2) + +#define UCB_ADC_DAT(x) ((x) & 0x3ff) + +#define UCB_IO_0 (1 << 0) +#define UCB_IO_1 (1 << 1) +#define UCB_IO_2 (1 << 2) +#define UCB_IO_3 (1 << 3) +#define UCB_IO_4 (1 << 4) +#define UCB_IO_5 (1 << 5) +#define UCB_IO_6 (1 << 6) +#define UCB_IO_7 (1 << 7) +#define UCB_IO_8 (1 << 8) +#define UCB_IO_9 (1 << 9) + +#define UCB_IE_ADC (1 << 11) +#define UCB_IE_TSPX (1 << 12) +#define UCB_IE_TSMX (1 << 13) +#define UCB_IE_TCLIP (1 << 14) +#define UCB_IE_ACLIP (1 << 15) + +#define UCB_TC_B_VOICE_ENA (1 << 3) +#define UCB_TC_B_CLIP (1 << 4) +#define UCB_TC_B_ATT (1 << 6) +#define UCB_TC_B_SIDE_ENA (1 << 11) +#define UCB_TC_B_MUTE (1 << 13) +#define UCB_TC_B_IN_ENA (1 << 14) +#define UCB_TC_B_OUT_ENA (1 << 15) + +#define UCB_AC_B_LOOP (1 << 8) +#define UCB_AC_B_MUTE (1 << 13) +#define UCB_AC_B_IN_ENA (1 << 14) +#define UCB_AC_B_OUT_ENA (1 << 15) + +#define UCB_TS_CR_TSMX_POW (1 << 0) +#define UCB_TS_CR_TSPX_POW (1 << 1) +#define UCB_TS_CR_TSMY_POW (1 << 2) +#define UCB_TS_CR_TSPY_POW (1 << 3) +#define UCB_TS_CR_TSMX_GND (1 << 4) +#define UCB_TS_CR_TSPX_GND (1 << 5) +#define UCB_TS_CR_TSMY_GND (1 << 6) +#define UCB_TS_CR_TSPY_GND (1 << 7) +#define UCB_TS_CR_MODE_INT (0 << 8) +#define UCB_TS_CR_MODE_PRES (1 << 8) +#define UCB_TS_CR_MODE_POS (2 << 8) +#define UCB_TS_CR_BIAS_ENA (1 << 11) +#define UCB_TS_CR_TSPX (1 << 12) +#define UCB_TS_CR_TSMX (1 << 13) + +#define UCB_ADC_SYNC_ENA (1 << 0) +#define UCB_ADC_VREFBYP_CON (1 << 1) +#define UCB_ADC_INP_TSPX (0 << 2) +#define UCB_ADC_INP_TSMX (1 << 2) +#define UCB_ADC_INP_TSPY (2 << 2) +#define UCB_ADC_INP_TSMY (3 << 2) +#define UCB_ADC_INP_AD0 (4 << 2) +#define UCB_ADC_INP_AD1 (5 << 2) +#define UCB_ADC_INP_AD2 (6 << 2) +#define UCB_ADC_INP_AD3 (7 << 2) +#define UCB_ADC_EXT_REF (1 << 5) +#define UCB_ADC_START (1 << 7) +#define UCB_ADC_ENA (1 << 15) + +#define UCB_ADC_DATA_MASK 0x3ff +#define UCB_ADC_DATA_VALID (1 << 15) + +#define UCB_ID_1400 0x4304 + +#define UCB_MODE 0x0d +#define UCB_MODE_DYN_VFLAG_ENA (1 << 12) +#define UCB_MODE_AUD_OFF_CAN (1 << 13) + +#define UCB_NOSYNC 0 +#define UCB_SYNC 1 + +#define UCB_RISING (1 << 0) +#define UCB_FALLING (1 << 1) + +#define UCB_TS_X_MIN 110 +#define UCB_TS_X_MAX 860 +#define UCB_TS_Y_MIN 280 +#define UCB_TS_Y_MAX 960 +#define UCB_TS_PRESSURE_MIN 0 +#define UCB_TS_PRESSURE_MAX 740 + + +struct ucb1400_ts { + struct device *dev; + ac97_t *ac97; + struct input_dev *idev; + //spinlock_t lock; + //unsigned int irq; + struct task_struct *thread; + //struct completion irq_wait; + wait_queue_head_t pen_irq_wait; /* Pen IRQ wait queue */ + //struct semaphore ucb_ts_sem; + //u16 id; + //u8 pen_is_down; + int irq_in_work; + //struct ucb1400_ts_irq irq_handler; + struct completion thr_init; + struct completion thr_exit; + u8 last_status; + //unsigned int adcsync:UCB_NOSYNC; +}; + + +//#define classdev_to_ucb1400(cd) container_of(cd, struct ucb1400, cdev) + +//int ucb1400_register_driver(struct ucb1400_driver *); +//void ucb1400_unregister_driver(struct ucb1400_driver *); + + +//void ucb1400_io_set_dir(struct ucb1400 *ucb, unsigned int, unsigned int); +//void ucb1400_io_write(struct ucb1400 *ucb, unsigned int, unsigned int); +//unsigned int ucb1400_io_read(struct ucb1400 *ucb); + +//unsigned int ucb1400_adc_read(struct ucb1400 *ucb, int adc_channel, int sync); +//void ucb1400_adc_enable(struct ucb1400 *ucb); +//void ucb1400_adc_disable(struct ucb1400 *ucb); + +/* + * Which edges of the IRQ do you want to control today? + */ + +//int ucb1400_hook_irq(struct ucb1400 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid); +//void ucb1400_enable_irq(struct ucb1400 *ucb, unsigned int idx, int edges); +//void ucb1400_disable_irq(struct ucb1400 *ucb, unsigned int idx, int edges); +//int ucb1400_free_irq(struct ucb1400 *ucb, unsigned int idx, void *devid); Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c 2006-11-28 19:59:12 UTC (rev 684) @@ -0,0 +1,569 @@ +/* + * linux/arch/arm/mach-pxa/palmtc/ptc_ucb1400_ts.c + * + * Touchscreendriver for Palm Tungsten C AC97 codec ucb1400 + * + * Author: Holger Bocklet <bit...@gm...> + * + * There's noting new under the sun, + * So this peace of software ist derived of + * - the ucb1x00-ts by Russell King, Pavel Machek and + * - patches for the ucb1400 by Nicols Pitre and + * - the wm97xx-driver by Liam Girdwood + */ + +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/input.h> +#include <linux/jiffies.h> +#include <linux/device.h> +#include <linux/workqueue.h> +#include <linux/moduleparam.h> +#include <linux/wait.h> + +#include <asm/delay.h> +#include <asm/system.h> +#include <asm/arch/hardware.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> + +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +#include <sound/driver.h> +#include <sound/core.h> +#include <sound/initval.h> +#include <sound/ac97_codec.h> + +#include <linux/config.h> +#include <linux/slab.h> +#include <linux/errno.h> +#include <linux/kthread.h> +#include <linux/device.h> +#include <linux/mutex.h> + +#include "ptc_ucb1400.h" + +#define PALMTC_TS_DEBUG + +#ifdef PALMTC_TS_DEBUG +#define DBG(x...) \ + printk(KERN_INFO "PTC_TS: " x) +#else +#define DBG(x...) do { } while (0) +#endif + +#define TRUE 1 +#define FALSE 0 + +struct ts_reading { + u16 p; + u16 x; + u16 y; +}; + +//DECLARE_MUTEX(battery_update_mutex); + +// Pen sampling frequency (Hz) while touched. +// more is not possible cause jiffies are at 100Hz in mach-pxa (why ???) +static int cont_rate = 100; +module_param(cont_rate, int, 0); +MODULE_PARM_DESC(cont_rate, "Sampling rate while pen down (Hz). Not more than ~100Hz on T|C"); + +/* codec AC97 IO access */ +int ucb1400_reg_read(struct ucb1400_ts *ucb_ts, u16 reg) +{ + if (ucb_ts->ac97) + return ucb_ts->ac97->bus->ops->read(ucb_ts->ac97, reg); + else + return -1; +} + +void ucb1400_reg_write(struct ucb1400_ts *ucb_ts, u16 reg, u16 val) +{ + if (ucb_ts->ac97) + ucb_ts->ac97->bus->ops->write(ucb_ts->ac97, reg, val); +} + +/** + * ucb1x00_adc_enable - enable the ADC converter + * @ucb: UCB1x00 structure describing chip + * + * Enable the ucb1x00 and ADC converter on the UCB1x00 for use. + * Any code wishing to use the ADC converter must call this + * function prior to using it. + * FIXME: this (see below) will be later + * This function takes the ADC semaphore to prevent two or more + * concurrent uses, and therefore may sleep. As a result, it + * can only be called from process context, not interrupt + * context. + * + * You should release the ADC as soon as possible using + * ucb1x00_adc_disable. + */ +void ucb1400_adc_enable(struct ucb1400_ts *ucb_ts) +{ + //down(&ucb->adc_sem); + ucb1400_reg_write(ucb_ts, UCB_ADC_CR, UCB_ADC_ENA); +} + + +/** + * ucb1x00_adc_disable - disable the ADC converter + * @ucb: UCB1x00 structure describing chip + * + * Disable the ADC converter and release the ADC semaphore. + */ +void ucb1400_adc_disable(struct ucb1400_ts *ucb_ts) +{ + u16 val=0; + val &= ~UCB_ADC_ENA; + ucb1400_reg_write(ucb_ts, UCB_ADC_CR, val); + //up(&ucb->adc_sem); +} + + +/** + * ucb1x00_adc_read - read the specified ADC channel + * @ucb: UCB1x00 structure describing chip + * @adc_channel: ADC channel mask + * @sync: wait for syncronisation pulse. + * + * Start an ADC conversion and wait for the result. + * This function currently sleeps waiting for the conversion to + * complete (2 frames max without sync). + */ +unsigned int ucb1400_adc_read(struct ucb1400_ts *ucb_ts, int adc_channel) +{ + unsigned int val; + + adc_channel |= UCB_ADC_ENA; + + ucb1400_reg_write(ucb_ts, UCB_ADC_CR, adc_channel); + ucb1400_reg_write(ucb_ts, UCB_ADC_CR, adc_channel | UCB_ADC_START); + + for (;;) { // TODO: use interrupt mode + val = ucb1400_reg_read(ucb_ts, UCB_ADC_DATA); + if (val & UCB_ADC_DATA_VALID) + break; + /* yield to other processes */ + set_current_state(TASK_INTERRUPTIBLE); //without sync its ~ 22 usec = 1 jiffie ???? + schedule_timeout(3); // try 1 + } + + if (val & UCB_ADC_DATA_VALID) { + return val & UCB_ADC_DATA_MASK; + } else { + return 0; + } +} + + +static inline void ucb1400_ts_report_event(struct ucb1400_ts *ucb_ts, struct ts_reading ts) +{ + input_report_abs(ucb_ts->idev, ABS_X, ts.x); + input_report_abs(ucb_ts->idev, ABS_Y, ts.y); + input_report_abs(ucb_ts->idev, ABS_PRESSURE, ts.p); + input_sync(ucb_ts->idev); +} + + +static inline void ucb1400_ts_event_pen_up(struct ucb1400_ts *ucb_ts) +{ + input_report_abs(ucb_ts->idev, ABS_PRESSURE, 0); + input_sync(ucb_ts->idev); +} + + +/* + * Switch touchscreen to given interrupt mode. +* param = UCB_IE_RIS || UCB_IE_FAL switch ts-mod to int on edge in param +* param != 0 leave edge as it is +* param == 0 switch ts - int off + */ +static inline void ucb1400_ts_mode_int(struct ucb1400_ts *ucb_ts, u16 param) +{ + u16 val; + + // clear remaining ints + val=ucb1400_reg_read(ucb_ts, UCB_IE_STATUS); + ucb1400_reg_write(ucb_ts, UCB_IE_CLEAR, val); + + if (param==0) { // switch off int + val=ucb1400_reg_read(ucb_ts, UCB_IE_FAL); + + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND ); + + val=ucb1400_reg_read(ucb_ts, UCB_IE_FAL); // edge-detection off + ucb1400_reg_write(ucb_ts, UCB_IE_FAL, val & (~UCB_IE_TSPX) & (~UCB_IE_TSMX)); + val=ucb1400_reg_read(ucb_ts, UCB_IE_FAL); + //DBG("ucb1400_intmode_OFF: 0x%x\n",val); + ucb1400_reg_write(ucb_ts, UCB_IE_RIS, val & (~UCB_IE_TSPX) & (~UCB_IE_TSMX)); + + } else { + + switch(param) { + case (UCB_IE_RIS): + val=ucb1400_reg_read(ucb_ts, UCB_IE_RIS); + ucb1400_reg_write(ucb_ts, UCB_IE_RIS, val | UCB_IE_TSPX); + val=ucb1400_reg_read(ucb_ts, UCB_IE_FAL); + ucb1400_reg_write(ucb_ts, UCB_IE_FAL, val & (~UCB_IE_TSPX) ); + //DBG(" ucb1400_intmode_Ris\n"); + break; + case (UCB_IE_FAL): + val=ucb1400_reg_read(ucb_ts, UCB_IE_FAL); + ucb1400_reg_write(ucb_ts, UCB_IE_FAL, val | UCB_IE_TSPX); + val=ucb1400_reg_read(ucb_ts, UCB_IE_RIS); + ucb1400_reg_write(ucb_ts, UCB_IE_RIS, val & (~UCB_IE_TSPX) ); + //DBG(" ucb1400_intmode_Fal\n"); + break; + } + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND | + UCB_TS_CR_MODE_INT); + } +} + + +/* + * Switch to pressure mode, and read pressure. We don't need to wait + * here, since both plates are being driven. + */ +static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400_ts *ucb_ts) +{ + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND | + UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); + //udelay(55); + + return ucb1400_adc_read(ucb_ts, UCB_ADC_INP_TSPY); +} + +/* + * Switch to X position mode and measure Y plate. We switch the plate + * configuration in pressure mode, then switch to position mode. This + * gives a faster response time. Even so, we need to wait about 55us + * for things to stabilise. + */ +static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400_ts *ucb_ts) +{ + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); + + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW | + UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); + + udelay(55); + + return ucb1400_adc_read(ucb_ts, UCB_ADC_INP_TSPY); +} + +/* + * Switch to Y position mode and measure X plate. We switch the plate + * configuration in pressure mode, then switch to position mode. This + * gives a faster response time. Even so, we need to wait about 55us + * for things to stabilise. + */ +static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400_ts *ucb_ts) +{ + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | + UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | + UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA); + + ucb1400_reg_write(ucb_ts, UCB_TS_CR, + UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW | + UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA); + + udelay(55); + + return ucb1400_adc_read(ucb_ts, UCB_ADC_INP_TSPX); +} + + +static inline int ucb1400_ts_pen_is_down(struct ucb1400_ts *ucb_ts) +{ + u16 val; + + val = ucb1400_reg_read(ucb_ts, UCB_TS_CR); + if (((val & UCB_TS_CR_TSPX) == 0) || ((val & UCB_TS_CR_TSMX) ==0 )) { + return TRUE; + } else { + return FALSE; + } +} + + +static void ucb1400_ts_take_reading(struct ucb1400_ts *ucb_ts, struct ts_reading *ts) +{ + ucb1400_adc_enable(ucb_ts); + + ts->x = ucb1400_ts_read_xpos(ucb_ts); + ts->y = ucb1400_ts_read_ypos(ucb_ts); + ts->p = ucb1400_ts_read_pressure(ucb_ts); + + ucb1400_adc_disable(ucb_ts); +} + +// ISR for ac97, shared with pxa2xx-ac97, and later with ucb1400-gpio and ucb1400-adc +static irqreturn_t ucb1400_ts_irq(int irqnr, void *devid, struct pt_regs *regs) +{ + u32 status; + + struct ucb1400_ts *ucb_ts = (struct ucb1400_ts *) devid; + + status=GSR; + if (status & GSR_GSCI) { + GSR&=GSR_GSCI; + if (!(ucb_ts->irq_in_work)) { + //as we get all ac97-interrupts (they are shared), we can't turn them off + // we have to ignore them until slow-handler-thread (below) is thru + + ucb_ts->irq_in_work=TRUE; // FIXME this should be atomic, is it anyway??? + // we might miss an interrupt syncing with kthread this way if ints are comming quickly + // but its not a problem, we only need the last readout anyway + // and if we miss pen-up, we will test for pen-status anyway in kthread + wake_up_interruptible(&ucb_ts->pen_irq_wait); + } + return IRQ_HANDLED; + } else { + return IRQ_NONE; + } +} + +/* +* The touchscreen reader thread. +*/ +static int ucb1400_ts_read_thread(void *data) +{ + unsigned long sleep_time; + u16 val; + int pen_was_down=FALSE; + unsigned long tstamp; // timestamp (jiffies) + struct ts_reading ts_values; + struct ucb1400_ts *ucb_ts = (struct ucb1400_ts *) data; + + /* set up thread context */ + ucb_ts->thread = current; + + daemonize("kucb1400d"); + + if (ucb_ts->ac97 == NULL) { + ucb_ts->thread = NULL; + printk(KERN_ERR "ac97-codec is NULL in read-thread, bailing out\n"); + } + + ucb_ts->irq_in_work=FALSE; + // read-rate in hertz => sleeptime in jiffies + sleep_time = msecs_to_jiffies(1000/cont_rate); + + ucb1400_ts_mode_int(ucb_ts, 0); + ucb1400_ts_mode_int(ucb_ts, UCB_IE_FAL); + complete(&ucb_ts->thr_init); + + /* touch reader loop */ + while (ucb_ts->thread) { + ucb_ts->irq_in_work = FALSE; + wait_event_interruptible( ucb_ts->pen_irq_wait, ucb_ts->irq_in_work); + // check if its our int + val=ucb1400_reg_read(ucb_ts, UCB_IE_STATUS); + if (val & UCB_IE_TSPX) { + do { + ucb1400_ts_mode_int(ucb_ts, 0); // int off / clear int + ucb1400_ts_take_reading(ucb_ts, &ts_values); + ucb1400_ts_mode_int(ucb_ts, UCB_IE_RIS); //int on rising edge=wait for penup + ucb1400_ts_report_event(ucb_ts, ts_values); + pen_was_down=TRUE; + //DBG("ucb1400_kthread x: %d y: %d p: %d, j:%lu\n",ts_values.x,ts_values.y,ts_values.p,jiffies); + + ucb_ts->irq_in_work=FALSE; + tstamp=jiffies; + // This marco needs a TRUE condition to return, Timeout alone without TRUE does NOT return, + // so make up a TRUE when timeout. A bit bloated though .... + wait_event_interruptible_timeout( ucb_ts->pen_irq_wait, (ucb_ts->irq_in_work) || + (((unsigned long)((long)jiffies - (long)tstamp)) >= sleep_time) , sleep_time); + } while(! ucb_ts->irq_in_work); + + ucb1400_ts_mode_int(ucb_ts, UCB_IE_FAL); //int on falling edge=wait for pendwon + if (pen_was_down) { + ucb1400_ts_event_pen_up(ucb_ts); // do pen-up for input + pen_was_down=FALSE; + } else { + printk(KERN_ERR "Unexpected Programmer Failure: Pendown-IRQ without pendown ???\n"); + } + } + try_to_freeze(); + } + complete_and_exit(&ucb_ts->thr_exit, 0); +} + +static int __init ptc_ucb1400_ts_probe(struct device *dev) +{ + u16 val; + int err; + struct ucb1400_ts *ucb_ts; + int ret = -ENODEV; + + ucb_ts = kmalloc(sizeof(struct ucb1400_ts), GFP_KERNEL); + if (!ucb_ts) { + printk(KERN_ERR "Cant allocate memory for device struct\n"); + ret=-ENOMEM; + goto errout; + } + memset(ucb_ts, 0, sizeof(struct ucb1400_ts)); + ucb_ts->ac97 = to_ac97_t(dev); + dev->driver_data = ucb_ts; + val = ucb1400_reg_read(ucb_ts, AC97_VENDOR_ID2); + if (val != UCB_ID_1400) { + printk(KERN_ERR "no ucb1400 Chip ID (%04x) found: %04x\n",UCB_ID_1400, val); + ret=-ENODEV; + goto rollback1; + } + + printk(KERN_INFO "detected a ucb1400 codec on the ac97-bus, enabling touchscreen-driver"); + + /* setup the input device */ + ucb_ts->idev = input_allocate_device(); + if (ucb_ts->idev==NULL) { + printk(KERN_ERR "cannot allocate input-device for ucb1400-touchscreen\n"); + ret= -ENOMEM; + goto rollback1; + } + + ucb_ts->idev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); + ucb_ts->idev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); + input_set_abs_params(ucb_ts->idev, ABS_X, UCB_TS_X_MIN, UCB_TS_X_MAX, 0, 0); + input_set_abs_params(ucb_ts->idev, ABS_Y, UCB_TS_Y_MIN, UCB_TS_Y_MAX, 0, 0); + input_set_abs_params(ucb_ts->idev, ABS_PRESSURE, UCB_TS_PRESSURE_MIN, UCB_TS_PRESSURE_MAX, 1, 1); + + ucb_ts->idev->name = "Palm Tungsten C touchscreen (ucb1400)"; + ucb_ts->idev->dev = dev; + input_register_device(ucb_ts->idev); + + // clear ucb1400-ints if there are + val=ucb1400_reg_read(ucb_ts, UCB_IE_STATUS); + ucb1400_reg_write(ucb_ts, UCB_IE_CLEAR, val); + + // start reader-thread + init_completion(&ucb_ts->thr_init); + init_completion(&ucb_ts->thr_exit); + init_waitqueue_head(&ucb_ts->pen_irq_wait); + ucb1400_ts_mode_int(ucb_ts, 0); + ret = kernel_thread(ucb1400_ts_read_thread, ucb_ts, CLONE_KERNEL); + if (ret > 0) { + wait_for_completion(&ucb_ts->thr_init); + if (ucb_ts->thread == NULL) { + printk(KERN_ERR "cannot start kernel-thread for ucb1400-touchscreen\n"); + ret=-EINVAL; + goto rollback2; + } + } + + // get our share of AC97-Bus interrupt + err = request_irq(IRQ_AC97, ucb1400_ts_irq, SA_SHIRQ, "ucb1400-ts", ucb_ts); + if (err) { + printk(KERN_ERR "ucb1400: IRQ request failed\n"); + ret=-ENODEV; + goto rollback3; + } + + ucb_ts->last_status=0; + val= ucb1400_reg_read(ucb_ts, UCB_CSR1); // remeber old int-status and set ints to ON + if (val & UCB_CS_GPIO_AC97_INT) { + ucb_ts->last_status&=UCB_CS_GPIO_AC97_INT; + } else { + ucb1400_reg_write(ucb_ts, UCB_CSR1, UCB_CS_GPIO_AC97_INT); // enable "gpio"-interrupt on ucb1400 + } + val=GCR; + if (val & GCR_GIE) { + ucb_ts->last_status&=GCR_GIE; + } else { + GCR|=GCR_GIE; // enable "gpio"-interrupt on pxa-ac97 + } + + //DBG("ucb1400_probe done\n"); + return 0; + +rollback3: + if (ucb_ts->thread) { + ucb_ts->thread = NULL; + ucb_ts->irq_in_work = TRUE; + wake_up_interruptible(&ucb_ts->pen_irq_wait); + wait_for_completion(&ucb_ts->thr_exit); + } +rollback2: + input_unregister_device(ucb_ts->idev); +rollback1: + kfree(ucb_ts); +errout: + return ret; +} + +static int ptc_ucb1400_ts_remove(struct device *dev) +{ + struct ucb1400_ts *ucb_ts = dev_get_drvdata(dev); + + // disable "GPIO"-int in pxa-ac97 if we found it disabled + if ((ucb_ts->last_status & GCR_GIE) == 0) + GCR&=~GCR_GIE; + if ((ucb_ts->last_status & UCB_CS_GPIO_AC97_INT) == 0) + ucb1400_reg_write(ucb_ts, UCB_CSR1, UCB_CS_GPIO_AC97_INT); + + ucb1400_ts_mode_int(ucb_ts, 0); + + //stop kthread + if (ucb_ts->thread) { + ucb_ts->thread = NULL; + ucb_ts->irq_in_work = TRUE; + wake_up_interruptible(&ucb_ts->pen_irq_wait); + wait_for_completion(&ucb_ts->thr_exit); + } + + input_unregister_device(ucb_ts->idev); + free_irq(IRQ_AC97, ucb_ts); + kfree(ucb_ts); + return 0; +} + +static struct device_driver ptc_ucb1400_ts_driver = { + .name = "ucb1400-ts", + .bus = &ac97_bus_type, + .probe = ptc_ucb1400_ts_probe, + .remove = ptc_ucb1400_ts_remove, +#ifdef CONFIG_PM + .suspend = NULL, //FIXME do resume and suspend + .resume = NULL, +#endif +}; + +static int __init ptc_ucb1400_ts_init(void) +{ + + return driver_register(&ptc_ucb1400_ts_driver); +} + +static void ptc_ucb1400_ts_exit(void) +{ + driver_unregister(&ptc_ucb1400_ts_driver); +} + +module_init(ptc_ucb1400_ts_init); +module_exit(ptc_ucb1400_ts_exit); + +MODULE_AUTHOR ("Holger Bocklet <bit...@gm...>"); +MODULE_DESCRIPTION ("UCB1400 touchscreen support for Palm Tungsten C"); +MODULE_LICENSE ("GPL"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-11-28 11:35:46
|
Revision: 683 http://svn.sourceforge.net/hackndev/?rev=683&view=rev Author: sleep_walker Date: 2006-11-28 03:35:37 -0800 (Tue, 28 Nov 2006) Log Message: ----------- l4p: BFUGarux - new features added, actualised comments, new form, new bugs Modified Paths: -------------- linux4palm/BFUGarux/BFUDefaultSettings.h linux4palm/BFUGarux/BFULinuxHelper.c linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/BFUSettings.Rsrc linux4palm/BFUGarux/BFUSettings.Rsrc.h linux4palm/BFUGarux/garux-clean.c Modified: linux4palm/BFUGarux/BFUDefaultSettings.h =================================================================== --- linux4palm/BFUGarux/BFUDefaultSettings.h 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/BFUDefaultSettings.h 2006-11-28 11:35:37 UTC (rev 683) @@ -11,7 +11,9 @@ #define BFUDefaultSave2Card 1 #define BFUDefaultFileName "BFUSavedSettings" #define BFUDefaultFileNameOnCard "/BFUSavedSettings.pdb" +#define BFUDefaultFileNameSize 256 + #define BFUDefaultSource 0 #define BFUDefaultAddress "/linux2ram" #define BFUDefaultFS 0 @@ -43,6 +45,8 @@ #define BFUDefaultReflash 0 #define BFUDefaultRAMdiskSize "20%" +#define BFUDefaultFSCK 0 +#define BFUDefaultCopy2RAM 0 #define BFUDelimiter ';' Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-28 11:35:37 UTC (rev 683) @@ -120,11 +120,10 @@ //if length of options is bigger than 4 chars in hexa, read another chars here... // optint = ReadHexa(4,options+4); - + ptr = end+1; //IP adresses if (useNet) { - ptr = end+1; for (i = 0; i < 4; ++i) { IP[i] = ReadHexa(2,ptr); Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-28 11:35:37 UTC (rev 683) @@ -31,6 +31,8 @@ UInt8 cardRO; UInt8 keyboard; UInt8 reflash; + UInt8 fsck; + UInt8 copy2ram; Char RAMdiskSize[BFURAMdiskMaxLength]; UInt8 save2card; @@ -45,6 +47,7 @@ static void BFUGlobalFormInit (FormPtr pForm); static void BFUNetFormInit (FormPtr pForm); static void BFUModulesFormInit (FormPtr pForm); +static void BFUToolsFormInit (FormPtr pForm); static void BFUAdvancedFormInit (FormPtr pForm); static void BFUOKButtonPressed(); static void BFUSaveButtonPressed(); @@ -53,15 +56,18 @@ static void BFUNetFormSaveFields(FormType *pForm); static void BFUGlobalFormSaveFields(FormType *pForm); static void BFUModulesFormSaveFields(FormType *pForm); +static void BFUToolsFormSaveFields(FormType *pForm); static void BFUAdvancedFormSaveFields(FormType *pForm); static Boolean BFUSettingsInit(); static void BFUInitSettingsFromDef(); static Boolean BFUGlobalFormEventHandler (EventPtr pEvent); static Boolean BFUNetFormEventHandler (EventPtr pEvent); static Boolean BFUModulesFormEventHandler (EventPtr pEvent); +static Boolean BFUToolsFormEventHandler (EventPtr pEvent); static Boolean BFUAdvancedFormEventHandler (EventPtr pEvent); static void BFUSetFieldText(FormType *pForm,UInt32 index,Char *new_text,UInt32 MaxLength); + Char BFUCommandLinePart[BFUCommandLinePartLength]; Boolean BFUPrefsFound; BFUSettingsType BFUSettingsValues; @@ -92,15 +98,19 @@ dest->PalmIP[i] = source->PalmIP[i]; dest->mask[i] = source->mask[i]; } -//advanced settings +//advanced settings & tools dest->debug = source->debug; dest->silentBoot = source->silentBoot; dest->CPUspeed = source->CPUspeed; dest->cardRO = source->cardRO; dest->keyboard = source ->keyboard; + StrNCopy(dest->RAMdiskSize,source->RAMdiskSize,BFURAMdiskMaxLength); + dest->save2card = source->save2card; - dest->reflash = source->reflash; + dest->reflash = source->reflash; + dest->copy2ram = source->copy2ram; + dest->fsck = source->fsck; return true; } @@ -141,7 +151,10 @@ #endif del[0] = BFUDelimiter; del[1] = '\0'; - + options |= BFUSettingsValues.copy2ram; + options <<= 1; + options |= BFUSettingsValues.fsck; + options <<= 1; options |= BFUSettingsValues.reflash; options = options << 1; options |= BFUSettingsValues.keyboard; @@ -181,6 +194,8 @@ 10 cardRO 11 keyboard 12 reflash +13 fsck +14 copy2ram */ // StrCopy(BFUCommandLinePart,) // BFUdoDie("Creating address and/or device string",0); @@ -320,6 +335,8 @@ StrNCopy(BFUSettingsValues.RAMdiskSize,BFUDefaultRAMdiskSize,BFURAMdiskMaxLength); BFUSettingsValues.save2card = BFUDefaultSave2Card; BFUSettingsValues.reflash = BFUDefaultReflash; + BFUSettingsValues.copy2ram = BFUDefaultCopy2RAM; + BFUSettingsValues.fsck = 0; } @@ -702,21 +719,103 @@ case BFUSave2CardBox: BFUSettingsValues.save2card = CtlGetValue(getObjectPtr(pForm,BFUSave2CardBox)); break; - case BFUSilentBootBox: - BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUSilentBootBox)); - break; + + case BFUCardReadonlyBox: BFUSettingsValues.cardRO = CtlGetValue(getObjectPtr(pForm,BFUCardReadonlyBox)); break; case BFUDebugModeBox: BFUSettingsValues.debug = CtlGetValue(getObjectPtr(pForm,BFUDebugModeBox)); break; + case BFUCopy2RAMBox: + BFUSettingsValues.copy2ram = CtlGetValue(getObjectPtr(pForm,BFUCopy2RAMBox)); + break; + + } + break; + case popSelectEvent: + switch(pEvent->data.popSelect.controlID) + { + case BFUPartTrigger: + switch(pEvent->data.popSelect.selection) + { + case 0: + FrmGotoForm(BFUGlobalForm); + break; + case 1: + FrmGotoForm(BFUNetForm); + break; + case 2: + FrmGotoForm(BFUModulesForm); + break; + case 3: + FrmGotoForm(BFUToolsForm); + break; + case 4: + break; + } + handled = true; + break; + case BFUCPUSpeedTrigger: + BFUSettingsValues.CPUspeed = pEvent->data.popSelect.selection; + break; + } +// *** ADD EVENT HANDLING HERE *** // + default: + break; + } + return handled; +} + + +Boolean BFUToolsFormEventHandler(EventPtr pEvent) +{ + Boolean handled = false; + FormPtr pForm = FrmGetActiveForm(); + switch (pEvent->eType) + { + case frmOpenEvent: // Form's 1st event + FrmDrawForm(pForm); + BFUToolsFormInit(pForm); + handled = true; + break; + case frmCloseEvent: + BFUToolsFormSaveFields(pForm); + break; + case ctlSelectEvent: + switch (pEvent->data.ctlSelect.controlID) + { + case BFUOKButton: + BFUToolsFormSaveFields(pForm); + BFUOKButtonPressed(); + handled = true; + break; + case BFUSaveButton: + BFUToolsFormSaveFields(pForm); + BFUSaveButtonPressed(); + handled = true; + break; + case BFUCancelButton: + BFUCancelButtonPressed(); + handled = true; + break; + case BFUSave2CardBox: + BFUSettingsValues.save2card = CtlGetValue(getObjectPtr(pForm,BFUSave2CardBox)); + break; + + + case BFUSilentBootBox: + BFUSettingsValues.silentBoot = CtlGetValue(getObjectPtr(pForm,BFUSilentBootBox)); + break; case BFUKeyboardSupportBox: BFUSettingsValues.keyboard = CtlGetValue(getObjectPtr(pForm,BFUKeyboardSupportBox)); break; case BFUReflashBox: BFUSettingsValues.reflash = CtlGetValue(getObjectPtr(pForm,BFUReflashBox)); break; + case BFURunFSCKBox: + BFUSettingsValues.fsck = CtlGetValue(getObjectPtr(pForm,BFURunFSCKBox)); + break; } break; case popSelectEvent: @@ -736,11 +835,13 @@ break; case 3: break; + case 4: + FrmGotoForm(BFUAdvancedForm); + break; } handled = true; break; - case BFUCPUSpeedTrigger: - BFUSettingsValues.CPUspeed = pEvent->data.popSelect.selection; + default: break; } // *** ADD EVENT HANDLING HERE *** // @@ -802,6 +903,9 @@ case 2: break; case 3: + FrmGotoForm(BFUToolsForm); + break; + case 4: FrmGotoForm(BFUAdvancedForm); break; } @@ -869,6 +973,9 @@ FrmGotoForm(BFUModulesForm); break; case 3: + FrmGotoForm(BFUToolsForm); + break; + case 4: FrmGotoForm(BFUAdvancedForm); break; } @@ -935,6 +1042,9 @@ FrmGotoForm(BFUModulesForm); break; case 3: + FrmGotoForm(BFUToolsForm); + break; + case 4: FrmGotoForm(BFUAdvancedForm); break; } @@ -1024,15 +1134,25 @@ CtlSetValue(getObjectPtr(pForm,BFUSave2CardBox),BFUSettingsValues.save2card); } +static void BFUToolsFormInit (FormPtr pForm) +{ + CtlSetValue(getObjectPtr(pForm,BFUSave2CardBox),BFUSettingsValues.save2card); + + CtlSetValue(getObjectPtr(pForm,BFUSilentBootBox),BFUSettingsValues.silentBoot); + CtlSetValue(getObjectPtr(pForm,BFUKeyboardSupportBox),BFUSettingsValues.keyboard); + CtlSetValue(getObjectPtr(pForm,BFUReflashBox),BFUSettingsValues.reflash); + CtlSetValue(getObjectPtr(pForm,BFURunFSCKBox),BFUSettingsValues.fsck); + +} + + static void BFUAdvancedFormInit (FormPtr pForm) { CtlSetValue(getObjectPtr(pForm,BFUSave2CardBox),BFUSettingsValues.save2card); BFUSetTriggerState(pForm,BFUCPUSpeedTrigger,BFUCPUSpeedList,BFUSettingsValues.CPUspeed); - CtlSetValue(getObjectPtr(pForm,BFUSilentBootBox),BFUSettingsValues.silentBoot); CtlSetValue(getObjectPtr(pForm,BFUCardReadonlyBox),BFUSettingsValues.cardRO); CtlSetValue(getObjectPtr(pForm,BFUDebugModeBox),BFUSettingsValues.debug); - CtlSetValue(getObjectPtr(pForm,BFUKeyboardSupportBox),BFUSettingsValues.keyboard); - CtlSetValue(getObjectPtr(pForm,BFUReflashBox),BFUSettingsValues.reflash); + CtlSetValue(getObjectPtr(pForm,BFUCopy2RAMBox),BFUSettingsValues.copy2ram); BFUSetFieldText(pForm,BFURAMdiskSizeField,BFUSettingsValues.RAMdiskSize,BFURAMdiskMaxLength); } @@ -1100,6 +1220,10 @@ { } +static void BFUToolsFormSaveFields(FormType *pForm) +{ +} + static void BFUAdvancedFormSaveFields(FormType *pForm) { StrNCopy(BFUSettingsValues.RAMdiskSize, Modified: linux4palm/BFUGarux/BFUSettings.Rsrc =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/BFUSettings.Rsrc 2006-11-28 11:35:37 UTC (rev 683) @@ -22,22 +22,22 @@ BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME POPUPTRIGGER "Global" ID BFUPartTrigger AT (56 15 41 15) USABLE LEFTANCHOR - LIST "Global" "Network" "Modules" "Advanced" ID BFUPartList AT (56 15 60 44) NONUSABLE DISABLED + LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 END -FORM ID 8100 AT (0 0 160 160) +FORM ID BFUNetForm AT (0 0 160 160) FRAME MODAL NOSAVEBEHIND USABLE - HELPID 8602 DEFAULTBTNID 8540 + HELPID 8602 DEFAULTBTNID BFUOKButton BEGIN TITLE "BFUSettings - Network" BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME POPUPTRIGGER "Global" ID BFUPartTrigger AT (56 15 51 15) USABLE LEFTANCHOR - LIST "Global" "Network" "Modules" "Advanced" ID BFUPartList AT (56 15 60 44) NONUSABLE DISABLED + LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 @@ -68,46 +68,65 @@ LABEL "." ID 8141 AT (70 116) USABLE FONT 1 END -FORM ID 8200 AT (0 0 160 160) +FORM ID BFUModulesForm AT (0 0 160 160) FRAME MODAL NOSAVEBEHIND USABLE - HELPID 8603 DEFAULTBTNID 8540 + HELPID 8603 DEFAULTBTNID BFUOKButton BEGIN TITLE "BFUSettings - Modules" BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME POPUPTRIGGER "Modules" ID BFUPartTrigger AT (56 15 50 15) USABLE LEFTANCHOR - LIST "Global" "Network" "Modules" "Advanced" ID BFUPartList AT (56 15 60 44) NONUSABLE DISABLED + LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 TABLE ID BFUModuleTable AT (9 31 141 100) ROWS 8 COLUMNS 2 COLUMNWIDTHS 120 8 END -FORM ID 8300 AT (0 0 160 160) +FORM ID BFUToolsForm AT (0 0 160 160) FRAME MODAL NOSAVEBEHIND USABLE - HELPID 8604 DEFAULTBTNID 8540 + HELPID 8605 DEFAULTBTNID BFUOKButton BEGIN + TITLE "BFUSettings - Tools" + BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME + BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME + BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME + POPUPTRIGGER "Tools" ID BFUPartTrigger AT (56 15 50 15) USABLE LEFTANCHOR + LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED + POPUPLIST ID BFUPartTrigger BFUPartList + LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 + CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 + CHECKBOX "Silent boot" ID BFUSilentBootBox AT (9 31 60 15) USABLE RIGHTANCHOR GROUP 0 + CHECKBOX "Keyboard support" ID BFUKeyboardSupportBox AT (9 46 91 15) USABLE RIGHTANCHOR GROUP 0 + CHECKBOX "SmallROM reflash (dangerous!)" ID BFUReflashBox AT (9 61 145 15) USABLE RIGHTANCHOR GROUP 0 + CHECKBOX "Run fsck for card" ID BFURunFSCKBox AT (9 76 145 15) USABLE RIGHTANCHOR GROUP 0 + +END + + +FORM ID BFUAdvancedForm AT (0 0 160 160) + FRAME MODAL NOSAVEBEHIND USABLE + HELPID 8605 DEFAULTBTNID BFUOKButton +BEGIN TITLE "BFUSettings - Advanced" BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME POPUPTRIGGER "Advanced" ID BFUPartTrigger AT (56 15 55 15) USABLE LEFTANCHOR - LIST "Global" "Network" "Modules" "Advanced" ID BFUPartList AT (56 15 60 44) NONUSABLE DISABLED + LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 CHECKBOX "To card" ID BFUSave2CardBox AT (74 140 47 15) USABLE LEFTANCHOR GROUP 0 - CHECKBOX "Silent boot" ID BFUSilentBootBox AT (9 31 60 15) USABLE RIGHTANCHOR GROUP 0 - LABEL "CPU Frequency:" ID 8350 AT (9 50) USABLE FONT 1 - LIST "Auto" "133 MHz" "266 MHz" "400 MHz" ID BFUCPUSpeedList AT (90 48 39 44) NONUSABLE DISABLED - POPUPTRIGGER "Auto" ID BFUCPUSpeedTrigger AT (90 48 55 15) USABLE LEFTANCHOR + LABEL "CPU Frequency:" ID 8350 AT (9 33) USABLE FONT 1 + LIST "Auto" "133 MHz" "266 MHz" "400 MHz" ID BFUCPUSpeedList AT (90 31 39 44) NONUSABLE DISABLED + POPUPTRIGGER "Auto" ID BFUCPUSpeedTrigger AT (90 31 55 15) USABLE LEFTANCHOR POPUPLIST ID BFUCPUSpeedTrigger BFUCPUSpeedList - LABEL "RAMdisk size:" ID 8351 AT (9 67) USABLE FONT 1 - FIELD ID BFURAMdiskSizeField AT (90 67 30 15) USABLE LEFTALIGN EDITABLE UNDERLINED SINGLELINE MAXCHARS 6 - CHECKBOX "SD/MMC read-only" ID BFUCardReadonlyBox AT (9 80 96 15) USABLE LEFTANCHOR GROUP 0 + LABEL "RAMdisk size:" ID 8351 AT (9 48) USABLE FONT 1 + FIELD ID BFURAMdiskSizeField AT (90 48 30 15) USABLE LEFTALIGN EDITABLE UNDERLINED SINGLELINE MAXCHARS 6 + CHECKBOX "SD/MMC read-only" ID BFUCardReadonlyBox AT (9 63 96 15) USABLE LEFTANCHOR GROUP 0 + CHECKBOX "Copy modules to RAM" ID BFUCopy2RAMBox AT (9 78 110 15) USABLE LEFTANCHOR GROUP 0 CHECKBOX "Debug" ID BFUDebugModeBox AT (9 93 42 15) USABLE RIGHTANCHOR GROUP 0 - CHECKBOX "Keyboard support" ID BFUKeyboardSupportBox AT (9 106 91 15) USABLE RIGHTANCHOR GROUP 0 - CHECKBOX "SmallROM reflash (dangerous!)" ID BFUReflashBox AT (9 119 145 15) USABLE RIGHTANCHOR GROUP 0 END // --------------- Resources of type 'tSTR' --------------- @@ -172,13 +191,35 @@ "Cancel\n" \ "Exit and no BFUSettings will be used." -STRING ID 8604 "BFUSettings - Advanced\n" \ +STRING ID 8604 "BFUSettings - Tools\n" \ "(Bootloader for users)\n\n" \ + "This window is dedicated to enable useful things.\n\n\n" \ + "Set:\n\nSwitches to other part of settings - global, network, modules, tools and " \ + "advanced.\n\n\n" \ + "Silent boot\n\n" \ + "This will produce no output during boot.\n\n\n" \ + "Keyboard\n\n" \ + "This enable running external keyboard handling program. Currently Stowaway (PPK) and compatibile supported.\n\n\n" \ + "SmallROM reflash\n\n" \ + "This will reflash your SmallROM for suspend/resume support. Read more before enabling that...\n\n\n" \ + "Run fsck for card\n\n" \ + "This will run dosfsck on first partition of card. Usefull for checking errors after bad unmount...\n\n\n" \ + "OK\n\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n\n" \ + "Save\n\n" \ + "Save preferences for next use.\n\n\n" \ + "To card\n" \ + "If disabled, preferences are saved just to RAM database. If enabled it will " \ + "replace previously found preferences on card or save it on first volume\n\n\n" \ + "Cancel\n" \ + "Exit and no BFUSettings will be used." + + +STRING ID 8605 "BFUSettings - Advanced\n" \ + "(Bootloader for users)\n\n" \ "This window is dedicated to set advanced settings.\n\n\n" \ "Set:\n\nSwitches to other part of settings - global, network, modules and " \ "advanced.\n\n\n" \ - "Silent boot\n\n" \ - "This will produce no output during boot.\n\n\n" \ "CPU Frequency\n\n" \ "You can select CPU speed. Less speed means less battery needs.\n\n\n" \ "RAMdisk size:\n\n" \ @@ -186,6 +227,8 @@ "RAMdisk means less RAM for running applications.\n\n" \ "SD/MMC read-only\n\n" \ "With this option you can mount card as read only (if it is mounted).\n\n\n" \ + "Copy modules to RAM\n\n" \ + "This will mount modules directly from card without copying first to RAM.\n\n\n" \ "Debug\n\n" \ "This option will produce debug informations of BFUSettings script part." \ " Usefull for developers.\n\n" \ Modified: linux4palm/BFUGarux/BFUSettings.Rsrc.h =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc.h 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/BFUSettings.Rsrc.h 2006-11-28 11:35:37 UTC (rev 683) @@ -9,16 +9,20 @@ #define BFUModulesForm 8200 //"BFUSettings - Modules" #define BFUModuleTable 8201 -#define BFUAdvancedForm 8300 //"BFUSettings - Advanced" +#define BFUToolsForm 8300 //"BFUSettings - Tools" #define BFUSilentBootBox 8301 -#define BFUCPUSpeedTrigger 8302 -#define BFUCPUSpeedList 8320 -#define BFURAMdiskSizeField 8303 -#define BFUCardReadonlyBox 8304 -#define BFUDebugModeBox 8305 -#define BFUKeyboardSupportBox 8306 -#define BFUReflashBox 8307 +#define BFUKeyboardSupportBox 8303 +#define BFUReflashBox 8304 +#define BFURunFSCKBox 8305 +#define BFUAdvancedForm 8400 //"BFUSettings - Advanced" +#define BFUCPUSpeedTrigger 8401 +#define BFUCPUSpeedList 8420 +#define BFURAMdiskSizeField 8402 +#define BFUCopy2RAMBox 8403 +#define BFUCardReadonlyBox 8404 +#define BFUDebugModeBox 8405 + #define BFUNetForm 8100 //"BFUSettings - Network" #define BFUUseNetBox 8101 //fields of Palm IP address Modified: linux4palm/BFUGarux/garux-clean.c =================================================================== --- linux4palm/BFUGarux/garux-clean.c 2006-11-27 15:00:27 UTC (rev 682) +++ linux4palm/BFUGarux/garux-clean.c 2006-11-28 11:35:37 UTC (rev 683) @@ -318,6 +318,8 @@ FrmSetEventHandler (pForm, BFUNetFormEventHandler); if (formId == BFUModulesForm) FrmSetEventHandler (pForm, BFUModulesFormEventHandler); + if (formId == BFUToolsForm) + FrmSetEventHandler (pForm, BFUToolsFormEventHandler); if (formId == BFUAdvancedForm) FrmSetEventHandler (pForm, BFUAdvancedFormEventHandler); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2006-11-27 15:00:40
|
Revision: 682 http://svn.sourceforge.net/hackndev/?rev=682&view=rev Author: marex_z71 Date: 2006-11-27 07:00:27 -0800 (Mon, 27 Nov 2006) Log Message: ----------- l4p: PalmTC sound fixes by bitz ... I guess we should give bitz svn access ... Modified Paths: -------------- linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c Modified: linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c =================================================================== --- linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-11-23 12:57:32 UTC (rev 681) +++ linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-11-27 15:00:27 UTC (rev 682) @@ -191,6 +191,11 @@ status = GSR; if (status) { +#ifdef MACH_OMAP_PALMTC + if (status & GSR_GSCI) { + return IRQ_NONE; + } +#endif GSR = status; gsr_bits |= status; wake_up(&gsr_wq); @@ -203,7 +208,6 @@ PISR = PISR_EOC; MCSR = MCSR_EOC; #endif - return IRQ_HANDLED; } @@ -357,8 +361,11 @@ ret = pxa2xx_pcm_new(card, &pxa2xx_ac97_pcm_client, &pxa2xx_ac97_pcm); if (ret) goto err; - +#ifdef MACH_OMAP_PALMTC + ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, SA_SHIRQ, "AC97", dev); +#else ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL); +#endif if (ret < 0) goto err; @@ -410,7 +417,11 @@ snd_card_free(card); platform_set_drvdata(dev, NULL); GCR |= GCR_ACLINK_OFF; +#ifdef MACH_OMAP_PALMTC + free_irq(IRQ_AC97, dev); +#else free_irq(IRQ_AC97, NULL); +#endif pxa_set_cken(CKEN2_AC97, 0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2006-11-23 12:57:36
|
Revision: 681 http://svn.sourceforge.net/hackndev/?rev=681&view=rev Author: sleep_walker Date: 2006-11-23 04:57:32 -0800 (Thu, 23 Nov 2006) Log Message: ----------- l4p: bit array fix Modified Paths: -------------- linux4palm/BFUGarux/BFULinuxHelper.c linux4palm/BFUGarux/BFUSettings-alone.c linux4palm/BFUGarux/garux-generic.rcp Modified: linux4palm/BFUGarux/BFULinuxHelper.c =================================================================== --- linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/BFULinuxHelper.c 2006-11-23 12:57:32 UTC (rev 681) @@ -16,12 +16,6 @@ #define DEBUG -#ifdef DEBUG -#define CMDLINE_FILE "cmdline" -#else -#define CMDLINE_FILE "/proc/cmdline" -#endif - #include <stdio.h> #include <string.h> @@ -81,7 +75,10 @@ unsigned char IP[4],i; long optint; FILE *stream; - stream=fopen(CMDLINE_FILE,"r"); + if (argc) + stream=fopen(*argv,"r"); + else + stream=fopen("/proc/cmdline","r"); if (!stream) { perror("Cannot open /proc/cmdline"); @@ -102,10 +99,7 @@ //check length here first; //now it is used just 16 bits number - that is 4 chars in hex optint = ReadHexa(4,ptr); - if (argc) printf("\nis %ld\n",optint); //options - do all the magic here - printf("BFUReflash=%ld\n",optint &1); - optint >>=2; printf("BFUSource=%d\n",source = (optint & 3)); optint >>= 2; printf("BFUFS=%ld\n",optint & 3); @@ -121,6 +115,9 @@ printf("BFUCardRO=%ld\n",optint & 1); optint >>=1; printf("BFUKeyboard=%ld\n",optint & 1); + optint >>=1; + printf("BFUReflash=%ld\n",optint &1); + //if length of options is bigger than 4 chars in hexa, read another chars here... // optint = ReadHexa(4,options+4); Modified: linux4palm/BFUGarux/BFUSettings-alone.c =================================================================== --- linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/BFUSettings-alone.c 2006-11-23 12:57:32 UTC (rev 681) @@ -142,6 +142,8 @@ del[0] = BFUDelimiter; del[1] = '\0'; + options |= BFUSettingsValues.reflash; + options = options << 1; options |= BFUSettingsValues.keyboard; options = options << 1; options |= BFUSettingsValues.cardRO; @@ -158,8 +160,7 @@ options |= BFUSettingsValues.fs; options = options << 2; options |= BFUSettingsValues.source; - options = options << 1; - options |= BFUSettingsValues.reflash; + // BFUPrintHex(options,optstr); // StrPrintF(optstr,"%x",options); // BFUdoDie(optstr,options); @@ -167,7 +168,7 @@ /*now it should look like this bit content -------------- -0 reflash + 1 source 2 source 3 fs @@ -178,7 +179,8 @@ 8 CPUspeed 9 CPUspeed 10 cardRO -11 keyboard +11 keyboard +12 reflash */ // StrCopy(BFUCommandLinePart,) // BFUdoDie("Creating address and/or device string",0); @@ -448,7 +450,7 @@ BFUdoDie("BFUSavedPrefs already in RAM",0); case errNone: // that means errNone - nothing else is returned by this function - BFUdoDie("BFUSavedPrefs found on card",volRefNum); +// BFUdoDie("BFUSavedPrefs found on card",volRefNum); volIterator = vfsIteratorStop; BFUPrefsVolRefNum = volRefNum; break; Modified: linux4palm/BFUGarux/garux-generic.rcp =================================================================== --- linux4palm/BFUGarux/garux-generic.rcp 2006-11-22 20:38:15 UTC (rev 680) +++ linux4palm/BFUGarux/garux-generic.rcp 2006-11-23 12:57:32 UTC (rev 681) @@ -25,16 +25,16 @@ ICON BEGIN - BITMAP "icons/icon_bw.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_256.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_hr.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 + BITMAP "icons/icon_bw.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 1 + BITMAP "icons/icon_hr.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 2 END SMALLICON BEGIN - BITMAP "icons/icon_bw_s.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_256_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 1 - BITMAP "icons/icon_hr_s.bmp" BPP 8 TRANSPARENTINDEX 0 DENSITY 2 + BITMAP "icons/icon_bw_s.bmp" BPP 1 TRANSPARENTINDEX 0 DENSITY 1 + BITMAP "icons/icon_256_s.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 1 + BITMAP "icons/icon_hr_s.bmp" BPP 8 TRANSPARENT 0 255 0 DENSITY 2 END FORM ID MainForm AT (0 0 160 160) //2 2 156 156) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |