From patchwork Fri Mar 15 09:26:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanley Chu X-Patchwork-Id: 10854355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B75C13B5 for ; Fri, 15 Mar 2019 09:26:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 849602A8EC for ; Fri, 15 Mar 2019 09:26:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78AEC2A8EE; Fri, 15 Mar 2019 09:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B49E82A8EC for ; Fri, 15 Mar 2019 09:26:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728690AbfCOJ00 (ORCPT ); Fri, 15 Mar 2019 05:26:26 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:22282 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727282AbfCOJ00 (ORCPT ); Fri, 15 Mar 2019 05:26:26 -0400 X-UUID: ba0e314d278e4d209f58f88aac52f935-20190315 X-UUID: ba0e314d278e4d209f58f88aac52f935-20190315 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 939416432; Fri, 15 Mar 2019 17:26:17 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 15 Mar 2019 17:26:16 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 15 Mar 2019 17:26:16 +0800 From: Stanley Chu To: , , , , CC: , , , , , , Stanley Chu Subject: [PATCH v2 4/4] scsi: ufs: remove "-fixed-regulator" device tree property Date: Fri, 15 Mar 2019 17:26:14 +0800 Message-ID: <1552641974-30672-6-git-send-email-stanley.chu@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1552641974-30672-1-git-send-email-stanley.chu@mediatek.com> References: <1552641974-30672-1-git-send-email-stanley.chu@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "-fixed-regulator" device tree property can be safely removed because below things are fixed or resolved, - "-max-microamp" becomes optional property: Undefined "-max-microamp" will not cause initialization fail. - regulator_set_load operation now has rules: Only those regulators which have configured current limit from "-max-microamp" property is allowed to change its load. The difference of regulators which define "-fixed-regulator" or not is listed as below, - "-max-microamp": If an existed regulator which defined "-fixed-regulator", it shall be lack of "-max-microamp" property in device tree thus regulator_set_load behaviors will be the same as before this patch. - "vcc-supply-1p8": This only impacts "vcc-supply" regulator. However vcc shall not define "-fixed-regulator" in device tree otherwise ufshcd_config_vreg() will use zero voltage values as request to regulator_set_voltage() and may lead to unexpected results. Therefore this patch is safe for all existed regulators with "-fixed-regulator" property already used. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/ufshcd-pltfrm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index 2f244d388ca8..a667e7ba1c8b 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -151,11 +151,6 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name, vreg->name = kstrdup(name, GFP_KERNEL); - /* if fixed regulator no need further initialization */ - snprintf(prop_name, MAX_PROP_SIZE, "%s-fixed-regulator", name); - if (of_property_read_bool(np, prop_name)) - goto out; - snprintf(prop_name, MAX_PROP_SIZE, "%s-max-microamp", name); if (of_property_read_u32(np, prop_name, &vreg->max_uA)) { dev_info(dev, "%s: unable to find %s\n", __func__, prop_name);