Hi, I’m currently porting a project to Jetpack 5.1.1 from Jetpack 4.6. On the project we use iio to monitor ina3221 to check for power, voltages and currents. We enabled the CONFIG_INA3221 on tegra_defconfig and made a couple of changes so the driver was able to compile, but the attributes do not show up, not sure if the path is the same as JP4, I’m looking on /sys/bus/i2c/drivers/ina3221x, the folder does show up after said changes but the attributes are not there. The changes are:
Change 1:
indio_dev->dev.parent = &client->dev;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->driver_module = THIS_MODULE; // Added this on the ina3221_probe method
ret = devm_iio_device_register(chip->dev, indio_dev);
if (ret < 0) {
Also upon checking the Kconfig I see that it’s deprecated:
config INA3221
tristate "[DEPRECATED] TI INA3221 3-Channel Shunt and Bus Voltage Monitor"
depends on I2C
help
TI INA3221 is Triple-Channel, High-Side Measurement, Shunt and Bus
Voltage Monitor with I2C Interface
Say Y here if you have INA3221 hooked to a I2C bus.
It there a replacement or something similar or something else that I can do to enable the attributes, or do we need to implement our own driver attributes? Also not sure if it’s as simple as I’m looking on the wrong path, since I know that the normal drivers attributes paths did change a bit with the new kernel.
Jetson Xavier NX series has one INA3221 power monitor at I2C address 0x40
the node is under… /sys/bus/i2c/drivers/ina3221/7-0040/hwmon/hwmon<x>
BTW,
I’ve also check a Xavier NX flashed with JP-5.1.1,
INA3221 is default enabled. it’s able to check for power, voltages and currents via INA3221.
for example,
Hi, @JerryChang, actually that link you just sent has the info that I need, I was going to get into the driver and check what each attribute was, but that link has the table with what I need. Thanks