From patchwork Mon Jul 23 17:52:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 10540665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 070DD90E3 for ; Mon, 23 Jul 2018 17:53:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D5726247 for ; Mon, 23 Jul 2018 17:53:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7A1726255; Mon, 23 Jul 2018 17:53:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B26926247 for ; Mon, 23 Jul 2018 17:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=zfcGdrZknNp5w2cPt5BhyHJkHRMzOQ+WLDxwmj90dW4=; b=BY3Ysun530+cf91oD6oawMeJoP +ctkRh7JGVvMM8EwnX9uyqhSuGEEgqK6KAL/KeMRmfcYk6mWkZXNpMrJWLmA6HULzz1tEkto5WwT3 G72FD25gtmjYlbsDUIGje5i/gHqLCwpDEj4JgrMjz+b4iEVlbqZzGHkVAMSKWH1SN8L4+ga+OpONv Sr8mUiAk809MbyTEl0LdLv+J+7ep442AYaiX5l/LG8uZ8o4ytGiOeUAwB3/R2ItXa2xM6wWIn5zol 7FI03wH2HxdXymsEDlPhhEhYDApGP5a3o5T0S5TJVs69iujWCbM95aTcrhwejD0gfsY1K+KXDJllZ +1MMYh1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhf1m-0006gL-Dy; Mon, 23 Jul 2018 17:53:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhf1i-0006bC-57 for linux-arm-kernel@lists.infradead.org; Mon, 23 Jul 2018 17:53:43 +0000 Received: from localhost.localdomain (xdsl-188-155-58-14.adslplus.ch [188.155.58.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B980420874; Mon, 23 Jul 2018 17:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532368421; bh=tKPSf+D2z0OCLIPOJxZvK8sk0GtgRDMApnmY7mKKonI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mprcodZdeXi+eVkF1WyXdRIY+/MSSaYOXaZkOrUGRt5fvkXEuxSFVfSRMy14C0I8v o8ak7ySK+BybD34dC4U7oyS94EzgnW/dtUs69QilfKEn9kgnz8z6qCD6eDevrR+1Ps u2SZxmv7zJvDac45Dj2vqc6bOPtJBUL98J+aanpU= From: Krzysztof Kozlowski To: Tomasz Figa , Krzysztof Kozlowski , Sylwester Nawrocki , Linus Walleij , Rob Herring , Mark Rutland , Kukjin Kim , Russell King , Kyungmin Park , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFT v2 03/10] pinctrl: samsung: Document hidden requirement about one external wakeup Date: Mon, 23 Jul 2018 19:52:55 +0200 Message-Id: <20180723175302.22535-4-krzk@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180723175302.22535-1-krzk@kernel.org> References: <20180723175302.22535-1-krzk@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_105342_342128_020FCEC5 X-CRM114-Status: GOOD ( 12.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sylwester Nawrocki , Chanwoo Choi , Pankaj Dubey , Alim Akhtar , =?utf-8?q?Pawe=C5=82_Chmiel?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hardware (S5Pv210 and all Exynos SoCs) provides only 32 external interrupts which can wakeup device from deep sleep modes. On S5Pv210 these are gph0-gph3. On all Exynos designs these are gpx0-gpx3. There is only one 32-bit register for controlling the external wakeup interrupt mask (masking and unmasking waking capability of these interrupts). This lead to implementation in pinctrl driver and machine code which was using static memory for storing the mask value and not caring about multiple devices of pin controller... because only one pin controller device will be handling this. Since each pin controller node in Device Tree maps onto one device, this corresponds to hidden assumption in parsing the Device Tree: external wakeup interrupts can be defined only once. Make this assumption an explicit requirement. Signed-off-by: Krzysztof Kozlowski Cc: Tomasz Figa Cc: Sylwester Nawrocki Acked-by: Tomasz Figa Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt index 5e00a21de2bf..f7700c9e0d0b 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt @@ -145,8 +145,13 @@ A. External GPIO Interrupts: For supporting external gpio interrupts, the B. External Wakeup Interrupts: For supporting external wakeup interrupts, a child node representing the external wakeup interrupt controller should be - included in the pin-controller device node. This child node should include - the following properties. + included in the pin-controller device node. + + Only one pin-controller device node can include external wakeup interrupts + child node (in other words, only one External Wakeup Interrupts + pin-controller is supported). + + This child node should include following properties: - compatible: identifies the type of the external wakeup interrupt controller The possible values are: