From patchwork Sun Apr 22 23:07:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 133935 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp368466lji; Sun, 22 Apr 2018 16:10:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+MUs400Z+mAZz+Hd6nzhp/FF8nbTAxOU47uZz76ewLINdwnZ8uXChP+0TfeqzYXoHW5ik/ X-Received: by 10.99.172.86 with SMTP id z22mr15128167pgn.411.1524438634579; Sun, 22 Apr 2018 16:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524438634; cv=none; d=google.com; s=arc-20160816; b=tlIz6/lTqrIYHNl9RgUP9q4ZPfGQ0aw5vI0j1CnaTt/RenylY0hUwcsLFnX2pQCuit v/ihUuhNCs442k1eGujqfVTYL/9imy5Qdm37x2aDxxjFgdLqrBVmxcNuHzDxkQpCc4nz +zWskVpwP+MoCu6RAw2ZKAyK4/R97IBVkQOOebOtdk0/sQbVZUIM2zDBR94MZ60CzLqb /9+cnLTXvxb1UApG6X5zY3b2rtuIc2jL/cYunkrAmPTpGDAXp67rKfsB1MkwFEmzmBT7 z+ln2qsSaysHm8TX5q4fgjL8Zj0gqkm0P9WVdeTgoy7AsU4n0aZMMfy41ocuvgs2t/3L Rvfg== 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=ZENkhQU7zTpQN9LGfjyuw03GMh8z6wKObvw+kB1WNOY=; b=yj54XE+OAvaNEDThWUr+rhMk6sdTDIBP08X6ExBQOq6zWzxGOI7ymPqblEHP1UEJTj VZOTrQ46mipNJPKgIYG88ClEIv6DZsKKD52GuzqT1mWMkM1TKGfNUrtFxOZU50D2djyh sRVn2llwkwykJdnUakPFy1U3Bvgxcb7wITgUzDzOiyJ48SMAYHdxy9rQkWZbnMXvcIyo AYSXdnouWrZL0P9lq4LN0CRpvs7KQ+RIGSNbL/IqOk86fhrR7+5ybt0wfw2bbJ5DzQaF DG3i9R+zciX32vl+MgueFvEk0dE5Z+8repK1jdfM5WG2aXUtowsKFgeAw7ZKkOvJlvwp QQtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aOz6j0r0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 r79si10157542pfb.149.2018.04.22.16.10.33; Sun, 22 Apr 2018 16:10:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aOz6j0r0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753944AbeDVXKb (ORCPT + 6 others); Sun, 22 Apr 2018 19:10:31 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:46534 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753915AbeDVXK1 (ORCPT ); Sun, 22 Apr 2018 19:10:27 -0400 Received: by mail-lf0-f66.google.com with SMTP id j68-v6so12183601lfg.13 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=b3sw5H6Xa1V0XVxAeHh6jFdSJrSbZXNSmUe+jCwp1DqDGiPnv+TbXgHreRg6/w4SIK Xu+iCZEF5eo3Bdr1ZqLrIxyoy0gMhLnTe9jQGtUvMnmcSaHu/JiK0xxnqOR1RGBe7iFz kD+QcmBKl4lTyuuRqkWvQ+2jV51f361fAfh/PNlY9LggsxAcyny5E2hX1NR19C6dMhcO f7BJidMYvqUrX4v9iWZEgRQwYnmYYGYFupeVXlyOkFp6L6+okWJTchUSYaafbTNlHXQI H8Lm2AkBszXOtwKmcvesnJ7R+msKA+a5rzrmx9865Y4NfF4YA+TmxEzUbLbxEEjI1d6u 0ZMA== X-Gm-Message-State: ALQs6tAUJoHpbQ59juZsIxpkfP1KAfcoX+hVympdxGYbHFrQhaxKojVH PPAOdoU9TbzRKdJH24PTgjmb8w8Zyu4= 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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.