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...> - 2007-05-25 19:49:09
|
Revision: 995 http://svn.sourceforge.net/hackndev/?rev=995&view=rev Author: farcaller Date: 2007-05-25 12:49:06 -0700 (Fri, 25 May 2007) Log Message: ----------- gpioed: made things static to compile-in both gpioed/gpioed-ng Modified Paths: -------------- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c linux4palm/linux/trunk/drivers/misc/gpioed.c Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-05-25 19:03:54 UTC (rev 994) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-05-25 19:49:06 UTC (rev 995) @@ -77,14 +77,14 @@ } while (0); } -void set_afn(int gpio, int fn) +static void set_afn(int gpio, int fn) { int gafr; gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); } -void handle_request(void) +static void handle_request(void) { char *p = NULL; unsigned long id = simple_strtoul(procfs_buffer+2, &p, 10); @@ -131,7 +131,7 @@ } -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +static int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) { procfs_buffer_size = count; if (procfs_buffer_size > PROCFS_MAX_SIZE ) { Modified: linux4palm/linux/trunk/drivers/misc/gpioed.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed.c 2007-05-25 19:03:54 UTC (rev 994) +++ linux4palm/linux/trunk/drivers/misc/gpioed.c 2007-05-25 19:49:06 UTC (rev 995) @@ -27,9 +27,9 @@ static char procfs_buffer[PROCFS_MAX_SIZE]; static unsigned long procfs_buffer_size = 0; -unsigned int gpioed_irq; +static unsigned int gpioed_irq; -int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) +static int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) { int ret; @@ -43,9 +43,9 @@ return ret; } -void handle_request(void); +static void handle_request(void); -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +static int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) { procfs_buffer_size = count; if (procfs_buffer_size > PROCFS_MAX_SIZE ) { @@ -72,7 +72,7 @@ gpioed_irq, GET_GPIO(gpioed_irq) ? "high" : "low "); } -irqreturn_t gpio_irq(int irq, void *dev_id) +static irqreturn_t gpio_irq(int irq, void *dev_id) { static int initialised = 0; struct work_struct gpioed_ws; @@ -122,7 +122,7 @@ } /*** Request handler ***/ -void handle_request() +static void handle_request() { char *p = NULL; unsigned long base = 10; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |