Skip to contentSkip to conversation

ds2760 W1 slave

PATCH In review Anton Vorontsov 2 participants 2 messages Apr 20, 2007 – Apr 24, 2007 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

PATCH 6/7 ds2760 W1 slave

This is W1 slave for ds2760 chip, found inside almost every HP iPaq and HTC PDAs/phones.

---
 drivers/w1/slaves/Kconfig     |   13 +++
 drivers/w1/slaves/Makefile    |    1 +
 drivers/w1/slaves/w1_ds2760.c |  162 +++++++++++++++++++++++++++++++++++++++++
 drivers/w1/slaves/w1_ds2760.h |   50 +++++++++++++
 drivers/w1/w1_family.h        |    1 +
 5 files changed, 227 insertions(+), 0 deletions(-)
 create mode 100644 drivers/w1/slaves/w1_ds2760.c
 create mode 100644 drivers/w1/slaves/w1_ds2760.h
drivers/w1/slaves/Kconfig +13 -0
index 904e5ae..df95d6c 100644
@@ -35,4 +35,17 @@ config W1_SLAVE_DS2433_CRC
 	  Each block has 30 bytes of data and a two byte CRC16.
 	  Full block writes are only allowed if the CRC is valid.
 
+config W1_SLAVE_DS2760
+	tristate "Dallas 2760 battery monitor chip (HP iPAQ & others)"
+	depends on W1
+	help
+	  If you enable this you will have the DS2760 battery monitor
+	  chip support.
+
+	  The battery monitor chip is used in many batteries/devices
+	  as the one who is responsible for charging/discharging/monitoring
+	  Li+ batteries.
+
+	  If you are unsure, say N.
+
 endmenu
drivers/w1/slaves/Makefile +1 -0
index 725dcfd..a8eb752 100644
@@ -5,4 +5,5 @@
 obj-$(CONFIG_W1_SLAVE_THERM)	+= w1_therm.o
 obj-$(CONFIG_W1_SLAVE_SMEM)	+= w1_smem.o
 obj-$(CONFIG_W1_SLAVE_DS2433)	+= w1_ds2433.o
+obj-$(CONFIG_W1_SLAVE_DS2760)	+= w1_ds2760.o
 
drivers/w1/slaves/w1_ds2760.c new file +162 -0

162 lines not on this page · raw message

drivers/w1/slaves/w1_ds2760.h new file +50 -0

50 lines not on this page · raw message

drivers/w1/w1_family.h +1 -0
index 1e2ac40..ef1e1da 100644
@@ -33,6 +33,7 @@
 #define W1_THERM_DS1822  	0x22
 #define W1_EEPROM_DS2433  	0x23
 #define W1_THERM_DS18B20 	0x28
+#define W1_FAMILY_DS2760	0x30
 
 #define MAXNAMELEN		32
 
Signature · 1 line
1.5.1.1-dirty
#1 lore raw

Hi!

drivers/w1/slaves/w1_ds2760.c line 71

Quoted 4 lines
drivers/w1/slaves/w1_ds2760.c new file +4 -0
+#if 0
+/* Code below works, but unused currently, thus produces "defined but not
+ * used" warning. It stays here for reference and future needs, feel free
+ * to drop "#if 0" when you're about to use it. */

We normaly don't do this.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html