From patchwork Wed Oct 21 10:09:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 55364 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 7F5312303B for ; Wed, 21 Oct 2015 10:12:27 +0000 (UTC) Received: by lffz202 with SMTP id z202sf15528584lff.3 for ; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=DKIEUUT4NxXPDqowPqEnMFdOcoldjjDpb2FWOYM8e2o=; b=Z1W7AhROwh4kRHZl9kM/C1kmWjZmKy4YFA0PLbTzoEjtcqtqOaDNbUJbexRo3JFwI2 8I9r1DyoKufoudIEombxINAdOZdBFO4JpDv6pYralRbF73H3gBoGZctHJP5PtsagDjIc brU7kic4teaDnvkGM+13deEq5UeEsiSqgZSHl2+MkAat4gQvTm0pKpRnnVj62UVK3LA8 RGqWUzLeSza7xwk7nDqumPz9w+5siL2t/CKVOjrd+52M9aSMjkwlYCH4tU0/ux0i0Vpd BrZZW5oBkQJOcktiwTw1eBWIiEadAybMnw9VtekubQAUEitBp9Ezap/DhQlXASfkARdV pfMw== X-Gm-Message-State: ALoCoQkyzOZ89JcHAKwhiJ+UjiQZ4h/JWZQV/EdOD7kIR683Jgxd4cJailf5bXQnwiJQGdIU5Pnf X-Received: by 10.112.55.69 with SMTP id q5mr1914465lbp.24.1445422346395; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.39.6 with SMTP id n6ls166758lfn.36.gmail; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) X-Received: by 10.112.201.1 with SMTP id jw1mr4688676lbc.107.1445422346248; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id f196si5788600lfe.50.2015.10.21.03.12.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:12:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lffv3 with SMTP id v3so18540804lff.0 for ; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) X-Received: by 10.25.40.130 with SMTP id o124mr2982473lfo.41.1445422346102; Wed, 21 Oct 2015 03:12:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2595476lbq; Wed, 21 Oct 2015 03:12:25 -0700 (PDT) X-Received: by 10.67.22.97 with SMTP id hr1mr9605630pad.81.1445422345014; Wed, 21 Oct 2015 03:12:25 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ad8si12249958pad.214.2015.10.21.03.12.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqMX-0002rq-Jp; Wed, 21 Oct 2015 10:11:17 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqMH-0002jY-At for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 10:11:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D712C31E; Wed, 21 Oct 2015 03:10:34 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6969D3F308; Wed, 21 Oct 2015 03:10:38 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 01/19] Documentation: devicetree: standardize/consolidate on "wakeup-source" property Date: Wed, 21 Oct 2015 11:09:58 +0100 Message-Id: <1445422216-29375-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> References: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_031101_465627_020A07C9 X-CRM114-Status: GOOD ( 13.78 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: Mark Rutland , Ian Campbell , Rob Herring , Pawel Moll , Sudeep Holla MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Currently different drivers use multiple forms of annotating devices that should be set up as wakeup sources for the system. This patch adds a separate binding document inorder to standardize and consolidate to use "wakeup-source" boolean property to mark the devices as wakeup capable. Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Signed-off-by: Sudeep Holla Acked-by: Rob Herring --- .../devicetree/bindings/power/wakeup-source.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/wakeup-source.txt diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt new file mode 100644 index 000000000000..963c6dfd484d --- /dev/null +++ b/Documentation/devicetree/bindings/power/wakeup-source.txt @@ -0,0 +1,71 @@ +Specifying wakeup capability for devices +============================================ + +Any device nodes +---------------- +Nodes that describe devices which has wakeup capability must contain an +"wakeup-source" boolean property. + +Also, if device is marked as a wakeup source, then all the primary +interrupt(s) can be used as wakeup interrupt(s). + +However if the devices have dedicated interrupt as the wakeup source +then they need to specify/identify the same using device specific +interrupt name. In such cases only that interrupt can be used as wakeup +interrupt. + +List of legacy properties and respective binding document +--------------------------------------------------------- + +1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt +2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt +3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt +4. "isil,irq2-can-wakeup-machine" Documentation/devicetree/bindings/rtc/isil,isl12057.txt +5. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt + Documentation/devicetree/bindings/mfd/tc3589x.txt + Documentation/devicetree/bindings/input/ads7846.txt +6. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt +7. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt +8. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt + +Examples +-------- + +1. With "wakeup" interrupt name + + device@10000 { + compatible = "vendor,device-id"; + reg = <0x10000 0x1000>; + interrupts = <0 19 4>, <0 21 4>, <0 22 4>; + interrupt-names = "ack", "err", "wakeup"; + wakeup-source; + }; + +2. Without "wakeup" interrupt name + + embedded-controller { + compatible = "google,cros-ec-i2c"; + reg = <0x1e>; + interrupts = <6 0>; + interrupt-parent = <&gpx1>; + pinctrl-names = "default"; + pinctrl-0 = <&ec_irq>; + wakeup-source; + }; + +3. Without interrupts + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + debounce_interval = <50>; + wakeup-source; + linux,code = <116>; + label = "POWER"; + gpios = <&iofpga_gpio0 0 0x4>; + }; + [....] + };