Received: by 2002:a05:6830:16d2:b0:61c:ac69:ca1b with SMTP id l18csp44144otr; Tue, 2 Aug 2022 15:44:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/JvM7hCUqZ6JD3lZ9tK5tpp3VcE0f2/A3rmP2qluqVkFCgSTGtTq5QGMQO+yjrZehqknh X-Received: by 2002:a05:6402:27cf:b0:43a:de0b:9a82 with SMTP id c15-20020a05640227cf00b0043ade0b9a82mr22694384ede.427.1659480266328; Tue, 02 Aug 2022 15:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659480266; cv=none; d=google.com; s=arc-20160816; b=SxjtTo9DXZ/o0G/3Sl8blULm53pai4bWWDLDxDm7k3AZ2gyD+hy+VcZr0nYxvwRRC8 LmneUPlbv/fwkwA3/WMSQYYdg7xw9yi+SACQqJKKHLLsLGthSKwGwR1LL1SLCNFvPSG+ 5GFrjMtyjoTon+Tm1b6cLb4DfeTxR8Yz3jrQhAUYIIWU0qjWKL/azuz9rU/S2PQNYNjC qTmVK5y6IUNpJ1gE50WJiz5R4lTC+U6YL1oLZK4Z8sbHz6bEruEpPq7DoXhQKBoat7BF IqnYasFoL2yth/9vEqj5PjpmSpwrH++LWrmvMWQINb1lubUw2im5eHL+8NUH35FTY+2+ CVKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m27JGOowCd4CHMBuXr6we9nLLOaaXmb6CU0SMlJjk1E=; b=KvPVmIJoDacwvBPbi4lXSmkrCXL1HTnbBylq6n1QOeGBuifnoSHihN3/oHLKNIOQO4 YOBhzxXnF4vPIFL08DqSdxEJf8lrhnf0alCTDNYJwVhS14z0ndYEwoPcePkKDFvnR4Gi 9olk/A2f4JBB24vq02DRNfvVxk3rmjUTh3XEsIftOkFdG+PL8UuLw5d32lYHnQwXQ77h rH2KIss25XaREpQ0aZCofWQyzPYpRBSO0rifTEs/U13KbkP1P89+dy6Oe//Te8GUL1BH GtfNIDMlRR9cM2wjg4mE7CEBeTiFqGhVaoXUwk1n9M+L49sBoX3kZJLLdou8wqya+kwW GOzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nr4YVt6s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a056402278900b0043a6ca62799si15354796ede.307.2022.08.02.15.44.01; Tue, 02 Aug 2022 15:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nr4YVt6s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237135AbiHBWiK (ORCPT + 99 others); Tue, 2 Aug 2022 18:38:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235854AbiHBWh5 (ORCPT ); Tue, 2 Aug 2022 18:37:57 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 747972A243 for ; Tue, 2 Aug 2022 15:37:56 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id w17-20020a17090a8a1100b001f326c73df6so146683pjn.3 for ; Tue, 02 Aug 2022 15:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=m27JGOowCd4CHMBuXr6we9nLLOaaXmb6CU0SMlJjk1E=; b=nr4YVt6smhF5lM8TlW5lwPq7KyfS/C26YPxmmu2Zc6EZoZdUzZvl91INVJSUWdzxrJ 8E92ORrByaq4PXG+1DZ/rK9hKKiA5dibBEeXVcKQUApeyKTltdEp/DQRHmXi2PhNDScy zh/7ZisrWQ+I0wLK62Y8uWWFBrR7gqkwXgraU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=m27JGOowCd4CHMBuXr6we9nLLOaaXmb6CU0SMlJjk1E=; b=mXTFyln7jyg1Upy+6/cZUfrhdztrRzcEPkHjNW+N/okqepg+Dxgc/9TE1jftsB6zbN yf1gBzDtqjuzT19qZLd/IliNt62D7B4FTprcPGnX5TvQpzzBpJkLCE7bolv5kQ3IVq/8 E74vQOASdamlmkV8xPsBQfxRflDzOHl4UZsgcw0gCDtDHZ5KoT+0t9JHDiGdW/dJdkkQ Emj/ZK7TSBgpV7fBZHChbDeh3tUlVU6xhiepfDW3ItB2UyV+NU2uG2IUukqkokIFE+9t Xva6vb12Jrq3RvQI2M2yybKVyL1qibbH0/JE1ZzkWaMbxJGDiXUB/VEhM4u5XXi7jPQ8 ugWg== X-Gm-Message-State: ACgBeo3ZvTLL9/f15B3YGTs4iTGi7DIKERmrzNEhlkkmeZh2yOUIdSG6 HLkiyfA7Zu5FGnaBZWXqZpS8Ag== X-Received: by 2002:a17:90b:240e:b0:1e0:775b:f8fc with SMTP id nr14-20020a17090b240e00b001e0775bf8fcmr1756001pjb.132.1659479875832; Tue, 02 Aug 2022 15:37:55 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:31c9:9937:c6bb:62f5]) by smtp.gmail.com with ESMTPSA id x185-20020a6263c2000000b00528c066678csm11353030pfb.72.2022.08.02.15.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 15:37:55 -0700 (PDT) From: Douglas Anderson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov Cc: dri-devel@lists.freedesktop.org, Mark Brown , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Douglas Anderson , Daniel Vetter , David Airlie , Jonathan Marek , Rajeev Nandan , Sean Paul , Stephen Boyd , Vinod Koul , linux-kernel@vger.kernel.org Subject: [PATCH v3 4/6] drm/msm/dsi: Use the new regulator bulk feature to specify the load Date: Tue, 2 Aug 2022 15:37:36 -0700 Message-Id: <20220802153434.v3.4.I7b3c72949883846badb073cfeae985c55239da1d@changeid> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog In-Reply-To: <20220802223738.898592-1-dianders@chromium.org> References: <20220802223738.898592-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As of commit 6eabfc018e8d ("regulator: core: Allow specifying an initial load w/ the bulk API") we can now specify the initial load in the bulk data rather than having to manually call regulator_set_load() on each regulator. Let's use it. Signed-off-by: Douglas Anderson --- Changes in v3: - Update commit message to point at the git hash of the regulator change. Changes in v2: - ("Use the new regulator bulk feature to specify the load") new for v2. drivers/gpu/drm/msm/dsi/dsi_host.c | 13 +++---------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9df278d39559..a0a1b6d61d05 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -260,8 +260,10 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host) int num = msm_host->cfg_hnd->cfg->reg_cfg.num; int i, ret; - for (i = 0; i < num; i++) + for (i = 0; i < num; i++) { s[i].supply = regs[i].name; + s[i].init_load_uA = regs[i].enable_load; + } ret = devm_regulator_bulk_get(&msm_host->pdev->dev, num, s); if (ret < 0) { @@ -270,15 +272,6 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host) return ret; } - for (i = 0; i < num; i++) { - if (regs[i].enable_load >= 0) { - ret = regulator_set_load(s[i].consumer, - regs[i].enable_load); - if (ret < 0) - return ret; - } - } - return 0; } diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 7c105120d73e..efb6b1726cdb 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -515,8 +515,10 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy) int num = phy->cfg->reg_cfg.num; int i, ret; - for (i = 0; i < num; i++) + for (i = 0; i < num; i++) { s[i].supply = regs[i].name; + s[i].init_load_uA = regs[i].enable_load; + } ret = devm_regulator_bulk_get(dev, num, s); if (ret < 0) { @@ -529,15 +531,6 @@ static int dsi_phy_regulator_init(struct msm_dsi_phy *phy) return ret; } - for (i = 0; i < num; i++) { - if (regs[i].enable_load >= 0) { - ret = regulator_set_load(s[i].consumer, - regs[i].enable_load); - if (ret < 0) - return ret; - } - } - return 0; } -- 2.37.1.455.g008518b4e5-goog