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. |