1 Kernel driver w1_ds2438
2 =======================
5 * Maxim DS2438 Smart Battery Monitor
7 supported family codes:
10 Author: Mariusz Bialonczyk <manio@skyboo.net>
15 The DS2438 chip provides several functions that are desirable to carry in
16 a battery pack. It also has a 40 bytes of nonvolatile EEPROM.
17 Because the ability of temperature, current and voltage measurement, the chip
18 is also often used in weather stations and applications such as: rain gauge,
19 wind speed/direction measuring, humidity sensing, etc.
21 Current support is provided through the following sysfs files (all files
22 except "iad" are readonly):
26 This file controls the 'Current A/D Control Bit' (IAD) in the
27 Status/Configuration Register.
28 Writing a zero value will clear the IAD bit and disables the current
30 Writing value "1" is setting the IAD bit (enables the measurements).
31 The IAD bit is enabled by default in the DS2438.
33 When writing to sysfs file bits 2-7 are ignored, so it's safe to write ASCII.
34 An I/O error is returned when there is a problem setting the new value.
38 This file provides full 8 bytes of the chip Page 0 (00h).
39 This page contains the most frequently accessed information of the DS2438.
40 Internally when this file is read, the additional CRC byte is also obtained
41 from the slave device. If it is correct, the 8 bytes page data are passed
42 to userspace, otherwise an I/O error is returned.
46 Opening and reading this file initiates the CONVERT_T (temperature conversion)
47 command of the chip, afterwards the temperature is read from the device
48 registers and provided as an ASCII decimal value.
50 Important: The returned value has to be divided by 256 to get a real
51 temperature in degrees Celsius.
55 Opening and reading this file initiates the CONVERT_V (voltage conversion)
58 Depending on a sysfs filename a different input for the A/D will be selected:
59 vad: general purpose A/D input (VAD)
60 vdd: battery input (VDD)
62 After the voltage conversion the value is returned as decimal ASCII.
63 Note: The value is in mV, so to get a volts the value has to be divided by 10.