I am trying to add a new gpio-key to the device tree of my TX2. I am able to set it to any of the open ports in platform/c2f0000.gpio and platform/2200000.gpio as shown by cat /sys/kernel/debug/gpio. I want to be able to move this key to an I2C IO expander plugged into the board. Before I plug in the expander I am trying to run the key through one of the open gpio pins of the J21 pinout to make sure I can do this over I2C. When I move the key out of a built in GPIO section and into GPIOs 240-255, i2c/0-0074, tca9539 the key does not show up in /sys/kernel/debug/gpio. Here is my key:
gpio-keys2 {
compatible = "gpio-keys";
gpio-keys,name = "gpio-keys";
power {
label = "Fake Power";
gpios = <&gpio_i2c_0_77 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
gpio-key,wakeup;
};
};
And here is the gpio controller from i2c@3160000:
gpio_i2c_0_77: gpio@77 {
compatible = "ti,tca9539";
reg = <0x77>;
gpio-controller;
#gpio-cells = <2>;
vcc-supply = <&battery_reg>;
};
Am I missing something needed to have a gpio-key in an I2C gpio device?