Received: by 10.223.185.116 with SMTP id b49csp2394841wrg; Mon, 12 Feb 2018 08:53:30 -0800 (PST) X-Google-Smtp-Source: AH8x226vPRtcFxED7iKB/M7R3/Eab3ln1Pe2kRHPUUO2bq0WSCa973Vk4LmP3lJoQiBSTjEOT1FM X-Received: by 10.101.65.137 with SMTP id a9mr9465367pgq.99.1518454410135; Mon, 12 Feb 2018 08:53:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518454410; cv=none; d=google.com; s=arc-20160816; b=Kixev0Y4A284noJOBLZmSe0SHlsnFETPbjjjEmiN/yo83mMxxNh3xqtChu9avqe768 VEiq1dunfs/s3wib15NNB4R16nd9eym/R1Bj0Ystc2bzrkhXL38g41uyQU3Y2XyCv+H9 SFvT8JURTW3J9U+YbTL3tQPjC8PbW++stwnwYWoA4FhB8sEj0SCWcuIocwQJ6Ev4QVmV ZiNUdsxwDLy/2PckvVqZ3E6BAYWuBpOEmX+vzm9q+06DinzLrDX+6KhV32Gnt+C5EbYn CVvh4H81JxC0S5QtWM7xXEgJFwZC7qAY7EIajSWjfbTbNqPCzMJskcO8IcxiE7TsWB70 CRWg== 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=ACvoXNAv1xVkiKV/TF4gUXrH37edKkz51gI4+hUpqdQ=; b=FxVaDWvbeQas1G6IEx3b4yPyKxczzDcY/pAINY7K4hDIDyUQmU5YqqdgA1cJwil8Vv +uqDd9l39Dy0HbzSKhTo+h/UwCQXc/DkW3VIWLQs+FGCj8Id4Wi6qcK8/sPav2yfGxoS wp/jythiPVRr3bPI1nPm0W9bk6EPuRxBPYootsRPtz1yF7s+fILaQokNihwtBbhsNMPc gqistW4j3aOP0frKl2u0znZ0mqfolr8SABwxI+jzk+xGZm5CWz3tfC8NF7T4GC9sxIPi 6qFTyGEvlb7/NyFkip9vn6WdT+4qyvXyghdlj9VYOjorKiHFa4VlrbNJv3oVTUSFI7st Ylyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IzIhjGxa; 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 v2-v6si4235916plo.525.2018.02.12.08.53.15; Mon, 12 Feb 2018 08:53:30 -0800 (PST) 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=IzIhjGxa; 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 S935354AbeBLNSP (ORCPT + 99 others); Mon, 12 Feb 2018 08:18:15 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:38499 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935318AbeBLNSL (ORCPT ); Mon, 12 Feb 2018 08:18:11 -0500 Received: by mail-lf0-f66.google.com with SMTP id g72so20372385lfg.5 for ; Mon, 12 Feb 2018 05:18:10 -0800 (PST) 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=ACvoXNAv1xVkiKV/TF4gUXrH37edKkz51gI4+hUpqdQ=; b=IzIhjGxaHCRTc+LkEyJ0PpR8x26A0y00sV5luY8IwUjEfB89U/sB3kw1qr8IOfJGFp 6Opx0nmOiyZ1lgHJs9px5dVpE6dZhkMh1E0Ua/jE5Kuiy6iTyWgxIDASq51t7reTzzjp PUfv3/gWnGfcVOAtwMT2BQgKuifgzfcoto6zQ= 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=ACvoXNAv1xVkiKV/TF4gUXrH37edKkz51gI4+hUpqdQ=; b=Hh5Q1SPbUK5xBjuohLpgktkj1HXU8Ubyp1l1GXSehP4E59O3VrYgQtXJwcdfIrCPUj TQi22bM6cXmXmMh0Ro2dleQ4Lq5UZ/3jJbnJkyji2y3iDDMAm0o8tPl7SkOcHKuH80FC CSSIk7PxQGqqLwzlbxpfrrE0lGuBRyZGC6Q6LvpJSfLEJERgq7IKd0IUCmKjhRwvqsJR ff//a+Te3mGw8MKotxNTtDOWvUQWwxkvosqidWqWAv6IW2q0eWL21Oeg4BA5gC2YUUAB YCBTzLLAsBiLv2Qvb7fqKGAyWG3F6ghMhmUxxiT2Q5VS/k98VvXRclZbEusHOwqv9aEC +nnQ== X-Gm-Message-State: APf1xPCjuBXKvq6hUbNU94dDT3ytFkFS6YGcVYMZcSSbXEHXlL7tTN4V nacOgqExA94sRzie63i6L2FnaQ== X-Received: by 10.46.29.23 with SMTP id d23mr405150ljd.7.1518441490100; Mon, 12 Feb 2018 05:18:10 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id r88sm1584648lje.30.2018.02.12.05.18.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 05:18:09 -0800 (PST) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 19/21] regulator: fixed/gpio: Update device tree bindings Date: Mon, 12 Feb 2018 14:17:15 +0100 Message-Id: <20180212131717.27193-20-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212131717.27193-1-linus.walleij@linaro.org> References: <20180212131717.27193-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 Signed-off-by: Linus Walleij --- .../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 4fae41d54798..60ce9cb8f891 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt @@ -7,10 +7,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 dd1ed789728e..06f5cb4af052 100644 --- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt @@ -12,6 +12,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