Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1615635ybh; Mon, 20 Jul 2020 02:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxVdu62radX+BNN3rHuC7kpWABjbndtgZzJBJSk7hanqQZJmv34GPx2Tp3RYwPLZ+Pkgpt X-Received: by 2002:aa7:c353:: with SMTP id j19mr20647134edr.219.1595239049444; Mon, 20 Jul 2020 02:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595239049; cv=none; d=google.com; s=arc-20160816; b=kdrUasNDfPDjprPOgLsef3wOyKEzrnj2JaJfCC0qVwbP6FcsOX0ZSbKDdy2omjLote IeQjvjvQEwKrCT/nzyp4cwRXn38EPKpKc+HDXKDZ/AgumQs8RlvCad4i5+4fobWwnoJH nRJhonoPQOCQlOdaHFtQSd+cB/67DkzVRpHXLQqg/5S9OKiglGlQhWoWosK8ls644T0X ni3GSnSY68DmWcR6Q0Wq1k+LVQBs53Qf0j6LiZzhm+Zpya3hyIPVgNSpaRD1WRTqR+fP ybGJWe89ZNpNjihJ4bm1flfg/wUrac7sfOrKubjQ2CwW6eNGS2htlGhPn/Os7QSVGB2g dnJg== 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; bh=8TgvaC7/oHKGtUBrzwRuyP7O62U/sEWXhQcMJb1TPmA=; b=vTY/AqDspVMsF61JWJc5a+X7gjwXbAYO9idOo9rLdxQ3nkazI1jEnVZZsBReKimm8J ziraGjc8m2QT7uf25GH5a00ZEpZudwF1/60r1LMjuvl2jzKdDx/Spy4i01IZnSdwFUK9 Ackfp+259iOILz/PYA9b3t307bIYz0VYy5Hvsdx/VMAhcfmic8r+XGMTP/BmZVPgu8/q Tmx2HYCPuqBXSh2rbMhbvFbZX1dNdO5l2d7RUQNxp9iZk1C12u0wQcAiBkTYOYexxw7/ tOYCgxUC7r26hIJ/ZO7Pidq92WQxQhWIR6DazPbsQfgB0z0lMWAzh9XIu9k89ZwrSm5q Y8Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk23si11834023edb.219.2020.07.20.02.57.06; Mon, 20 Jul 2020 02:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbgGTJyT (ORCPT + 99 others); Mon, 20 Jul 2020 05:54:19 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42742 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728308AbgGTJyT (ORCPT ); Mon, 20 Jul 2020 05:54:19 -0400 Received: by mail-lf1-f67.google.com with SMTP id h8so1145194lfp.9 for ; Mon, 20 Jul 2020 02:54:17 -0700 (PDT) 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=8TgvaC7/oHKGtUBrzwRuyP7O62U/sEWXhQcMJb1TPmA=; b=W+mwoqrM8I+Caxi7ssXWVk9Q+Y3kdjBi0OoyWiCu+P5qjGUvLGhT9UA1bJfoNTg6sk 3vL2fMy7q+WGUTKLHX9vx9CKLVskf8gQBX/dbAme8W0BoB5nymkjzAceVTRuvpogS/B5 xXlTsUT0Dkh+Ns8wdEdb4L7a16KC34/zv5CNHvQUaDqsylX88x/q50KXNkn/kc3ByexF ChoUsm1vYPKLbTnQygFQq5coRY4d3ZYW5IQb8MQIs9aDsM6afw8rAkZQHvusNR+n8T1C fjBsC0830QbvtGa59x5my0kYpY9/HWi43LytnpIwEPs8j9Pn1u6siJBCsZgwsKEDp7vp yaiQ== X-Gm-Message-State: AOAM532SBLQfx2XRHe7aHDZCIipZzodfAzGYbMSC/qmT5CMJnW1uW9Mx OGaGP2VOExXFOkrihNKlQffI1X8jbjM= X-Received: by 2002:ac2:5984:: with SMTP id w4mr10543815lfn.28.1595238856442; Mon, 20 Jul 2020 02:54:16 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id r25sm3709761ljg.9.2020.07.20.02.54.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 02:54:16 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id r19so19463217ljn.12 for ; Mon, 20 Jul 2020 02:54:16 -0700 (PDT) X-Received: by 2002:a2e:3a14:: with SMTP id h20mr9503033lja.331.1595238855983; Mon, 20 Jul 2020 02:54:15 -0700 (PDT) MIME-Version: 1.0 References: <20200720094449.32282-1-wens@kernel.org> In-Reply-To: <20200720094449.32282-1-wens@kernel.org> From: Chen-Yu Tsai Date: Mon, 20 Jul 2020 17:54:04 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] reuglator: gpio: Honor regulator-boot-on property To: Chen-Yu Tsai Cc: Mark Brown , Liam Girdwood , linux-arm-kernel , linux-kernel , Maxime Ripard 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, Please ignore this one. I'll send v2 shortly. On Mon, Jul 20, 2020 at 5:44 PM Chen-Yu Tsai wrote: > > From: Chen-Yu Tsai > > When requesting the enable GPIO, the driver tries to do so with the > correct output level matching the current state. This is done by > checking the boot_on constraint, which is derived from the > regulator-boot-on property in the device tree. This is especially > important if the regulator is a critical one, such as a supply for > the boot CPU. > > Honor the regulator-boot-on property by checking the boot_on > constraint setting. This is the same as what is done in the fixed > regulator driver. > > Also drop support for the undocumented enable-at-boot property. This > property was not documented in the original commit introducing DT > support, nor is it now, and there are no in-tree device trees that use > this property. I'll rework the commit log so it makes more sense. (and fix the typo ...) ChenYu > Fixes: 006694d099e8 ("regulator: gpio-regulator: Allow use of GPIO controlled regulators though DT") > Signed-off-by: Chen-Yu Tsai > --- > drivers/regulator/gpio-regulator.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c > index 110ee6fe76c4..5646b7a26288 100644 > --- a/drivers/regulator/gpio-regulator.c > +++ b/drivers/regulator/gpio-regulator.c > @@ -148,7 +148,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, > > config->supply_name = config->init_data->constraints.name; > > - if (of_property_read_bool(np, "enable-at-boot")) > + if (config->init_data->constraints.boot_on) > config->enabled_at_boot = true; > > of_property_read_u32(np, "startup-delay-us", &config->startup_delay); > -- > 2.27.0 >