| /* |
| * Device Tree Overlay for polled GPIO keyboard on r8a7795/salvator-x |
| * |
| * Copyright (C) 2015 Glider bvba |
| * |
| * This file is licensed under the terms of the GNU General Public License |
| * version 2. This program is licensed "as is" without any warranty of any |
| * kind, whether express or implied. |
| */ |
| |
| /dts-v1/ /plugin/; |
| |
| #include <dt-bindings/gpio/gpio.h> |
| #include <dt-bindings/input/input.h> |
| |
| / { |
| fragment-keyboard { |
| target-path = "/"; |
| |
| __overlay__ { |
| keyboard-sw2 { |
| compatible = "gpio-keys-polled"; |
| poll-interval = <20>; |
| |
| /* TODO Enable internal pull-up */ |
| key-a { |
| gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; |
| label = "SW20"; |
| linux,code = <KEY_A>; |
| }; |
| key-b { |
| gpios = <&gpio6 12 GPIO_ACTIVE_LOW>; |
| label = "SW21"; |
| linux,code = <KEY_B>; |
| }; |
| key-c { |
| gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; |
| label = "SW22"; |
| linux,code = <KEY_C>; |
| }; |
| }; |
| }; |
| }; |
| }; |