Hello,
I am trying to access the push buttons / switches s1 to s8 on the OMAP L138 Zoom Kit UI Expander board using Linux in C++ using #include <linux/i2c-dev>.
I do an open(“/dev/i2c-1”,O_RDONLY) successfully,
and when I do an ioctl(i2c_fd,I2C_SLAVE,0x20) errno returns “Device or resource busy”.
Someone mentioned that I can access these buttons using the GPIO interface but I have no idea how the buttons are mapped to GPIO numbers.
I can access GPIO buttons successfully in my application but need to switch to I2C.
When I do a i2cdetect -l the "i2c-1" shows up. I believe that the kernel is set up correctly to see the TCA6416 device.
Has anyone done this? Is there Linux example code someplace? How are the i2c buttons mapped in GPIO numbering?
Thank you!