1*e9bb6275SMauro Carvalho ChehabKernel driver w1_ds2423 2*e9bb6275SMauro Carvalho Chehab======================= 3*e9bb6275SMauro Carvalho Chehab 4*e9bb6275SMauro Carvalho ChehabSupported chips: 5*e9bb6275SMauro Carvalho Chehab 6*e9bb6275SMauro Carvalho Chehab * Maxim DS2423 based counter devices. 7*e9bb6275SMauro Carvalho Chehab 8*e9bb6275SMauro Carvalho Chehabsupported family codes: 9*e9bb6275SMauro Carvalho Chehab 10*e9bb6275SMauro Carvalho Chehab =============== ==== 11*e9bb6275SMauro Carvalho Chehab W1_THERM_DS2423 0x1D 12*e9bb6275SMauro Carvalho Chehab =============== ==== 13*e9bb6275SMauro Carvalho Chehab 14*e9bb6275SMauro Carvalho ChehabAuthor: Mika Laitio <lamikr@pilppa.org> 15*e9bb6275SMauro Carvalho Chehab 16*e9bb6275SMauro Carvalho ChehabDescription 17*e9bb6275SMauro Carvalho Chehab----------- 18*e9bb6275SMauro Carvalho Chehab 19*e9bb6275SMauro Carvalho ChehabSupport is provided through the sysfs w1_slave file. Each opening and 20*e9bb6275SMauro Carvalho Chehabread sequence of w1_slave file initiates the read of counters and ram 21*e9bb6275SMauro Carvalho Chehabavailable in DS2423 pages 12 - 15. 22*e9bb6275SMauro Carvalho Chehab 23*e9bb6275SMauro Carvalho ChehabResult of each page is provided as an ASCII output where each counter 24*e9bb6275SMauro Carvalho Chehabvalue and associated ram buffer is outpputed to own line. 25*e9bb6275SMauro Carvalho Chehab 26*e9bb6275SMauro Carvalho ChehabEach lines will contain the values of 42 bytes read from the counter and 27*e9bb6275SMauro Carvalho Chehabmemory page along the crc=YES or NO for indicating whether the read operation 28*e9bb6275SMauro Carvalho Chehabwas successful and CRC matched. 29*e9bb6275SMauro Carvalho ChehabIf the operation was successful, there is also in the end of each line 30*e9bb6275SMauro Carvalho Chehaba counter value expressed as an integer after c= 31*e9bb6275SMauro Carvalho Chehab 32*e9bb6275SMauro Carvalho ChehabMeaning of 42 bytes represented is following: 33*e9bb6275SMauro Carvalho Chehab 34*e9bb6275SMauro Carvalho Chehab - 1 byte from ram page 35*e9bb6275SMauro Carvalho Chehab - 4 bytes for the counter value 36*e9bb6275SMauro Carvalho Chehab - 4 zero bytes 37*e9bb6275SMauro Carvalho Chehab - 2 bytes for crc16 which was calculated from the data read since the previous crc bytes 38*e9bb6275SMauro Carvalho Chehab - 31 remaining bytes from the ram page 39*e9bb6275SMauro Carvalho Chehab - crc=YES/NO indicating whether read was ok and crc matched 40*e9bb6275SMauro Carvalho Chehab - c=<int> current counter value 41*e9bb6275SMauro Carvalho Chehab 42*e9bb6275SMauro Carvalho Chehabexample from the successful read:: 43*e9bb6275SMauro Carvalho Chehab 44*e9bb6275SMauro Carvalho Chehab 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 45*e9bb6275SMauro Carvalho Chehab 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 46*e9bb6275SMauro Carvalho Chehab 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 47*e9bb6275SMauro Carvalho Chehab 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 48*e9bb6275SMauro Carvalho Chehab 49*e9bb6275SMauro Carvalho Chehabexample from the read with crc errors:: 50*e9bb6275SMauro Carvalho Chehab 51*e9bb6275SMauro Carvalho Chehab 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 52*e9bb6275SMauro Carvalho Chehab 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 53*e9bb6275SMauro Carvalho Chehab 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 54*e9bb6275SMauro Carvalho Chehab 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