Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5949078ybe; Tue, 17 Sep 2019 16:42:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJd1Y7rIpjNNGC3klJnjYGzAHdZC7c6w1C9k+6wp9pzkhx8HMwrqGXwHOB+zbhaEyPrWAc X-Received: by 2002:aa7:cdd6:: with SMTP id h22mr5533625edw.132.1568763734465; Tue, 17 Sep 2019 16:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568763734; cv=none; d=google.com; s=arc-20160816; b=ok9PO1jx2CgSY4kwbmQVtBjvc9GVisMso4eoM5Ci715rcv9FJL/wL0NHZ68QDbbJ6k jPQUayVsgpjDCLARFVIrWmq20fm9EiMjycMkBNfYgEdPcxlKLRu+Nq5CGit0bncy2F1L t8dPWRX5yQ/U9KTkWBPviD52dwDFCBOb6QPcL4YPmhlfELSVBgdPk3i+yMT4ELpK+iE3 FQ0JQyuegczIMc0Wq6Mkig3a4Hd+8Bt/7jvgtsgIirc+xJZLmklnDEznyIUs6BKbCh3m oL3RFzSOKdIpWyEE1+fvV4YSIrjPUUIdPvIX/0IGe/Ae5tsU+Q+jlPxQoVB8XmU9Z318 jcUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=W3y+Cg/ctBYt2ONQLl18U+t2ttumtH4nJmaatGSLaas=; b=YuNuiS7igozYA9npWFRiv0jdMcbVtkfR7sG67fWOzyMiPO4G8t2V/QsB0ThWD11rHy Oci+CZYTkJvumG5za9repBFx5iqy8nyiCFwshc6tIcl39sbZ7wsshQGouh3sMKOsxCSq mvVO0WQEAmOx1U21kQixlMxigp8r2oT19rTjbj/w0gNSr8b/EPZkZSPU57vgamv8Cxlu x/Ql0uFvgvTcHyLc8APWKNaVfF+ZkhBGYHqt2EhkvEN+iOvhxYkE1XS5/9cRjb4k7Lt/ d64bssLQXxo4Ps+ijWH4ZYVJcPHKlyc60xW6OZrd/Ik6l4VwE5F6w/Apw8Uu4ypOfW1+ nEIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si1844979ejx.56.2019.09.17.16.41.51; Tue, 17 Sep 2019 16:42:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729734AbfIQPka (ORCPT + 99 others); Tue, 17 Sep 2019 11:40:30 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:37457 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729678AbfIQPk2 (ORCPT ); Tue, 17 Sep 2019 11:40:28 -0400 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iAFaZ-0003Za-HU; Tue, 17 Sep 2019 17:40:23 +0200 Received: from mfe by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iAFaY-0003ye-G0; Tue, 17 Sep 2019 17:40:22 +0200 From: Marco Felsch To: zhang.chunyan@linaro.org, dianders@chromium.org, lgirdwood@gmail.com, broonie@kernel.org, ckeepax@opensource.cirrus.com Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 2/3] regulator: of: fix suspend-min/max-voltage parsing Date: Tue, 17 Sep 2019 17:40:20 +0200 Message-Id: <20190917154021.14693-3-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190917154021.14693-1-m.felsch@pengutronix.de> References: <20190917154021.14693-1-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the regulator-suspend-min/max-microvolt must be within the root regulator node but the dt-bindings specifies it as subnode properties for the regulator-state-[mem/disk/standby] node. The only DT using this bindings currently is the at91-sama5d2_xplained.dts and this DT uses it correctly. I don't know if it isn't tested but it can't work without this fix. Fixes: f7efad10b5c4 ("regulator: add PM suspend and resume hooks") Signed-off-by: Marco Felsch --- drivers/regulator/of_regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 9112faa6a9a0..38dd06fbab38 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -231,12 +231,12 @@ static int of_get_regulation_constraints(struct device *dev, "regulator-off-in-suspend")) suspend_state->enabled = DISABLE_IN_SUSPEND; - if (!of_property_read_u32(np, "regulator-suspend-min-microvolt", - &pval)) + if (!of_property_read_u32(suspend_np, + "regulator-suspend-min-microvolt", &pval)) suspend_state->min_uV = pval; - if (!of_property_read_u32(np, "regulator-suspend-max-microvolt", - &pval)) + if (!of_property_read_u32(suspend_np, + "regulator-suspend-max-microvolt", &pval)) suspend_state->max_uV = pval; if (!of_property_read_u32(suspend_np, -- 2.20.1