1-Wire ds2760 chip battery driver
PATCH 6/8 1-Wire ds2760 chip battery driver
This is driver for batteries with ds2760 chip inside, found inside almost every HP iPaq and HTC PDAs/phones.
Signed-off-by Anton Vorontsov <[email protected]>
--- drivers/power/Kconfig | 7 + drivers/power/Makefile | 2 + drivers/power/ds2760_battery.c | 520 ++++++++++++++++++++++++++++++++++++++++ include/linux/ds2760_battery.h | 32 +++ 4 files changed, 561 insertions(+), 0 deletions(-) create mode 100644 drivers/power/ds2760_battery.c create mode 100644 include/linux/ds2760_battery.h
drivers/power/Kconfig +7 -0
@@ -28,4 +28,11 @@ config APM_POWER Say Y here to enable support APM status emulation using battery class devices. +config BATTERY_DS2760 + tristate "DS2760 battery driver (HP iPAQ & others)" + select W1 + select W1_SLAVE_DS2760 + help + Say Y here to enable support for batteries with ds2760 chip. + endif # POWER_SUPPLY
drivers/power/Makefile +2 -0
@@ -16,3 +16,5 @@ obj-$(CONFIG_POWER_SUPPLY) += power_supply.o obj-$(CONFIG_PDA_POWER) += pda_power.o obj-$(CONFIG_APM_POWER) += apm_power.o + +obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
drivers/power/ds2760_battery.c new file +520 -0
520 lines not on this page · raw message
include/linux/ds2760_battery.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Driver for batteries with DS2760 chips inside. +* +* Copyright (c) 2007 Anton Vorontsov +* 2004-2007 Matt Reimer +* 2004 Szabolcs Gyurko +* +* Use consistent with the GNU GPL is permitted, +* provided that this copyright notice is +* preserved in its entirety in all copies and derived works. +* +* Author: Anton Vorontsov <[email protected]> +* February 2007 +* +* Matt Reimer <[email protected]> +* April 2004, 2005, 2007 +* +* Szabolcs Gyurko <[email protected]> +* September 2004 +*/ + +#ifndef __DS2760_BATTERY__ +#define __DS2760_BATTERY__ + +#include <linux/power_supply.h> + +struct ds2760_platform_data { +/* Battery information and characteristics. */ +struct power_supply_info battery_info; +}; + +#endif
Signature · 1 line
1.5.1.1-dirty