Other Parts Discussed in Thread: INA226
Hello!
It seems the way to measure the power consumption using the INA226:es as described here is no longer valid.
The newer versions of the k3-j721e-common-proc-board.dts is defining the exp2 - gpio expander, and hogs the
line that switches between the two sets of INA226 chips.
How can I measure all of the 32 values in this setup? The drivers for the gpio expanders are loaded, so
I have tried the following:
root@j7-evm:~# gpiodetect gpiochip0 [3-0020] (16 lines) gpiochip1 [3-0022] (24 lines) gpiochip2 [6-0020] (8 lines) gpiochip3 [9-0020] (8 lines) gpiochip4 [42110000.gpio] (84 lines) gpiochip5 [600000.gpio] (128 lines) gpiochip6 [601000.gpio] (36 lines) gpiochip7 [4-0020] (8 lines)
The chip that controls the i2c-switch for the INA226:es is gpiochip1 (on main_i2c0, which is i2c bus 3).
The expander looks like this:

The lines have these names/numbers:
root@j7-evm:~# gpioinfo
...
gpiochip1 - 24 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed "fixedregulator-sd" output active-high [used]
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed "CTRL_PM_I2C_OE" output active-high [used]
line 9: unnamed "MCASP/TRACE_MUX_S0" output active-high [used]
line 10: unnamed "MCASP/TRACE_MUX_S1" output active-low [used]
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed "reset" output active-high [used]
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
So I tried to see what value line 8 had:
root@j7-evm:~# gpioget gpiochip1 8 gpioget: error reading GPIO values: Device or resource busy
How can I change the output of that port so that I can read the other 16 INA226 measurements?
Thanks,
/Bo

