Skip to contentSkip to conversation

1-Wire ds2760 chip battery driver

PATCH In review Anton Vorontsov 1 participant 1 message Apr 20, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 1-Wire ds2760 chip battery driver

---
 drivers/battery/Kconfig          |    7 +
 drivers/battery/Makefile         |    1 +
 drivers/battery/ds2760_battery.c |  499 ++++++++++++++++++++++++++++++++++++++
 include/linux/ds2760_battery.h   |   32 +++
 4 files changed, 539 insertions(+), 0 deletions(-)
 create mode 100644 drivers/battery/ds2760_battery.c
 create mode 100644 include/linux/ds2760_battery.h
drivers/battery/Kconfig +7 -0
index c386593..0c14ae0 100644
@@ -8,4 +8,11 @@ config BATTERY
 	  Say Y here to enable generic battery status reporting in
 	  the /sys filesystem.
 
+config BATTERY_DS2760
+	tristate "DS2760 battery driver (HP iPAQ & others)"
+	depends on BATTERY && W1
+	select W1_SLAVE_DS2760
+	help
+	  Say Y here to enable support for batteries with ds2760 chip.
+
 endmenu
drivers/battery/Makefile +1 -0
index a2239cb..9902513 100644
@@ -1 +1,2 @@
 obj-$(CONFIG_BATTERY)              += battery.o
+obj-$(CONFIG_BATTERY_DS2760)       += ds2760_battery.o
drivers/battery/ds2760_battery.c new file +499 -0

499 lines not on this page · raw message

include/linux/ds2760_battery.h new file +32 -0
new file mode 100644
index 0000000..a614b6a
@@ -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/battery.h>
+
+struct ds2760_platform_data {
+	/* Battery information and characteristics. */
+	struct battery_info battery_info;
+};
+
+#endif
Signature · 1 line
1.5.1.1-dirty