Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp343786imn; Wed, 27 Jul 2022 07:49:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ugJMClBZrqBrXJKw8kM32PIpI/GmtoKsSHZLkpL8IU54CMnmqMh+HeNUYvAFfC3FtiGH3J X-Received: by 2002:a17:906:6a1c:b0:72f:2174:13db with SMTP id qw28-20020a1709066a1c00b0072f217413dbmr16826277ejc.687.1658933354780; Wed, 27 Jul 2022 07:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658933354; cv=none; d=google.com; s=arc-20160816; b=F8HXyGKzWHktk4Rx+NDEHmJgHxRp+AmVttJ6gB0J6h34Gs29OsKTqM2nfsOwXv7TNT ydGwNEIGJcwXsf0F5y+GHi9Zd3lremDh6SC3cq6EAj7uXPcvFuZQpDCDBmTXSClTOrFK 9Ft1XR/zaTbuGaBHKvq84Pucbjri//0J9Garg9ER7LBZm8kBqYMMST42v6CwVM114twq cFQJW6EUm60HtQMl2abNFXVlWzQU1TLOys89slkeyuLZ4V7tB9h0njrqnCxIC/iiKkkX vSxD1jucpRv9/MqdZjNRYeDRDkJ1uY9xAjgBRxvh50luIXT2sFvDbtKUW2EzJuKe0sJi vfSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zK2lTYN74IqKqZwsLWQgkra8zcwd3I1tBfPS/duxTDE=; b=T/TYA57tioJSPRhuTClNGzlM2nTLJhBuARU2kadoKHfegtAhOFvPG3t9PadrLUHI+Y /mGgNVMLpshtkwGlx8Gl/+bu7ZaNH1sNm7odR4UgbN/c36JOob5KS52WNlZE/gpLg84b i9RA3vWVQuO2yP4oxg8j91FL73FIGV1c4b710tphIvS+WxY0QoKwzqC5FGfsC+pSt0Ta +WbtMjpQmRsS4Nne+DtG4CrDWYtq6C9dZgVgRee/rPMXfN/6AkoKDbSnrgjt6OJVhgoH i2yVJyQCsRkhvyLZFtfv1EcvhHg4EPmyYgDVX6tKBL5TCD+bP+ez4aml5sbCReMKDMhT 58NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eP1FhJrW; 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 m19-20020a056402431300b0043bcb2650d9si6111334edc.42.2022.07.27.07.48.49; Wed, 27 Jul 2022 07:49:14 -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=eP1FhJrW; 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 S232579AbiG0N54 (ORCPT + 99 others); Wed, 27 Jul 2022 09:57:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbiG0N5x (ORCPT ); Wed, 27 Jul 2022 09:57:53 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F201F2F9 for ; Wed, 27 Jul 2022 06:57:52 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id p5so10487572edi.12 for ; Wed, 27 Jul 2022 06:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=zK2lTYN74IqKqZwsLWQgkra8zcwd3I1tBfPS/duxTDE=; b=eP1FhJrWO5R/3mIx4/oX2k7sNSEnfKppdcAjLwrGJf5LY+avDukYGRSUnzk2W87wPj hqh+0MCjd3iqzYW2AvCBCA4y/gA9838FMw/qMHm6SwHsmzXcPrz1eqeYGjs103YiGO8H ld7zOZomaTT3RyGZ9wzl0FMRQLObuHrgpNLcs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=zK2lTYN74IqKqZwsLWQgkra8zcwd3I1tBfPS/duxTDE=; b=JyXHsy7UzmYoDLHFLMzySHodXs9kZk1EjGQYlSCyn2VnOiB7ULLfGG3dWg4R0Qo0Yp qHlHSMHxV20mgUiHaoh1XO/1BfRYyhwzfMa8gili9JJbX0FxdsRGT6TO7/Ik44LmdK6j hR4XVnzoRiknewOCN2WdFxqpBl9SySBYmCc3R2dTWDnSlWGcdYA/DrTohmvwzfRbOaqk bWICOS0vGbMsoGf5evg7IbRVgMvmlDSx7+ThfHLFNFTyQ31Pfta6fa4qp9iweAipUe0E jdBFZsR7L6LL+fixaqu9Udqy/hz+wC4cn3LhzM3n4CS8pLP62LLKLd3VA4KMQDOU2o7h E9vA== X-Gm-Message-State: AJIora93YaeZWQYjKVSMpvjs7R2M9djBnTHcUwBdjJJeYUdppgEqG9rh InIFfKgHZtxsERieWl+DXcHMQ9AshXckY/6m X-Received: by 2002:a05:6402:5212:b0:43a:ad74:b336 with SMTP id s18-20020a056402521200b0043aad74b336mr23234757edd.16.1658930271136; Wed, 27 Jul 2022 06:57:51 -0700 (PDT) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com. [209.85.221.47]) by smtp.gmail.com with ESMTPSA id v15-20020aa7dbcf000000b0043bbc9503ddsm10258204edt.76.2022.07.27.06.57.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jul 2022 06:57:50 -0700 (PDT) Received: by mail-wr1-f47.google.com with SMTP id k11so23892880wrx.5 for ; Wed, 27 Jul 2022 06:57:50 -0700 (PDT) X-Received: by 2002:a05:600c:2e48:b0:3a3:1ce3:3036 with SMTP id q8-20020a05600c2e4800b003a31ce33036mr3078599wmf.188.1658930260190; Wed, 27 Jul 2022 06:57:40 -0700 (PDT) MIME-Version: 1.0 References: <20220725174810.1.If1f94fbbdb7c1d0fb3961de61483a851ad1971a7@changeid> <661fa514-cd37-e062-3294-c844b7f0b894@quicinc.com> In-Reply-To: <661fa514-cd37-e062-3294-c844b7f0b894@quicinc.com> From: Doug Anderson Date: Wed, 27 Jul 2022 06:57:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Freedreno] [PATCH] drm/msm/dsi: Don't set a load before disabling a regulator To: Abhinav Kumar Cc: Rob Clark , Dmitry Baryshkov , freedreno , Loic Poulain , Jonathan Marek , David Airlie , Rajeev Nandan , linux-arm-msm , Vladimir Lypak , Konrad Dybcio , dri-devel , Bjorn Andersson , Vinod Koul , Mark Brown , Marijn Suijten , Daniel Vetter , AngeloGioacchino Del Regno , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Stephen Boyd , Sean Paul , LKML Content-Type: text/plain; charset="UTF-8" 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 Hi, On Tue, Jul 26, 2022 at 4:53 PM Abhinav Kumar wrote: > > On 7/25/2022 5:49 PM, Douglas Anderson wrote: > > As of commit 5451781dadf8 ("regulator: core: Only count load for > > enabled consumers"), a load isn't counted for a disabled > > regulator. That means all the code in the DSI driver to specify and > > set loads before disabling a regulator is not actually doing anything > > useful. Let's remove it. > > > > It should be noted that all of the loads set that were being specified > > were pointless noise anyway. The only use for this number is to pick > > between low power and high power modes of regulators. Regulators > > appear to do this changeover at loads on the order of 10000 uA. You > > would a lot of clients of the same rail for that 100 uA number to > > I guess you meant "you would need a lot of clients" Yeah, sorry. :( I'll fix it up if I need a v3. > > @@ -259,15 +259,7 @@ static inline struct msm_dsi_host *to_msm_dsi_host(struct mipi_dsi_host *host) > > static void dsi_host_regulator_disable(struct msm_dsi_host *msm_host) > > { > It seems like now we can drop this function dsi_host_regulator_disable() > entirely and just call regulator_bulk_disable() ? Sure, if you want. One could still argue that it provides a tiny bit of abstraction and avoids the caller from having to know where to find the number of regulators and all that, but I can go either way. Is this worth a v3, do you think? If so, I might tack it on at the end of the series. Note that I say "v3" because I actually included this patch in a larger series and called that series "v2" [1]. [1] https://lore.kernel.org/r/20220726173824.1166873-1-dianders@chromium.org