From: <bal...@us...> - 2007-02-27 10:43:06
|
Revision: 880 http://svn.sourceforge.net/hackndev/?rev=880&view=rev Author: balrog-kun Date: 2007-02-27 02:43:04 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: section mismatch fix and a new Kconfig dependency. Modified Paths: -------------- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c linux4palm/linux/trunk/drivers/mmc/Kconfig linux4palm/linux/trunk/drivers/soc/tsc2101.c Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-02-27 10:43:04 UTC (rev 880) @@ -471,7 +471,7 @@ static struct tps65010 *the_tps; -static int __exit tps65010_detach_client(struct i2c_client *client) +static int tps65010_detach_client(struct i2c_client *client) { struct tps65010 *tps; @@ -510,8 +510,7 @@ } /* no error returns, they'd just make bus scanning stop */ -static int __init -tps65010_probe(struct i2c_adapter *bus, int address, int kind) +static int tps65010_probe(struct i2c_adapter *bus, int address, int kind) { struct tps65010 *tps; int status; @@ -666,7 +665,7 @@ return 0; } -static int __init tps65010_scan_bus(struct i2c_adapter *bus) +static int tps65010_scan_bus(struct i2c_adapter *bus) { if (!i2c_check_functionality(bus, I2C_FUNC_SMBUS_BYTE_DATA)) return -EINVAL; Modified: linux4palm/linux/trunk/drivers/mmc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/mmc/Kconfig 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/mmc/Kconfig 2007-02-27 10:43:04 UTC (rev 880) @@ -157,9 +157,10 @@ config MMC_WBSD_PALMT3 tristate "Winbond W86488Y on Palm T|T3 Interface support" depends on MMC + depends on TPS65010 select MMC_BLOCK help - This module let you use SD cards on Palm T|T3. + This module let you use SD cards on Palm T|T3. endmenu Modified: linux4palm/linux/trunk/drivers/soc/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 10:43:04 UTC (rev 880) @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/soc/tsc2101.h> #include <linux/platform_device.h> +#include <linux/irq.h> #include <sound/control.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/irqs.h> @@ -813,7 +814,7 @@ } -static int __init tsc2101_probe(struct device *dev) +static int tsc2101_probe(struct device *dev) { struct tsc2101_data *devdata; struct tsc2101_ts_event ts_data; @@ -855,7 +856,7 @@ } -static int __exit tsc2101_remove(struct device *dev) +static int tsc2101_remove(struct device *dev) { struct tsc2101_data *devdata = dev_get_drvdata(dev); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-06-22 20:03:26
|
Revision: 1045 http://svn.sourceforge.net/hackndev/?rev=1045&view=rev Author: sleep_walker Date: 2007-06-22 13:03:14 -0700 (Fri, 22 Jun 2007) Log Message: ----------- l4p: 'platform_device'ed tsc2101, SUSPEND/RESUME works on T|T3! Modified Paths: -------------- linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c linux4palm/linux/trunk/drivers/mfd/tsc2101.c Modified: linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c =================================================================== --- linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c 2007-06-22 19:19:08 UTC (rev 1044) +++ linux4palm/linux/trunk/drivers/input/touchscreen/tsc2101_ts.c 2007-06-22 20:03:14 UTC (rev 1045) @@ -17,6 +17,7 @@ #include <linux/input.h> #include <linux/module.h> #include <linux/soc/tsc2101.h> +#include <linux/platform_device.h> #ifdef CONFIG_TOUCHSCREEN_TSC2101 #define X_AXIS_MAX 3800 @@ -45,9 +46,9 @@ return; } -void tsc2101_ts_setup(struct device *dev) +void tsc2101_ts_setup(struct platform_device *dev) { - struct tsc2101_data *tsc2101_ts = dev_get_drvdata(dev); + struct tsc2101_data *tsc2101_ts = platform_get_drvdata(dev); struct input_dev *input_dev; //init_input_dev(&(tsc2101_ts->inputdevice)); Modified: linux4palm/linux/trunk/drivers/mfd/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-22 19:19:08 UTC (rev 1044) +++ linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-22 20:03:14 UTC (rev 1045) @@ -23,7 +23,7 @@ #include <linux/platform_device.h> #include "tsc2101.h" -extern void tsc2101_ts_setup(struct device *dev); +extern void tsc2101_ts_setup(struct platform_device *dev); extern void tsc2101_ts_report(struct tsc2101_data *devdata, int x, int y, int p, int pendown); static int tsc2101_regread(struct tsc2101_data *devdata, int regnum) @@ -227,9 +227,9 @@ mod_timer(&(devdata->misc_timer), jiffies + HZ); } -void tsc2101_print_miscdata(struct device *dev) +void tsc2101_print_miscdata(struct platform_device *dev) { - struct tsc2101_data *devdata = dev_get_drvdata(dev); + struct tsc2101_data *devdata = platform_get_drvdata(dev); printk(KERN_ERR "TSC2101 Bat: %04x\n",devdata->miscdata.bat); printk(KERN_ERR "TSC2101 Aux1: %04x\n",devdata->miscdata.aux1); @@ -238,9 +238,9 @@ printk(KERN_ERR "TSC2101 Temp2: %04x\n",devdata->miscdata.temp2); } -static int tsc2101_suspend(struct device *dev, pm_message_t state) +static int tsc2101_suspend(struct platform_device *dev, pm_message_t state) { - struct tsc2101_data *devdata = dev_get_drvdata(dev); + struct tsc2101_data *devdata = platform_get_drvdata(dev); /* comment this out like in old driver, it's sick though */ /* if (level == SUSPEND_POWER_DOWN) { */ @@ -251,9 +251,9 @@ return 0; } -static int tsc2101_resume(struct device *dev) +static int tsc2101_resume(struct platform_device *dev) { - struct tsc2101_data *devdata = dev_get_drvdata(dev); + struct tsc2101_data *devdata = platform_get_drvdata(dev); /* comment this out like in old driver, it's sick though */ /* if (level == RESUME_POWER_ON) { */ @@ -265,7 +265,7 @@ } -static int __init tsc2101_probe(struct device *dev) +static int tsc2101_probe(struct platform_device *dev) { struct tsc2101_data *devdata; struct tsc2101_ts_event ts_data; @@ -273,9 +273,9 @@ if (!(devdata = kcalloc(1, sizeof(struct tsc2101_data), GFP_KERNEL))) return -ENOMEM; - dev_set_drvdata(dev,devdata); + platform_set_drvdata(dev,devdata); spin_lock_init(&devdata->lock); - devdata->platform = dev->platform_data; + devdata->platform = dev->dev.platform_data; init_timer(&devdata->ts_timer); devdata->ts_timer.data = (unsigned long) devdata; @@ -305,9 +305,9 @@ } -static int __exit tsc2101_remove(struct device *dev) +static int tsc2101_remove(struct platform_device *dev) { - struct tsc2101_data *devdata = dev_get_drvdata(dev); + struct tsc2101_data *devdata = platform_get_drvdata(dev); free_irq(devdata->platform->irq, devdata); del_timer_sync(&devdata->ts_timer); @@ -318,23 +318,26 @@ return 0; } -static struct device_driver tsc2101_driver = { +static struct platform_driver tsc2101_driver = { + .driver = { .name = "tsc2101", - .bus = &platform_bus_type, + .owner = THIS_MODULE, + }, +/* .bus = &platform_bus_type, */ .probe = tsc2101_probe, - .remove = __exit_p(tsc2101_remove), + .remove = tsc2101_remove, .suspend = tsc2101_suspend, .resume = tsc2101_resume, }; static int __init tsc2101_init(void) { - return driver_register(&tsc2101_driver); + return platform_driver_register(&tsc2101_driver); } static void __exit tsc2101_exit(void) { - driver_unregister(&tsc2101_driver); + platform_driver_unregister(&tsc2101_driver); } module_init(tsc2101_init); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-06-29 00:08:31
|
Revision: 1093 http://svn.sourceforge.net/hackndev/?rev=1093&view=rev Author: sleep_walker Date: 2007-06-28 17:08:27 -0700 (Thu, 28 Jun 2007) Log Message: ----------- palmtt3: added led device, tsc2101 PLL set to other values Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/Kconfig linux4palm/linux/trunk/drivers/leds/Makefile linux4palm/linux/trunk/drivers/mfd/tsc2101.c linux4palm/linux/trunk/drivers/misc/gpioed-ng.c Added Paths: ----------- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c Modified: linux4palm/linux/trunk/drivers/leds/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/leds/Kconfig 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/leds/Kconfig 2007-06-29 00:08:27 UTC (rev 1093) @@ -129,6 +129,12 @@ help This option enables support for the LEDs on Palm LifeDrive. +config LEDS_PALMTT3 + tristate "LED Support for Palm Tungsten|T3" + depends LEDS_CLASS && MACH_T3XSCALE && TPS65010 + help + This option enables support for the LEDs on Palm Tungsten|T3. + config LEDS_PALMZ72 tristate "LED Support for PalmOne Zire 72" depends LEDS_CLASS && MACH_PALMZ72 Modified: linux4palm/linux/trunk/drivers/leds/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/leds/Makefile 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/leds/Makefile 2007-06-29 00:08:27 UTC (rev 1093) @@ -26,6 +26,7 @@ # Hack&Dev drivers obj-$(CONFIG_LEDS_PALMLD) += leds-palmld.o +obj-$(CONFIG_LEDS_PALMTT3) += leds-palmtt3.o obj-$(CONFIG_LEDS_PALMZ72) += led-palmz72.o obj-$(CONFIG_LEDS_PALMT650) += leds-palmt650.o Added: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c (rev 0) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -0,0 +1,120 @@ +/* + * Palm LifeDrive LED Driver + * + * Author: Tomas Cech <Tom...@ma...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/leds.h> +#include <asm/mach-types.h> +#include <asm/arch/hardware.h> +#include <asm/arch/pxa-regs.h> +#include <asm/hardware/scoop.h> +#include <asm/arch/tps65010.h> + + +static void palmtt3led_red_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value <= 85) + tps65010_set_led(LED2, OFF); + else + if (value <= 170) + tps65010_set_led(LED2, ON); + else + tps65010_set_led(LED2, BLINK); +} + +static void palmtt3led_green_set(struct led_classdev *led_cdev, enum led_brightness value) +{ + if (value <= 85) + tps65010_set_led(LED1, OFF); + else + if (value <= 170) + tps65010_set_led(LED1, ON); + else + tps65010_set_led(LED1, BLINK); +} + +static struct led_classdev palmtt3_red_led = { + .name = "palmtt3:red", + .brightness_set = palmtt3led_red_set, +}; + +static struct led_classdev palmtt3_green_led = { + .name = "palmtt3:green", + .brightness_set = palmtt3led_green_set, +}; + +#ifdef CONFIG_PM +static int palmtt3led_suspend(struct platform_device *dev, pm_message_t state) +{ + led_classdev_suspend(&palmtt3_red_led); + led_classdev_suspend(&palmtt3_green_led); + return 0; +} + +static int palmtt3led_resume(struct platform_device *dev) +{ + led_classdev_resume(&palmtt3_red_led); + led_classdev_resume(&palmtt3_green_led); + return 0; +} +#endif + +static int palmtt3led_probe(struct platform_device *pdev) +{ + int ret; + + ret = led_classdev_register(&pdev->dev, &palmtt3_red_led); + if (ret < 0) + return ret; + + ret = led_classdev_register(&pdev->dev, &palmtt3_green_led); + if (ret < 0) + led_classdev_unregister(&palmtt3_red_led); + + return ret; +} + +static int palmtt3led_remove(struct platform_device *pdev) +{ + led_classdev_unregister(&palmtt3_red_led); + led_classdev_unregister(&palmtt3_green_led); + return 0; +} + +static struct platform_driver palmtt3led_driver = { + .probe = palmtt3led_probe, + .remove = palmtt3led_remove, +#ifdef CONFIG_PM + .suspend = palmtt3led_suspend, + .resume = palmtt3led_resume, +#endif + .driver = { + .name = "palmtt3-led", + }, +}; + +static int __init palmtt3led_init(void) +{ + return platform_driver_register(&palmtt3led_driver); +} + +static void __exit palmtt3led_exit(void) +{ + platform_driver_unregister(&palmtt3led_driver); +} + +module_init(palmtt3led_init); +module_exit(palmtt3led_exit); + +MODULE_AUTHOR("Tomas Cech <Tom...@ma..."); +MODULE_DESCRIPTION("Palm Tungsten|T3 LED driver"); +MODULE_LICENSE("GPL"); Modified: linux4palm/linux/trunk/drivers/mfd/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/mfd/tsc2101.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -227,8 +227,8 @@ if (fs_44) { /* 44.1 khz - 12 MHz Mclk */ printk("selected 44.1khz PLL\n"); - tsc2101_regwrite(snd_data, TSC2101_REG_PLL1, TSC2101_PLL_ENABLE | TSC2101_PLL_PVAL(2) | TSC2101_PLL_JVAL(7)); - tsc2101_regwrite(snd_data, TSC2101_REG_PLL2, TSC2101_PLL2_DVAL(5740)); + tsc2101_regwrite(snd_data, TSC2101_REG_PLL1, TSC2101_PLL_ENABLE | TSC2101_PLL_PVAL(1) | TSC2101_PLL_JVAL(7)); + tsc2101_regwrite(snd_data, TSC2101_REG_PLL2, TSC2101_PLL2_DVAL(5264)); } else { /* 48 khz - 12 Mhz Mclk */ printk("selected 48khz PLL\n"); Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-06-28 23:46:35 UTC (rev 1092) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-06-29 00:08:27 UTC (rev 1093) @@ -98,7 +98,6 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); break; #ifdef CONFIG_MACH_T3XSCALE -#ifdef CONFIG_TPS65010 case 'T': tps65010_set_gpio_out_value(id, 1); printk(KERN_ERR "GPIOed: GPIO %lu set high on TPS65010\n", id); @@ -108,7 +107,6 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low on TPS65010\n", id); break; #endif -#endif case 'd': GPDR(id) &= ~(GPIO_bit(id)); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-05 14:05:16
|
Revision: 1106 http://svn.sourceforge.net/hackndev/?rev=1106&view=rev Author: sleep_walker Date: 2007-07-05 07:04:39 -0700 (Thu, 05 Jul 2007) Log Message: ----------- palmtt3: wbsd led 'triggered', leds are safer, gpioed-ng would compile everytime Modified Paths: -------------- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c linux4palm/linux/trunk/drivers/misc/gpioed-ng.c linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c Modified: linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c =================================================================== --- linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/leds/leds-palmtt3.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -20,46 +20,65 @@ #include <asm/arch/tps65010.h> +struct palmtt3led_work_type { + struct work_struct work; + int led1; + int led2; + int vibra; +} palmtt3led_work; + + +static void tps650101_scheduled_leds(struct work_struct *work) +{ + tps65010_set_led(LED1,palmtt3led_work.led1); + tps65010_set_led(LED2,palmtt3led_work.led2); + tps65010_set_vib(palmtt3led_work.vibra); +} + static void palmtt3led_red_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED2, ON); + palmtt3led_work.led2 = ON; else - tps65010_set_led(LED2, OFF); + palmtt3led_work.led2 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_green_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED1, ON); + palmtt3led_work.led1 = ON; else -/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ - tps65010_set_led(LED1, UNDER_CHG_CTRL); + palmtt3led_work.led1 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_red_blink_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED2, BLINK); + palmtt3led_work.led2 = BLINK; else - tps65010_set_led(LED2, OFF); + palmtt3led_work.led2 = OFF; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3led_green_blink_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_led(LED1, BLINK); + palmtt3led_work.led1 = BLINK; else -/* NOTE: This is set to UNDER_CHG_CTRL, not to OFF... It shows charging status - plugged/unplugged... */ - tps65010_set_led(LED1, UNDER_CHG_CTRL); +/* NOTE: This is set to OFF, not to OFF... It shows charging status - plugged/unplugged... */ + palmtt3led_work.led1 = UNDER_CHG_CTRL; + schedule_work(&(palmtt3led_work.work)); } static void palmtt3_vibra_set(struct led_classdev *led_cdev, enum led_brightness value) { if (value) - tps65010_set_vib(ON); + palmtt3led_work.vibra = ON; else - tps65010_set_vib(OFF); + palmtt3led_work.vibra = OFF; + schedule_work(&(palmtt3led_work.work)); } @@ -144,6 +163,7 @@ led_classdev_unregister(&palmtt3_green_blink_led); } + INIT_WORK(&(palmtt3led_work.work),tps650101_scheduled_leds); return ret; } Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -98,6 +98,7 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); break; #ifdef CONFIG_MACH_T3XSCALE +#if defined(CONFIG_TPS65010) || (defined(CONFIG_GPIOEDNG_MODULE) && defined(CONFIG_TPS65010_MODULE)) case 'T': tps65010_set_gpio_out_value(id, 1); printk(KERN_ERR "GPIOed: GPIO %lu set high on TPS65010\n", id); @@ -107,6 +108,7 @@ printk(KERN_ERR "GPIOed: GPIO %lu set low on TPS65010\n", id); break; #endif +#endif case 'd': GPDR(id) &= ~(GPIO_bit(id)); break; Modified: linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c =================================================================== --- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-07-05 11:03:48 UTC (rev 1105) +++ linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-07-05 14:04:39 UTC (rev 1106) @@ -22,6 +22,7 @@ #include <linux/mmc/host.h> #include <linux/blkdev.h> #include <linux/mmc/protocol.h> +#include <linux/leds.h> #include <linux/highmem.h> @@ -1269,15 +1270,10 @@ tps65010_set_gpio_out_value(GPIO3, HIGH); } - if(host->tps_duty & TPS_LED_OFF) + if(host->tps_duty & TPS_LED_ON) { - DBG("Turning led off\n"); - tps65010_set_led(LED2, OFF); - } - else if(host->tps_duty & TPS_LED_ON) - { DBG("Blinking led\n"); - tps65010_set_led(LED2, ON); + ledtrig_mmc_activity(); } host->tps_duty = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |