Forums » Software Development »
Reading out the LTC2945
Added by Jonas Mair over 3 years ago
Hey,
I am currently benchmarking my design and want to know the power draw by the system. Under https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Power_Supply_Requirements I read, that there is a chip on the board, which gives me exactly that, but in the datasheet under the listed I2C devices, this chip is not shown. What is the I2C Address of this chip or how would I go about reading that chip out? Do you maybe have an already working driver for that?
If not, is there another way to read out the power draw of the system?
Regards
Jonas
Replies (2)
RE: Reading out the LTC2945 - Added by Tim Iskander over 3 years ago
Jonas,
the schematic for the baseboard is available here... https://support.criticallink.com/redmine/attachments/download/22646/80-000578RC-10_SCH_RevB.PDF
The LTC2945 is at address 6F on I2C bus 1
There is user-space hwmon entry for this device (if you are using the CL provided device tree)
/sys/class/hwmon/hwmon1
cat /sys/class/hwmon/hwmon1/power1_input will show you the power used on the 5V rail, although it is in strange units
on a dev kit here, I get
root@mitysom-c5:~# cat /sys/class/hwmon/hwmon1/power1_input 18523750
which corresponds to 1.85 Watts.
The corresponding driver is drivers/hwmon/ltc2945.c in the linux kernel source tree
cheers
/Tim
RE: Reading out the LTC2945 - Added by Jonas Mair over 3 years ago
Thanks for the information Tim, that helps a lot.
I've got a custom dev tree, but then I know where to look and copy the entry from^^
Regards
Jonas