mirror of
https://gitlab.com/manzerbredes/ina260-sysfs-driver.git
synced 2025-12-22 08:47:25 +00:00
Driver for ina260 (sysfs)
| .gitignore | ||
| ina2xx.c | ||
| ina260.c | ||
| Makefile | ||
| README.md | ||
INA260 Linux Drivers
This project provides two drivers:
ina2xx.cthat is compatible with hwmonina260.cthat provides an entire support for registers and fields of the ina260 and maximize performance over compatibility
Installation
$ make
$ sudo insmod ina260.ko
Managing INA260 devices
- Add device:
echo ina260 [devaddr] > /sys/bus/i2c/devices/<bus>/new_device - Delete device:
echo [devaddr] > /sys/bus/i2c/devices/<bus>/delete_device
Sysfs structure for the ina2xx.c
You will mostly use the lm-sensors utility.
Sysfs structure for the ina260.c
- Overview:
tree /sys/kernel/ina260 - You can access to each device registers in
/sys/kernel/ina260/<device>/registers/ - You can access to each device register fields in
/sys/kernel/ina260/<device>/fields/ - You can access to the currently measured current, voltage and power via
/sys/kernel/ina260/<device>/<power|current|voltage>(units are watts, amperes and volts respectively)
For more informations on the registers/fields, please refer to the ina260 datasheet.
Notes
- Tested so far on a Beaglebone Black with a Mikrobus Cape with up to four ina260 devices attached.