Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp507242imm; Mon, 1 Oct 2018 13:37:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV6385TKJA18mLGR1MwCLtwupqH3KwgilHavsB8Y9JwJ1Txz/KG6FXD8epG3PJxYtcl7d70hX X-Received: by 2002:a62:9b9a:: with SMTP id e26-v6mr13307034pfk.181.1538426243763; Mon, 01 Oct 2018 13:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538426243; cv=none; d=google.com; s=arc-20160816; b=vbE1o65uHinzpnnTqrbikjC4BMn1ytLXHoegwioswOh7vH99WSJfFZ/tXb3zjKWsRk mtkvgh6RYQGSphsRPWHwI/QxqtGCuqSD/qJbJ4FzXDXN5MkOqRAv2ESxZiwgPPX6iR3r GnyC3nlZNZh649wtZvdZ0dE0Txfrc3c4nhfnpPYLX6xNjBQYv3RI1jVmsVDn6nP1DxxY ZfebEjQJIOb/J31AlpAGPyAvsVHVhTM23qVFNLOngzEml2CLkA+1f0ecLJUJQAq6vCZS 7+B7LcT3K4gTHMFAgC4HAZrKMHdVa2QYO+rdDTotyEcPbB+9FPwipEtnWGsAFl2cDCdD ki4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cVjvaYwXb1HGdrLsWE8AuKxl5M7TUaHxZjnB36ft2nM=; b=aRO8xJCEnT/hoCDMHcgJbUttM/n5ByY5gAXwuPOT8eHL++6DJ/PrLB28DvQyMhVsyb VZ48Aib2t5NyDTqA0I9Yq0A1FoKm+TzogWQi5MP4d2PRRj6VFc768D+tvCkesThtvgzr 2/TvMzyxgZdo5yiuPiX8e0d1AUpYSy+Hrrw29f12pfVoxV5B3860ykV+B27xya4KAJNW 1HvAQWiA8gmPYSf61LB8xTMSTphylox/lgopi64pKW9Wl32xCT/i1nppmYtWJfti1Jks aK7CsCFUP8+g144Sm9iL/nlPHk2smTYHv/N8x2LYffJM1jxPIGWk+x/Hav9/TcDVvEbp cEhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U9D2qS9j; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si9742305pfh.9.2018.10.01.13.37.09; Mon, 01 Oct 2018 13:37:23 -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=@gmail.com header.s=20161025 header.b=U9D2qS9j; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726282AbeJBDQT (ORCPT + 99 others); Mon, 1 Oct 2018 23:16:19 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:34076 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeJBDQT (ORCPT ); Mon, 1 Oct 2018 23:16:19 -0400 Received: by mail-ot1-f68.google.com with SMTP id i12-v6so14578476otl.1; Mon, 01 Oct 2018 13:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cVjvaYwXb1HGdrLsWE8AuKxl5M7TUaHxZjnB36ft2nM=; b=U9D2qS9jYDtY1elLFnngu45sABN/KaydMtd8pH2rEyanA8RQ9gBGzTGUtIwmabRoMd DZrwfCRAbgJVstKKodU83ikId4Iq2AVkFXnM9tqW9zPvtEEtxdVRzSy+fTLh5LPN3Vrk WMIojz93z0RLNFS/91z7MFsthAH8JAgswFFDGF40hTIW4KNCX92kQBTGyWOW7HVwWP7V wq+OGVrI0uJkZEtPXHojmtGoBpwvSamDz+G1uowzcLSxUDOfM7gtwgl5otV1tfXK0mJI JilXbKCqVpsJtUNG+xNZHYGj/KDcB9+7xl2zItZgQuvVXtByp79XHUelXB7wgJFNf3Pi y1TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cVjvaYwXb1HGdrLsWE8AuKxl5M7TUaHxZjnB36ft2nM=; b=Z+rfKwom2ybzvUy7IMiJbuS/42TDA5NRqmWib7HiET6244FVDg0v/kfHQcxJzFdoFW gNvB6fbxaFEEwC5vRlu+fEKpk8Ht13mj0eUd32c+XidGIXYsrQRBBQY8UyX1Ydo8EC8e ccykkPil6/32WmUfJ3zGC5qkHFF7qUOWZEVwCxWmebpe3t+zSqqueHhHx47pE0GRo9PS LoI6W7BZU9f+PJCTUTqoqlkJyK1DY+rNPWePRmYSz7yFLRKJMyuwwdQewd6HVvBv1Kh/ 0SY3f7+jnYU3jRk+DLxtuZDtIm317CG0bvWk8TGw+U7ZYR5uWMkxqdU8u8DWXgBHwxpn W+7A== X-Gm-Message-State: ABuFfojPez1TEatx7a3N9j1h4mSe1Alyp3WLOOmbjq21+ewzM0A7UPuC UXBcz+fLlQ96DFo+MzaZ0qMxIKX3M1cZSN/IQWg= X-Received: by 2002:a9d:209:: with SMTP id 9-v6mr7790679otb.228.1538426204424; Mon, 01 Oct 2018 13:36:44 -0700 (PDT) MIME-Version: 1.0 References: <20180906122436.25610-1-linus.walleij@linaro.org> In-Reply-To: From: Fabio Estevam Date: Mon, 1 Oct 2018 17:37:02 -0300 Message-ID: Subject: Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only To: Linus Walleij Cc: Leonard Crestez , John Stultz , Mark Brown , linux-kernel , Fugang Duan , Fabio Estevam , "open list:GPIO SUBSYSTEM" , Liam Girdwood , Shawn Guo , Yongcai Huang , Tony Lindgren , Mike Rapoport , jmkrzyszt@gmail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Mon, Oct 1, 2018 at 5:17 PM Linus Walleij wrote: > > reg_enet_3v3: regulator-enet-3v3 { > > compatible = "regulator-fixed"; > > pinctrl-names = "default"; > > pinctrl-0 = <&pinctrl_enet_3v3>; > > regulator-name = "enet_3v3"; > > regulator-min-microvolt = <3300000>; > > regulator-max-microvolt = <3300000>; > > gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; > > }; > > This is a bit odd actually, the GPIO_ACTIVE_LOW flag will > be ignored as you see: Yes, the flag will be ignored by the regulator driver, but the dts description is correct: it is an active low GPIO that turns on the reg_enet_3v3 regulator. The 'enable-active-high' flag needs to be passed to indicate an active high polarity. > > [ 0.153171] reg_fixed_voltage_probe(179): regulator-enet-3v3 call gpiod_get_optional gflags=0x7 ena_gpio_invert > > [ 0.153218] regulator-enet-3v3 GPIO handle specifies active low - ignored > > [ 0.153233] of_gpio_flags_quirks(83): regulator-enet-3v3 set active low because !enable-active-high > > Because regulators don't specify active high/low in the second > cell because of legacy bindings. > > So this should not be in the device tree anyway, it should be > GPIO_ACTIVE_HIGH or just 0. Then it would provide a wrong description that does not describe the reality.