17ebd8b66SMauro Carvalho ChehabKernel driver ltc2945 27ebd8b66SMauro Carvalho Chehab===================== 37ebd8b66SMauro Carvalho Chehab 47ebd8b66SMauro Carvalho ChehabSupported chips: 57ebd8b66SMauro Carvalho Chehab 67ebd8b66SMauro Carvalho Chehab * Linear Technology LTC2945 77ebd8b66SMauro Carvalho Chehab 87ebd8b66SMauro Carvalho Chehab Prefix: 'ltc2945' 97ebd8b66SMauro Carvalho Chehab 107ebd8b66SMauro Carvalho Chehab Addresses scanned: - 117ebd8b66SMauro Carvalho Chehab 127ebd8b66SMauro Carvalho Chehab Datasheet: 137ebd8b66SMauro Carvalho Chehab 14*f6a496a5SAlexandru Ardelean https://www.analog.com/media/en/technical-documentation/data-sheets/2945fb.pdf 157ebd8b66SMauro Carvalho Chehab 167ebd8b66SMauro Carvalho ChehabAuthor: Guenter Roeck <linux@roeck-us.net> 177ebd8b66SMauro Carvalho Chehab 187ebd8b66SMauro Carvalho Chehab 197ebd8b66SMauro Carvalho ChehabDescription 207ebd8b66SMauro Carvalho Chehab----------- 217ebd8b66SMauro Carvalho Chehab 227ebd8b66SMauro Carvalho ChehabThe LTC2945 is a rail-to-rail system monitor that measures current, voltage, 237ebd8b66SMauro Carvalho Chehaband power consumption. 247ebd8b66SMauro Carvalho Chehab 257ebd8b66SMauro Carvalho Chehab 267ebd8b66SMauro Carvalho ChehabUsage Notes 277ebd8b66SMauro Carvalho Chehab----------- 287ebd8b66SMauro Carvalho Chehab 297ebd8b66SMauro Carvalho ChehabThis driver does not probe for LTC2945 devices, since there is no register 307ebd8b66SMauro Carvalho Chehabwhich can be safely used to identify the chip. You will have to instantiate 317ebd8b66SMauro Carvalho Chehabthe devices explicitly. 327ebd8b66SMauro Carvalho Chehab 337ebd8b66SMauro Carvalho ChehabExample: the following will load the driver for an LTC2945 at address 0x10 347ebd8b66SMauro Carvalho Chehabon I2C bus #1:: 357ebd8b66SMauro Carvalho Chehab 367ebd8b66SMauro Carvalho Chehab $ modprobe ltc2945 377ebd8b66SMauro Carvalho Chehab $ echo ltc2945 0x10 > /sys/bus/i2c/devices/i2c-1/new_device 387ebd8b66SMauro Carvalho Chehab 397ebd8b66SMauro Carvalho Chehab 407ebd8b66SMauro Carvalho ChehabSysfs entries 417ebd8b66SMauro Carvalho Chehab------------- 427ebd8b66SMauro Carvalho Chehab 437ebd8b66SMauro Carvalho ChehabVoltage readings provided by this driver are reported as obtained from the ADC 447ebd8b66SMauro Carvalho Chehabregisters. If a set of voltage divider resistors is installed, calculate the 457ebd8b66SMauro Carvalho Chehabreal voltage by multiplying the reported value with (R1+R2)/R2, where R1 is the 467ebd8b66SMauro Carvalho Chehabvalue of the divider resistor against the measured voltage and R2 is the value 477ebd8b66SMauro Carvalho Chehabof the divider resistor against Ground. 487ebd8b66SMauro Carvalho Chehab 497ebd8b66SMauro Carvalho ChehabCurrent reading provided by this driver is reported as obtained from the ADC 507ebd8b66SMauro Carvalho ChehabCurrent Sense register. The reported value assumes that a 1 mOhm sense resistor 517ebd8b66SMauro Carvalho Chehabis installed. If a different sense resistor is installed, calculate the real 527ebd8b66SMauro Carvalho Chehabcurrent by dividing the reported value by the sense resistor value in mOhm. 537ebd8b66SMauro Carvalho Chehab 547ebd8b66SMauro Carvalho Chehab======================= ======================================================== 557ebd8b66SMauro Carvalho Chehabin1_input VIN voltage (mV). Voltage is measured either at 567ebd8b66SMauro Carvalho Chehab SENSE+ or VDD pin depending on chip configuration. 577ebd8b66SMauro Carvalho Chehabin1_min Undervoltage threshold 587ebd8b66SMauro Carvalho Chehabin1_max Overvoltage threshold 597ebd8b66SMauro Carvalho Chehabin1_lowest Lowest measured voltage 607ebd8b66SMauro Carvalho Chehabin1_highest Highest measured voltage 617ebd8b66SMauro Carvalho Chehabin1_reset_history Write 1 to reset in1 history 627ebd8b66SMauro Carvalho Chehabin1_min_alarm Undervoltage alarm 637ebd8b66SMauro Carvalho Chehabin1_max_alarm Overvoltage alarm 647ebd8b66SMauro Carvalho Chehab 657ebd8b66SMauro Carvalho Chehabin2_input ADIN voltage (mV) 667ebd8b66SMauro Carvalho Chehabin2_min Undervoltage threshold 677ebd8b66SMauro Carvalho Chehabin2_max Overvoltage threshold 687ebd8b66SMauro Carvalho Chehabin2_lowest Lowest measured voltage 697ebd8b66SMauro Carvalho Chehabin2_highest Highest measured voltage 707ebd8b66SMauro Carvalho Chehabin2_reset_history Write 1 to reset in2 history 717ebd8b66SMauro Carvalho Chehabin2_min_alarm Undervoltage alarm 727ebd8b66SMauro Carvalho Chehabin2_max_alarm Overvoltage alarm 737ebd8b66SMauro Carvalho Chehab 747ebd8b66SMauro Carvalho Chehabcurr1_input SENSE current (mA) 757ebd8b66SMauro Carvalho Chehabcurr1_min Undercurrent threshold 767ebd8b66SMauro Carvalho Chehabcurr1_max Overcurrent threshold 777ebd8b66SMauro Carvalho Chehabcurr1_lowest Lowest measured current 787ebd8b66SMauro Carvalho Chehabcurr1_highest Highest measured current 797ebd8b66SMauro Carvalho Chehabcurr1_reset_history Write 1 to reset curr1 history 807ebd8b66SMauro Carvalho Chehabcurr1_min_alarm Undercurrent alarm 817ebd8b66SMauro Carvalho Chehabcurr1_max_alarm Overcurrent alarm 827ebd8b66SMauro Carvalho Chehab 837ebd8b66SMauro Carvalho Chehabpower1_input Power (in uW). Power is calculated based on SENSE+/VDD 847ebd8b66SMauro Carvalho Chehab voltage or ADIN voltage depending on chip configuration. 857ebd8b66SMauro Carvalho Chehabpower1_min Low lower threshold 867ebd8b66SMauro Carvalho Chehabpower1_max High power threshold 877ebd8b66SMauro Carvalho Chehabpower1_input_lowest Historical minimum power use 887ebd8b66SMauro Carvalho Chehabpower1_input_highest Historical maximum power use 897ebd8b66SMauro Carvalho Chehabpower1_reset_history Write 1 to reset power1 history 907ebd8b66SMauro Carvalho Chehabpower1_min_alarm Low power alarm 917ebd8b66SMauro Carvalho Chehabpower1_max_alarm High power alarm 927ebd8b66SMauro Carvalho Chehab======================= ======================================================== 93