Received: by 10.192.165.148 with SMTP id m20csp2812146imm; Sun, 22 Apr 2018 16:12:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/NXksQFtcYYropsZAcDgOSZRmNR5DSA4sj/BM5480fMFSxIKQGs2b7iKJVPB5Wa5iOu28Q X-Received: by 10.98.228.13 with SMTP id r13mr17816531pfh.51.1524438763251; Sun, 22 Apr 2018 16:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524438763; cv=none; d=google.com; s=arc-20160816; b=PmEodA5vQan/eAGbCNGoVsq0V0Q8OZFJH+1In0NoFQJ6pIfGBU5Jmty3WGbkuCIe6E LLER0LvBZg9+888Af4zqg2pjRzO749W7PnGo6vyAm4fKuGXQytyZPZy+yEbjkRHE2+GD DLf6QOzhLEThtyI4+0nEwIlsgn1pK92JcT2f65kXQuIPgjWLx8kgCGLb7WgPoA99ejxO 2Vhp/xrIQNesdj5/U8BJbZTrz6o/ockIsLDv8YtrlrrylWehnP/j4B94g7StRx+iyFF0 rMLu4yfQCt5P4Y6TWtLZomZowSXBkwhkf7eiTUxhQ5hnBCKEodQsCMpbg7m4pfrXvWmT VVKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4Gdi/lMqQ+/6Vzj5M5AB63enLtETmTSXQp/6yCzh1wo=; b=B4vZYnho7HjtNYbGjWAjbWHtFvL4qPcuxJ9cK5u9CrJ3kxMCeK+8/PSklrXKfKmFnV X/pN36FQuwXV/a29rB581ZLiIRkZk90dLACc3NzMr/0OAYnjXtKBncjI16E16iEN/D2/ s7Mp8vtzAsedEyIRRMdHGjD2R476EfY5oAFHjyVlDheWkvRD40fQ04dfv3fjUQtvqOTf Nv5HAS11oivFk4dKjdwHBVU2XhPQpoNZ/GVGSZQDa7+rOikKeMqxm4atvWrQQzjBRQ27 /odPyqIFPbxNNxYXEkAxz6nJLOKfuI/pSESQOFadRgsuRh/YiaZ3jPabmOJ2bKDK9muJ Kyzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOz6j0r0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3-v6si10053245plb.17.2018.04.22.16.12.03; Sun, 22 Apr 2018 16:12:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOz6j0r0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753975AbeDVXKk (ORCPT + 99 others); Sun, 22 Apr 2018 19:10:40 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33510 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753939AbeDVXK1 (ORCPT ); Sun, 22 Apr 2018 19:10:27 -0400 Received: by mail-lf0-f65.google.com with SMTP id y15-v6so4103589lfj.0 for ; Sun, 22 Apr 2018 16:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4Gdi/lMqQ+/6Vzj5M5AB63enLtETmTSXQp/6yCzh1wo=; b=aOz6j0r0Tk9o8fx+9ysvP9GbNnhVJCCTyMqZN93C6rNdPhTHVVTkkNTrUl+mLNzHUE FPvdOu2DM1JEXQtPpxK8SV9Hwm1GG/KveXNIWR7Ko6B1HzX8twiyQWCP4hZDMRtfSIUo QtpLtb1CffnSvBVjzXhlIU1e6EwjRFw9pN5CE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4Gdi/lMqQ+/6Vzj5M5AB63enLtETmTSXQp/6yCzh1wo=; b=mGvDpxN5cRn79/9ivj3nEy/dvexIH2HuWJZcuV1AGbY2TW8YiDZIuSoLnFkH3Th7xs K0e4zd+qfdqOc4u7CuWx2x7CqDs0hG2WRfSOsXFwewUufkhEFmuE35iFDqhgER+LHib0 EBE3hZnU9cTPLBeIXHkXaSdK7WAvFTUnEFJlii4ks+FykUwTCKf1E8UU16pfvJQ446PZ omuAio460L++usawCQHiuAd4M13d1H/svaOCZKMPi3RX1aF+W2v5+Iisue19lTjQgxet cE4QLYQLS8ouqO+Dj/U8VttktHVc49vzP0x4zUeT+3NtEWvGQsL7QeFQE5d3zBrG92C4 P5kw== X-Gm-Message-State: ALQs6tB5bjhhfclFoxHu08+rPVq7Mm4EYzmpGGzthancE5A/CkJzvHC+ TiOahB7fK1hmKrz7W2CZULP+HQ== X-Received: by 2002:a19:9f10:: with SMTP id i16-v6mr7349327lfe.29.1524438626326; Sun, 22 Apr 2018 16:10:26 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id r25sm2036291ljc.8.2018.04.22.16.10.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Apr 2018 16:10:25 -0700 (PDT) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 16/18 v2] regulator: fixed/gpio: Update device tree bindings Date: Mon, 23 Apr 2018 01:07:40 +0200 Message-Id: <20180422230742.3729-16-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180422230742.3729-1-linus.walleij@linaro.org> References: <20180422230742.3729-1-linus.walleij@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Deprecate the open drain binding for fixed regulator and indicate that we prefer this to be passed in the GPIO phandle flags. Clarify that the line inversion semantics for fixed and GPIO regulators completely overrides the active low flags in the phandle flags. Unfortunately this can not be changed to prefer that we pass the flags in the phandle: the bindings have been specified and deployed such that the presence/absence of this flag and only that controls the line inversion semantics. The crucial semantic is that the absence of the flag means the core will assume the line is active low, which in GPIO terms is an exception, as GPIO lines are normally assumed to be active high. This special device tree semantic cannot be changed without introducing a whole new compatible string for the fixed and GPIO regulators, so we just contain the situation. Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collect Rob's ACK. --- .../devicetree/bindings/regulator/fixed-regulator.txt | 13 +++++++++++-- .../devicetree/bindings/regulator/gpio-regulator.txt | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt index 0c2a6c8a1536..a7a1cd0dfa6e 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt @@ -8,10 +8,19 @@ Optional properties: - gpio: gpio to use for enable control - startup-delay-us: startup time in microseconds - enable-active-high: Polarity of GPIO is Active high -If this property is missing, the default assumed is Active low. + If this property is missing, the default assumed is Active low. + If the phandle flags to the GPIO handle also flag the line as active + low or high, that will be ignored for fixed regulators and the + presence or absence of this flag solely controls the inversion + semantics. +-vin-supply: Input supply name. + +Deprecated properties: - gpio-open-drain: GPIO is open drain type. If this property is missing then default assumption is false. --vin-supply: Input supply name. + Do not use this property in new device trees: instead use the + phandle flag to indicate to the GPIO provider that the line + should be handled as open drain. Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt index 1f496159e2bb..8fef3e5358a2 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt @@ -14,6 +14,10 @@ Optional properties: defualt is LOW if nothing is specified. - startup-delay-us : Startup time in microseconds. - enable-active-high : Polarity of GPIO is active high (default is low). + If the phandle flags to the GPIO handle also flag the line as + active low or high, that will be ignored for fixed regulators + and the presence or absence of this flag solely controls the + inversion semantics. - regulator-type : Specifies what is being regulated, must be either "voltage" or "current", defaults to voltage. -- 2.14.3