summaryrefslogtreecommitdiff
path: root/Documentation/w1/slaves/w1_ds2438
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-05-04 23:38:43 -0700
committerDan Williams <dan.j.williams@intel.com>2017-05-04 23:38:43 -0700
commit736163671bcb163fc82600b46c83dfa89d532d95 (patch)
tree0639dc9d9fa180450b4e8fbda706eaae5f1876da /Documentation/w1/slaves/w1_ds2438
parentd5483feda85a8f39ee2e940e279547c686aac30c (diff)
parent1ef97fe4f8abd3317d5c3c860f990e02c2633959 (diff)
Merge branch 'for-4.12/dax' into libnvdimm-for-nextlibnvdimm-for-4.12
Diffstat (limited to 'Documentation/w1/slaves/w1_ds2438')
-rw-r--r--Documentation/w1/slaves/w1_ds243863
1 files changed, 63 insertions, 0 deletions
diff --git a/Documentation/w1/slaves/w1_ds2438 b/Documentation/w1/slaves/w1_ds2438
new file mode 100644
index 000000000000..b99f3674c5b4
--- /dev/null
+++ b/Documentation/w1/slaves/w1_ds2438
@@ -0,0 +1,63 @@
+Kernel driver w1_ds2438
+=======================
+
+Supported chips:
+ * Maxim DS2438 Smart Battery Monitor
+
+supported family codes:
+ W1_FAMILY_DS2438 0x26
+
+Author: Mariusz Bialonczyk <manio@skyboo.net>
+
+Description
+-----------
+
+The DS2438 chip provides several functions that are desirable to carry in
+a battery pack. It also has a 40 bytes of nonvolatile EEPROM.
+Because the ability of temperature, current and voltage measurement, the chip
+is also often used in weather stations and applications such as: rain gauge,
+wind speed/direction measuring, humidity sensing, etc.
+
+Current support is provided through the following sysfs files (all files
+except "iad" are readonly):
+
+"iad"
+-----
+This file controls the 'Current A/D Control Bit' (IAD) in the
+Status/Configuration Register.
+Writing a zero value will clear the IAD bit and disables the current
+measurements.
+Writing value "1" is setting the IAD bit (enables the measurements).
+The IAD bit is enabled by default in the DS2438.
+
+When writing to sysfs file bits 2-7 are ignored, so it's safe to write ASCII.
+An I/O error is returned when there is a problem setting the new value.
+
+"page0"
+-------
+This file provides full 8 bytes of the chip Page 0 (00h).
+This page contains the most frequently accessed information of the DS2438.
+Internally when this file is read, the additional CRC byte is also obtained
+from the slave device. If it is correct, the 8 bytes page data are passed
+to userspace, otherwise an I/O error is returned.
+
+"temperature"
+-------------
+Opening and reading this file initiates the CONVERT_T (temperature conversion)
+command of the chip, afterwards the temperature is read from the device
+registers and provided as an ASCII decimal value.
+
+Important: The returned value has to be divided by 256 to get a real
+temperature in degrees Celsius.
+
+"vad", "vdd"
+------------
+Opening and reading this file initiates the CONVERT_V (voltage conversion)
+command of the chip.
+
+Depending on a sysfs filename a different input for the A/D will be selected:
+vad: general purpose A/D input (VAD)
+vdd: battery input (VDD)
+
+After the voltage conversion the value is returned as decimal ASCII.
+Note: The value is in mV, so to get a volts the value has to be divided by 10.