The power sensor (INA260) driver opened multiple times for the same file descriptor shuts down the sensor when getting closed.
Steps
start the app with infinite read:
ina260 -d /dev/ina260 -r 0
start another process with fewer reads:
ina260 -d /dev/ina260 -r 5
The second process finishes read operations, it closes the device file.
ina260_close() function makes the device go into power-down operating mode.
The first app continues to run and print measurements which values do not change anymore.
Summary
The power sensor (INA260) driver opened multiple times for the same file descriptor shuts down the sensor when getting closed.
Steps
start the app with infinite read:
ina260 -d /dev/ina260 -r 0
start another process with fewer reads:ina260 -d /dev/ina260 -r 5
The second process finishes read operations, it closes the device file.ina260_close()
function makes the device go into power-down operating mode. The first app continues to run and print measurements which values do not change anymore.