Message ID | 1581123030-12023-3-git-send-email-cang@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=8lOQ=34=lists.infradead.org=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FD8992A for <patchwork-linux-mediatek@patchwork.kernel.org>; Sat, 8 Feb 2020 00:51:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1658206DB for <patchwork-linux-mediatek@patchwork.kernel.org>; Sat, 8 Feb 2020 00:51:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f+/XqM/i"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="ZRML3xDO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1658206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tKrNUPHq+TkqeAcs8oolTvi9Z/6SFmNXr75UnbmjtNU=; b=f+/XqM/ioQeexWakN2GlqB25tX 3jKryNjFl0pM+rLBtKxLXAyR4Ex9beBGgv4KaMJynXX1+xaAQ2PcFGj9xbvhf5zhrzKQHVNn5Pfqp RW/EQ4l4kXf/a6RdAFSMMTqwVihypdG23XHpbiJ7CCSIor36lV+CIZMJ6UN8oREgexlOhwcs+hGK2 u9+FpkJFM+vGThsYLDIVdS2TD5ezMIqVO8Con8q59mJTfM/7XBMcHt4l1RmW3T5n7FvqtWY/L8BBL GgfNTnwoFRd9lPrNMAlxgRPaXQ506Vb/rs709EleySovGCdCWx/oWZiGN/5BcS0CdN+h3uA2sPRvH Xe/bjkEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0EKq-0004b3-D1; Sat, 08 Feb 2020 00:51:00 +0000 Received: from mail26.static.mailgun.info ([104.130.122.26]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0EKj-0004To-DK for linux-mediatek@lists.infradead.org; Sat, 08 Feb 2020 00:50:54 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1581123053; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=POhOlLHyX9kprQvl56dSDYTYibjR55MFDfQ2JGrYKXA=; b=ZRML3xDOpbUD87nUQcGz58FVWyNRQobW8G4yxqeai45xBmTBl/56OmseeHyiIYfWvA6omCl9 9SJdD9/edIIK5IFXK6JiTjHhlM6czmf/b0azx66wKsXOoZ63JWwFdGDzuLpa7eonyzWXBJwN hnDsxdm1hsZXkyRVjlKzVBOZoAs= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0ZDIyMyIsICJsaW51eC1tZWRpYXRla0BsaXN0cy5pbmZyYWRlYWQub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e3e05eb.7fd8416ccab0-smtp-out-n03; Sat, 08 Feb 2020 00:50:51 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4228BC447A2; Sat, 8 Feb 2020 00:50:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1F63FC433CB; Sat, 8 Feb 2020 00:50:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1F63FC433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=cang@codeaurora.org From: Can Guo <cang@codeaurora.org> To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Subject: [PATCH 2/7] scsi: ufs: set load before setting voltage in regulators Date: Fri, 7 Feb 2020 16:50:24 -0800 Message-Id: <1581123030-12023-3-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1581123030-12023-1-git-send-email-cang@codeaurora.org> References: <1581123030-12023-1-git-send-email-cang@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200207_165053_681351_D9468B1B X-CRM114-Status: GOOD ( 11.73 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [104.130.122.26 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [104.130.122.26 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Cc: Bart Van Assche <bvanassche@acm.org>, "Martin K. Petersen" <martin.petersen@oracle.com>, Venkat Gopalakrishnan <venkatg@codeaurora.org>, "James E.J. Bottomley" <jejb@linux.ibm.com>, open list <linux-kernel@vger.kernel.org>, Avri Altman <avri.altman@wdc.com>, "moderated list:ARM/Mediatek SoC support" <linux-mediatek@lists.infradead.org>, Alim Akhtar <alim.akhtar@samsung.com>, Matthias Brugger <matthias.bgg@gmail.com>, Tomas Winkler <tomas.winkler@intel.com>, Stanley Chu <stanley.chu@mediatek.com>, "moderated list:ARM/Mediatek SoC support" <linux-arm-kernel@lists.infradead.org>, Bean Huo <beanhuo@micron.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org |
Series |
None
|
expand
|
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 10dbc0c..83ae093 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7248,6 +7248,11 @@ static int ufshcd_config_vreg(struct device *dev, name = vreg->name; if (regulator_count_voltages(reg) > 0) { + uA_load = on ? vreg->max_uA : 0; + ret = ufshcd_config_vreg_load(dev, vreg, uA_load); + if (ret) + goto out; + if (vreg->min_uV && vreg->max_uV) { min_uV = on ? vreg->min_uV : 0; ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); @@ -7258,11 +7263,6 @@ static int ufshcd_config_vreg(struct device *dev, goto out; } } - - uA_load = on ? vreg->max_uA : 0; - ret = ufshcd_config_vreg_load(dev, vreg, uA_load); - if (ret) - goto out; } out: return ret;