The WRT350N v2 includes 2 buttons : one reset button on the rear and one button for WPS in the front.
I've seen that in the patch for led support, the button support is also implemented:
++/*
++ * Buttons attached to GPIO
++ */
++static struct gpio_keys_button wrt350n_v2_buttons[] = {
++ {
++ .code = KEY_RESTART,
++ .gpio = 3,
++ .desc = "Reset Button",
++ .active_low = 1,
++ }, {
++ .code = KEY_WLAN,
++ .gpio = 2,
++ .desc = "WPS Button",
++ .active_low = 1,
++ },
++};
++
++static struct gpio_keys_platform_data wrt350n_v2_button_data = {
++ .buttons = wrt350n_v2_buttons,
++ .nbuttons = ARRAY_SIZE(wrt350n_v2_buttons),
++};
++
++static struct platform_device wrt350n_v2_button_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .num_resources = 0,
++ .dev = {
++ .platform_data = &wrt350n_v2_button_data,
++ },
But after having added support for gpio buttons and keys, I see nothing in the /sys/devices/platform/gpio-keys directory.
Does anyone have tried to use those 2 keys ?
(Last edited by baxter104 on 18 May 2010, 00:21)