From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A405C433F5 for ; Fri, 20 May 2022 15:09:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346067AbiETPJq (ORCPT ); Fri, 20 May 2022 11:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244681AbiETPJl (ORCPT ); Fri, 20 May 2022 11:09:41 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AADF08B0A4; Fri, 20 May 2022 08:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653059380; x=1684595380; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=P2WilbSU+L9bjk1wqlq1ZZlucavYPq5P1Ib9UN6A/h8=; b=kwm3ZlXpmFUSQ2CyWWh7RZojfkz0WRxeF0x7NmY2CCP9N32VOFVNWlZQ MF4KtyHIunxqGtgxPrETlZPwdFEGJ54nWabyDlWwWLKH7S7g6vtIv5aJ7 043JAtNK055OFJn+s0pGV4QqPOwuftLswECpKorbUcsNP4bxRbSWE/Ll4 o=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 20 May 2022 08:09:40 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 08:09:39 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 20 May 2022 08:09:39 -0700 Received: from [10.110.100.160] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 20 May 2022 08:09:37 -0700 Message-ID: <609bb4fc-1503-81ef-6fd8-dbb862c4ef80@quicinc.com> Date: Fri, 20 May 2022 08:09:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v6 1/3] phy: qcom-edp: add regulator_set_load to edp phy Content-Language: en-US To: Stephen Boyd , , , , , , , , , , CC: , , , , , References: <1653001902-26910-1-git-send-email-quic_khsieh@quicinc.com> <1653001902-26910-2-git-send-email-quic_khsieh@quicinc.com> From: Kuogee Hsieh In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/19/2022 5:19 PM, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2022-05-19 16:11:40) >> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c >> index cacd32f..78b7306 100644 >> --- a/drivers/phy/qualcomm/phy-qcom-edp.c >> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c >> @@ -87,14 +87,19 @@ struct qcom_edp { >> >> struct clk_bulk_data clks[2]; >> struct regulator_bulk_data supplies[2]; >> + int enable_load[2]; >> }; >> >> static int qcom_edp_phy_init(struct phy *phy) >> { >> struct qcom_edp *edp = phy_get_drvdata(phy); >> int ret; >> + int i; >> >> - ret = regulator_bulk_enable(ARRAY_SIZE(edp->supplies), edp->supplies); >> + for (i = 0; i < 2; i++) > Use ARRAY_SIZE(edp->supplies)? > >> + regulator_set_load(edp->supplies[i].consumer, edp->enable_load[i]); >> + >> + ret = regulator_bulk_enable(2, edp->supplies); > Why is ARRAY_SIZE() usage removed? remove it base on Dmitry's comment. I will restore it back to use ARRY_SIZE > >> if (ret) >> return ret; >>