162306a36Sopenharmony_ciKernel driver w1_ds2423 262306a36Sopenharmony_ci======================= 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciSupported chips: 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci * Maxim DS2423 based counter devices. 762306a36Sopenharmony_ci 862306a36Sopenharmony_cisupported family codes: 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci =============== ==== 1162306a36Sopenharmony_ci W1_THERM_DS2423 0x1D 1262306a36Sopenharmony_ci =============== ==== 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciAuthor: Mika Laitio <lamikr@pilppa.org> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciDescription 1762306a36Sopenharmony_ci----------- 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciSupport is provided through the sysfs w1_slave file. Each opening and 2062306a36Sopenharmony_ciread sequence of w1_slave file initiates the read of counters and ram 2162306a36Sopenharmony_ciavailable in DS2423 pages 12 - 15. 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciResult of each page is provided as an ASCII output where each counter 2462306a36Sopenharmony_civalue and associated ram buffer is outpputed to own line. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciEach lines will contain the values of 42 bytes read from the counter and 2762306a36Sopenharmony_cimemory page along the crc=YES or NO for indicating whether the read operation 2862306a36Sopenharmony_ciwas successful and CRC matched. 2962306a36Sopenharmony_ciIf the operation was successful, there is also in the end of each line 3062306a36Sopenharmony_cia counter value expressed as an integer after c= 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciMeaning of 42 bytes represented is following: 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci - 1 byte from ram page 3562306a36Sopenharmony_ci - 4 bytes for the counter value 3662306a36Sopenharmony_ci - 4 zero bytes 3762306a36Sopenharmony_ci - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes 3862306a36Sopenharmony_ci - 31 remaining bytes from the ram page 3962306a36Sopenharmony_ci - crc=YES/NO indicating whether read was ok and crc matched 4062306a36Sopenharmony_ci - c=<int> current counter value 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ciexample from the successful read:: 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci 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 4562306a36Sopenharmony_ci 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 4662306a36Sopenharmony_ci 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 4762306a36Sopenharmony_ci 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 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciexample from the read with crc errors:: 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci 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 5262306a36Sopenharmony_ci 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 5362306a36Sopenharmony_ci 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 5462306a36Sopenharmony_ci 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 55