Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver w1_ds2423
0002 =======================
0003 
0004 Supported chips:
0005 
0006   * Maxim DS2423 based counter devices.
0007 
0008 supported family codes:
0009 
0010         =============== ====
0011         W1_THERM_DS2423 0x1D
0012         =============== ====
0013 
0014 Author: Mika Laitio <lamikr@pilppa.org>
0015 
0016 Description
0017 -----------
0018 
0019 Support is provided through the sysfs w1_slave file. Each opening and
0020 read sequence of w1_slave file initiates the read of counters and ram
0021 available in DS2423 pages 12 - 15.
0022 
0023 Result of each page is provided as an ASCII output where each counter
0024 value and associated ram buffer is outpputed to own line.
0025 
0026 Each lines will contain the values of 42 bytes read from the counter and
0027 memory page along the crc=YES or NO for indicating whether the read operation
0028 was successful and CRC matched.
0029 If the operation was successful, there is also in the end of each line
0030 a counter value expressed as an integer after c=
0031 
0032 Meaning of 42 bytes represented is following:
0033 
0034  - 1 byte from ram page
0035  - 4 bytes for the counter value
0036  - 4 zero bytes
0037  - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
0038  - 31 remaining bytes from the ram page
0039  - crc=YES/NO indicating whether read was ok and crc matched
0040  - c=<int> current counter value
0041 
0042 example from the successful read::
0043 
0044   00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
0045   00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
0046   00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
0047   00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5
0048 
0049 example from the read with crc errors::
0050 
0051   00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
0052   00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
0053   00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
0054   00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO