On Fri, Nov 10, 2017 at 02:21:26PM +0000, Ard Biesheuvel wrote:
> Add the power button as a gpio-keys KEY_POWER button, and mark it as
> a wakeup source so it can be used under the OS both as a 'sleep' and
> as a 'wake' button.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <[email protected]>

Reviewed-by: Leif Lindholm <[email protected]>

> ---
>  Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts 
> b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
> index 6ae7d5f300b6..d2cd7ef90e6f 100644
> --- a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
> +++ b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts
> @@ -15,9 +15,23 @@
>  
>  #include "SynQuacer.dtsi"
>  
> +#define KEY_POWER     116
> +
>  / {
>      model = "Socionext Developer Box";
>      compatible = "socionext,developer-box", "socionext,synquacer";
> +
> +    gpio-keys {
> +        compatible = "gpio-keys";
> +        interrupt-parent = <&exiu>;
> +
> +        power {
> +            label = "Power Button";
> +            linux,code = <KEY_POWER>;
> +            interrupts = <GIC_SPI 120 IRQ_TYPE_EDGE_FALLING>;
> +            wakeup-source;
> +        };
> +    };
>  };
>  
>  &gpio {
> -- 
> 2.11.0
> 
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to