Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7474628ybi; Mon, 8 Jul 2019 22:42:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKoSW59U0Xx3CGgCUrZEsocT0ZlHKbHNJ5AzMA4lnUukgvWIZVd22g/TI9JTk3n00JEKrK X-Received: by 2002:a63:e610:: with SMTP id g16mr17128705pgh.392.1562650953412; Mon, 08 Jul 2019 22:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562650953; cv=none; d=google.com; s=arc-20160816; b=GVyu6oK2fd0xw+xSW/VWrOBofk5vuDacI3QjkBHHwsQxU04ibqwgvDlSiAAb4J5asQ /kCaz2Dyq9/fZduRWczphRIRXj6D6WqdWrlDJnRUJOe094lpjF0Zzefoe2WoNu+ks0Uk VoKVbCMJ3EZTDmKC8KEuOIUkaFx8g8/Z8OWnqywZfOqanwjt9N8zURfDgAKVFlUAs6zw /G1/c4qGpwhAaycnQvGsACtuBK9bSJtawRmoSLELaXVu+NDeO5BUdsQ/CCQ9E/UzffzU gyROaCGifGjc4U1hkkI+UYijEMHTtKOCy25DSTi9wpebG/W4+OHC7NnSOjjJgh2bUkbh 1TVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oNfoBSAVs4HwlcfNYsclg/dP1n0XavIgjkMDpD1mPiY=; b=IWlZeoP7FCYivt79WnP6Gfvf2LCNLsP4kvPUbvbokpvB6hzDpzIpF7XCxAXTJXtFng g/x6exNVIpOlp3N2t0DNcMu7iZP8uh+jGqZKl0e64WeZAA3CguVHxC2a4hRf7eA/3cdf 8W8F8H/AxbO9Jon7nI3WymPU2NpoQWeVUhgOfJiJWWkO3ezx2cvSh8IFXdw0dVAK7kp5 DBdVo0cyZYto7DtNWx5wU7ysWp/WaoSq/PfwNcghHyp5ENAaa4ancS3EEDFVzHAusubZ dJ7LD1ecGsH/QYHzcZdcmC+XIvwn0/NWXB5ynS7ptlBLHdpnRiL3iJ8/NInFx69AckCh 1wEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qj/En8SA"; 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 l35si242491plb.186.2019.07.08.22.42.18; Mon, 08 Jul 2019 22:42:33 -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=@linaro.org header.s=google header.b="qj/En8SA"; 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 S1726917AbfGIFkU (ORCPT + 99 others); Tue, 9 Jul 2019 01:40:20 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45037 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbfGIFkT (ORCPT ); Tue, 9 Jul 2019 01:40:19 -0400 Received: by mail-pl1-f193.google.com with SMTP id t14so6382868plr.11 for ; Mon, 08 Jul 2019 22:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oNfoBSAVs4HwlcfNYsclg/dP1n0XavIgjkMDpD1mPiY=; b=qj/En8SAcjlo3abd1feAIjM0u/Mro4Llh0ow4E5dJPGEUYTgknUTKxU1/i+J3jWMBN p25OPQsFgd7UEZdsGY6Ix40FcQTMNKciT4LNWrGbY+OeyG9jIxEI2RBpPnmpn5e8ORa4 k0mt57EeQt3A48ZZOsXkdS5epjRbA1SLO1Ka2SyShqNIbp0lVHJWqYVmsT6VR8FFtQsK DFhDLtC7yfbeY27Br1XDph3bkoPnKvgG1iMFUaOUBpyUvVBo8OUPEIO6Xvo+5OHjrrUe qRGZfmT4Bcz6Y4Fkj1e6/gkz2Y8JL8TLEthi+V2VYj2DUGcr0fiiOU+Jeg2nsd4X3lBK Jjyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oNfoBSAVs4HwlcfNYsclg/dP1n0XavIgjkMDpD1mPiY=; b=fqZo/A/ZLziwU8ZFjng41mYeQm7CVGxzfyDqa4Y9YukBQvNN5wAmuZdH4aoubT3es+ 2yqp1eRh5jdjVRRX4MYZlLpjfdbO4PoAdU0IMXUD1N3KVFOchJd0GfGuXor7MODx9smH Rcm7v3WEFm4HCS6TSKisZpl+6WcVJ5H2w2gPRx5QZ4b1Y1JefQZC649/vJo2blE0BuyS +rz+LjTd99YLCGr0PnKIQD14tBqpk2aX7gpD2LjIChhJLByh7Qztu83rSPim1vrKnQqh xHEVMsX5y88lJgesjGRkgl/tVzw9xpYRazIzuh2S35mHgcIHgZlgVndwe9ocuhhdsPc8 m59Q== X-Gm-Message-State: APjAAAXV4o1Ghqiunu7m396Z1fcSYN2BGnuVj98CQkQ2l+MwPAD/wtqO jVSh5fkIl6f1b6/ROZ1Mh3bN3A== X-Received: by 2002:a17:902:b20c:: with SMTP id t12mr29930984plr.285.1562650818025; Mon, 08 Jul 2019 22:40:18 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id l31sm41547789pgm.63.2019.07.08.22.40.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jul 2019 22:40:16 -0700 (PDT) Date: Tue, 9 Jul 2019 11:10:14 +0530 From: Viresh Kumar To: k.konieczny@partner.samsung.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH 1/3] opp: core: add regulators enable and disable Message-ID: <20190709054014.o3g4e6gbovrq3vvn@vireshk-i7> References: <20190708141140.24379-1-k.konieczny@partner.samsung.com> <20190708141140.24379-2-k.konieczny@partner.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190708141140.24379-2-k.konieczny@partner.samsung.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-07-19, 16:11, k.konieczny@partner.samsung.com wrote: > From: Kamil Konieczny > > Add enable regulators to dev_pm_opp_set_regulators() and disable > regulators to dev_pm_opp_put_regulators(). This prepares for > converting exynos-bus devfreq driver to use dev_pm_opp_set_rate(). > > Signed-off-by: Kamil Konieczny > --- > drivers/opp/core.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index 0e7703fe733f..947cac452854 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -1580,8 +1580,19 @@ struct opp_table *dev_pm_opp_set_regulators(struct device *dev, > if (ret) > goto free_regulators; > > + for (i = 0; i < opp_table->regulator_count; i++) { > + ret = regulator_enable(opp_table->regulators[i]); > + if (ret < 0) > + goto disable; > + } I am wondering on why is this really required as this isn't done for any other platform, probably because the regulators are enabled by bootloader and are always on. -- viresh