Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save digitalsanity/fed66755d02de3ee6dcc1ecb92731861 to your computer and use it in GitHub Desktop.
Save digitalsanity/fed66755d02de3ee6dcc1ecb92731861 to your computer and use it in GitHub Desktop.
gpio-keys {
> + compatible = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;
#address-cells and #size-cells aren't necessary here.
> + autorepeat;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&power_key>;
> +
> + button@0 {
Nit: this doesn't have a reg property, so shouldn't have a unit address
in the name either - it could be named "button0" or just "button", or
maybe "power-key".
> + debounce-interval = <100>;
> + gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
> + label = "GPIO Key Power";
> + linux,code = <KEY_POWER>;
> + linux,input-type = <1>;
The binding explicitly defines 1 to be the default value, so it
shouldn't really need to be specified.
> + wakeup-source;
> + };
> + };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment