Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2479750pxk; Mon, 14 Sep 2020 14:46:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS6M1/T9MJ0Y2zxk0t1kfHv5rAtK+Rfmvr1EgGURyHnVgUv34tUcdyTHLoVjzm5dk7g5DC X-Received: by 2002:a50:9d0a:: with SMTP id v10mr18912240ede.144.1600119978686; Mon, 14 Sep 2020 14:46:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600119978; cv=none; d=google.com; s=arc-20160816; b=bv1VXiP05/6cKxo5sWZaB5wrSYIwUZIPYv3U4ALaUlHC/yrxDYNN3FabGzoj2uKDJ3 PuIXpxxC1anuzyItOrQhS5X5Bh6+gcY9ml1ABMrjTXeOibUL2kQhj6QE0mEycG4lEVPD Kp57PHSiHujVFCBMz9KeURr/o9wWFPtKJYekHLXyJqYLEzsI8jZrtU1YYdE5pQPGFIYW p/BJwLGpTVZpvexjvuZvZBAAFK3TlRFHXFK4BwmudZZ4l7Z0DN4ly5TJHrdCp1ojJjt5 IFxxhDesr39rzgFDY5Yo2MpheaNq98ZNGIzrjKGUbSycG3y5GVeuZ8FHYxMSMWXSXoHk g+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z+VVp1S1/1mEp4bh4MChiZeax7qY5irCWr9wzBp6vkg=; b=BF1yvxlD1Ti/zNRKOz3AdHUCIwrkYEny7mx2JrVDnVzhx8ntCDZflA2bUh0DfG0uXC guee12ezwE0DDKi/nu3WuFf19H1aZAeUSNAkqKP1zfi4L5P6Eu2yzBoGWMCt2jyAmS46 IWgLV+ARUsEy2BnU17n8vJ98Q8Rs5OAajsmGDGfzIF9y6d2sIhwK8ea8n0QM/AgPQRER GP6aS5Iw/ZG+MFDmLUfn3RwSESGiht2TmuqnULTaIsYl1/0L0xz6+zdoWyEb0HPUThTI OTII7aAWrjYtp/lg+ENV38ff1fthOcjuQIJeHsmRHZ2p+tY0VVcZKHQK1MF705OqaCEP oL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=m3Y1PIBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu20si8154758edb.311.2020.09.14.14.45.55; Mon, 14 Sep 2020 14:46:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=m3Y1PIBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726193AbgINVpB (ORCPT + 99 others); Mon, 14 Sep 2020 17:45:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbgINVoR (ORCPT ); Mon, 14 Sep 2020 17:44:17 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC545C06178C; Mon, 14 Sep 2020 14:44:08 -0700 (PDT) Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 94C2723E47; Mon, 14 Sep 2020 23:44:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1600119847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z+VVp1S1/1mEp4bh4MChiZeax7qY5irCWr9wzBp6vkg=; b=m3Y1PIBnAJ7ZfyFUZboU6MLBZZDJXJspu+LTPNMyNz4ajDAdQbjof3iwju3FBcbgGdxPxP 7YJO69Dx551zJPh21R22e57XZvJBwWbGllumHe7aqly8EIR/gJwEeJW8kvgW/rJRFLRSSz Sr78xtxAfdER3VpJkyHO4enZOiPN9VA= From: Michael Walle To: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Linus Walleij , Bartosz Golaszewski , Rob Herring , Jean Delvare , Guenter Roeck , Lee Jones , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Mark Brown , Greg Kroah-Hartman , Andy Shevchenko , Catalin Marinas , Will Deacon , Pavel Machek , Michael Walle Subject: [PATCH v10 10/13] arm64: dts: freescale: sl28: map GPIOs to input events Date: Mon, 14 Sep 2020 23:43:38 +0200 Message-Id: <20200914214341.14268-11-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200914214341.14268-1-michael@walle.cc> References: <20200914214341.14268-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we have support for GPIO lines of the SMARC connector, map the sleep, power and lid switch signals to the corresponding keys using the gpio-keys and gpio-keys-polled drivers. The power and sleep signals have dedicated interrupts, thus we use these ones. The lid switch is just mapped to a GPIO input and needs polling. Signed-off-by: Michael Walle --- Changes since v9: - none Changes since v8: - none Changes since v7: - none Changes since v6: - none Changes since v5: - none Changes since v4: - none Changes since v3: - see cover letter .../freescale/fsl-ls1028a-kontron-sl28.dts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts index 5fdf4ec8b39f..f46eb47cfa4d 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts @@ -9,6 +9,8 @@ /dts-v1/; #include "fsl-ls1028a.dtsi" #include +#include +#include / { model = "Kontron SMARC-sAL28"; @@ -23,6 +25,36 @@ spi1 = &dspi2; }; + buttons0 { + compatible = "gpio-keys"; + + power-button { + interrupts-extended = <&sl28cpld_intc + 4 IRQ_TYPE_EDGE_BOTH>; + linux,code = ; + label = "Power"; + }; + + sleep-button { + interrupts-extended = <&sl28cpld_intc + 5 IRQ_TYPE_EDGE_BOTH>; + linux,code = ; + label = "Sleep"; + }; + }; + + buttons1 { + compatible = "gpio-keys-polled"; + poll-interval = <200>; + + lid-switch { + linux,input-type = ; + linux,code = ; + gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>; + label = "Lid"; + }; + }; + chosen { stdout-path = "serial0:115200n8"; }; -- 2.20.1