I am trying to get a gpio line (GPIO29) on a wr703n to be recognised as a button.
I want this as it seems the easiest way to have system polling of the state of it without tying up CPU.
So I edited: openwrt/trunk/target/linux/ar71xx/files/arch/mips/ath7/mach-tl-wr703n.c to look like this:
snip snip
#define TL_WR703N_GPIO_LED_SYSTEM 27
#define SENSOR_BTN_29 29
static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = TL_WR703N_KEYS_DEBOUNCE_INTERVAL,
.gpio = TL_WR703N_GPIO_BTN_RESET,
.active_low = 0,
},{
.desc = "sensor",
.type = EV_KEY,
.code = BTN_1,
.debounce_interval = TL_WR703N_KEYS_DEBOUNCE_INTERVAL,
.gpio = SENSOR_BTN_29,
.active_low = 1,
}
};
But when I toggle the sensor (ie GPIO29) from low to high and back, nothing shows in the syslog (via logview, the real button shows actions).
What am I missing?
I have included all gpio related addons in the build.