Buttons

The LS1043S has two buttons: S2 the the front of the board, and S3 (routed to a header, for user to connect).

These have been defined as gpio-keys-polled nodes in the device tree, and can be used with kmod-gpio-keys-polled.

Events can be seen by monitoring /dev/input/event0, as the evtest program does:

root@LEDE:/# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      gpio-keys-polled
Select the device event number [0-0]: 0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys-polled"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 141 (KEY_SETUP)
    Event code 529 (KEY_WPS_BUTTON)
Properties:
Testing ... (interrupt to exit)
Event: time 1511482717.970418, type 1 (EV_KEY), code 141 (KEY_SETUP), value 1
Event: time 1511482717.970418, -------------- SYN_REPORT ------------
Event: time 1511482719.954408, type 1 (EV_KEY), code 141 (KEY_SETUP), value 0
Event: time 1511482719.954408, -------------- SYN_REPORT ------------
Event: time 1511482722.962993, type 1 (EV_KEY), code 529 (KEY_WPS_BUTTON), value 1
Event: time 1511482722.962993, -------------- SYN_REPORT ------------
Event: time 1511482724.978993, type 1 (EV_KEY), code 529 (KEY_WPS_BUTTON), value 0
Event: time 1511482724.978993, -------------- SYN_REPORT ------------