Driver for ina260 (sysfs)
Find a file
2023-08-12 15:27:40 +02:00
.gitignore Minor changes 2023-08-12 15:27:40 +02:00
ina260.c Change permissions and update README 2023-08-11 12:44:50 +02:00
inahwmon.c Minor changes 2023-08-12 15:27:40 +02:00
Makefile Minor changes 2023-08-12 15:27:40 +02:00
README.md Change permissions and update README 2023-08-11 12:44:50 +02:00

INA260-sysfs-driver

Link to the ina260 datasheet.

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

  • 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