diff mbox series

[v13,8/8] ARM: dts: turris-omnia: Add GPIO key node for front button

Message ID 20240701113010.16447-9-kabel@kernel.org (mailing list archive)
State Accepted
Commit ade990619444234d96ee5a79ca6305474c6c687b
Delegated to: Arnd Bergmann
Headers show
Series Turris Omnia MCU driver | expand

Commit Message

Marek Behún July 1, 2024, 11:30 a.m. UTC
Now that we have the MCU device-tree node, which acts as a GPIO
controller, add GPIO key node for the front button.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 .../boot/dts/marvell/armada-385-turris-omnia.dts    | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Andrew Lunn July 1, 2024, 1:01 p.m. UTC | #1
On Mon, Jul 01, 2024 at 01:30:10PM +0200, Marek Behún wrote:
> Now that we have the MCU device-tree node, which acts as a GPIO
> controller, add GPIO key node for the front button.
> 
> Signed-off-by: Marek Behún <kabel@kernel.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Gregory CLEMENT July 5, 2024, 12:46 p.m. UTC | #2
Marek Behún <kabel@kernel.org> writes:

> Now that we have the MCU device-tree node, which acts as a GPIO
> controller, add GPIO key node for the front button.
>
> Signed-off-by: Marek Behún <kabel@kernel.org>

Applied on mvebu/dt

Thanks,

Gregory

> ---
>  .../boot/dts/marvell/armada-385-turris-omnia.dts    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
> index 59079d63fe27..43202890c959 100644
> --- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
> +++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
> @@ -112,6 +112,19 @@ sfp: sfp {
>  		status = "disabled";
>  	};
>  
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		front-button {
> +			label = "Front Button";
> +			linux,code = <KEY_VENDOR>;
> +			linux,can-disable;
> +			gpios = <&mcu 0 12 GPIO_ACTIVE_HIGH>;
> +			/* debouncing is done by the microcontroller */
> +			debounce-interval = <0>;
> +		};
> +	};
> +
>  	sound {
>  		compatible = "simple-audio-card";
>  		simple-audio-card,name = "SPDIF";
> -- 
> 2.44.2
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
index 59079d63fe27..43202890c959 100644
--- a/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
+++ b/arch/arm/boot/dts/marvell/armada-385-turris-omnia.dts
@@ -112,6 +112,19 @@  sfp: sfp {
 		status = "disabled";
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		front-button {
+			label = "Front Button";
+			linux,code = <KEY_VENDOR>;
+			linux,can-disable;
+			gpios = <&mcu 0 12 GPIO_ACTIVE_HIGH>;
+			/* debouncing is done by the microcontroller */
+			debounce-interval = <0>;
+		};
+	};
+
 	sound {
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "SPDIF";