Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1922168lqm; Fri, 3 May 2024 10:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVmTP+SOFgMSoirOSfwDlhHwEda4iq754il8eqYQinCfbjS4d1HhKtEqvxJxYD9oz5AlIol/GREGs00NAVdWSLMyuv7tioh7SM2ShWDw== X-Google-Smtp-Source: AGHT+IHYN9/zC05x1Ux4zAJWcP9ydaGwPcnYvb5aa6kVUJKwU0vm76LUKX5sW8Fo8/2eMrIHCn6P X-Received: by 2002:a17:902:ab8b:b0:1eb:156f:8d01 with SMTP id f11-20020a170902ab8b00b001eb156f8d01mr2960123plr.40.1714755845578; Fri, 03 May 2024 10:04:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714755845; cv=pass; d=google.com; s=arc-20160816; b=sTIwuD4Jb2g0WywqHSO1bkiXb4f40EiAWQm05Zp5Wet4oRYeXBiexrCb9NFZ+RJ1Bt Apozu9UGXABklItKHYBQHQ1qRltxtbXeVMYEbgPIMzgtcwTUeEwzmNAI34Go400yoq5L 7RbjX0e3+s1XaFhRnwQxAPyps96lfRauWBmWqQ7jcbcb5Z2mSDtjnaf6zORXRWCAR//q 9VB61j5fO/a9QKMxL8ti5Kt/vuTvRbxiSAFW09rh18C7L3yE7EKGAFKTefOyxM4x3rOH J0Xz8TFPhpfgvgSGd6E/sedLZvSfyBCdokfSiVA064lPTm9NZuwkpjAGG4VIBz7HfGdv uN+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=TVSe7pluKfDVQULV/YyS5WvGtcPrWiyKGEQwMLGF11s=; fh=VdHpCztFMu40UWbAk02MA9Yi33661xmO8hmEfT/r9bc=; b=g9XmhqUI+klGf3D2nsx3lgqJf1OnjwFEk6tpFDnQNOYPl3SbJl6bzS6ItJ+mxCaWa9 EI568CXRtFKS4ct+0SoFHf3W47fFrWwAkJcisxBBq9YWcAYRkfpDDuyqPQBFW5x0Z0hx gQ4E2mKFSmpISRHfYi1z3ZDkLSIwFspbHy/dE3XjOJjiUH1vDr5le5tLsfy9dsuoOvdc xowziKvDLObG/jn/uAM064HgZno0nTvxW+lkFCpN/G+00cOJ5Oe1nDnB03qT4x3sABs3 CILhNtqRLS4May3XFkydDz/tFPGBeiFRc5GVRb+X8fYb3MRBWaUUXJVjCepyaGilGvLe jOvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V8FLlKSg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-167943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167943-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r18-20020a170903015200b001e5893023c1si2276419plc.150.2024.05.03.10.04.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 10:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V8FLlKSg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-167943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167943-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 48C1EB20C2F for ; Fri, 3 May 2024 17:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C1DF157A6C; Fri, 3 May 2024 17:03:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="V8FLlKSg" Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3CBB15748E for ; Fri, 3 May 2024 17:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714755837; cv=none; b=a7F47YgPO0vorc+jjVZ4EpyFSD6W1HQJOmtDxygOTZOkTN0HEj5QttwXHULjxp8TssgYlRCntlWstiw/V3L8/UgyAh89W1HpzLRuKPy6Qz8Hf+kdvouu5PQT0WHyCjH/KHGJ6OBjSV+tKA+/arkW6w5lp1GIcBsMCJT8eZ4h1cA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714755837; c=relaxed/simple; bh=M/M9DK6x69gq9IrFL3EvliQhSNiVz2ig5naXalFUUzw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oJY/NddV1MlzqukROd1l6yUL8TlFSTHuVrjQdOTYwu1qHlhR/loc/JmONB9/nTcWZncrKawDjccYCxjQNyvf/QBnTBVVblYsP/n3uOtMAb+aQGPTpYualiUHB00tRrYM3EYbXozpZKZttva0Obth9y1CKQWzwha/kICzA6aJQnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=V8FLlKSg; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-78f049ddd7dso719686185a.1 for ; Fri, 03 May 2024 10:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714755833; x=1715360633; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TVSe7pluKfDVQULV/YyS5WvGtcPrWiyKGEQwMLGF11s=; b=V8FLlKSgtW32O54YEsFjMwLbr3jhdrvZKfIMYR1pgMxsZydOqBocNf66UW5MWHRKS/ Q9QnpoRPVILAy9K6Z/kWIrvo0ZvJctZsDfMSyEHtHgYgs8MfZ8A1EDqljCgUJWCqurDz LwphuVwlPFv33bG7QJmzsRQM5i2NGRg52Kmec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714755833; x=1715360633; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TVSe7pluKfDVQULV/YyS5WvGtcPrWiyKGEQwMLGF11s=; b=o52iZQALsi6GW7YHJybOhGvAdIuvaceBWNLJ9Na1IWDiJQ1qNPGzdxnssS9ejQfEqq mKdZGq5tnbaoGcksDvBfESijOTPKJWcr1FcUJxIgNtd0pYVto7iyh3bIAu0tHhRfPbPQ w+iO2oX7PTRJfMFqSep50S7EEm/qDtefj9mjuUVqXRXD3Ty1EsbI7rFhljRH8Z2ux8cq WwD0/3uM8ZNwZ4hQHw9BAVMZJ/LzveW3WdgJywF7SVScICCSy7fjDQMg1VV+4zfNYSo6 /xeiHQAOaH3jnynH0dFaUN5p/Jf63B6yGNYsG6ois8EExaIxNipXyxlfHq5myYlkrk7S QvyQ== X-Forwarded-Encrypted: i=1; AJvYcCXGdTcXVuSLU7A9HLb67qmjYWoI7jNEBQdfGTK8edvhWqqL8TvOHo2r0lqvL5OwHBohLA511l0BkVYKm8KAohJWgMmiUtOR7QyPtB0D X-Gm-Message-State: AOJu0YyzwtP+xd05nRuJbwK5b1K3x+PCPzuB2pc45XdvKjT+3g1g0QYr g+zVTUU3boMuEkgheYGfoAAzU2n580GSqlr3UBe4gVPhYIbCKYLOX2I491w12TPNpEGywGsvxJI b9Q== X-Received: by 2002:a05:6214:b6f:b0:69b:3661:6d34 with SMTP id ey15-20020a0562140b6f00b0069b36616d34mr3679230qvb.25.1714755833554; Fri, 03 May 2024 10:03:53 -0700 (PDT) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com. [209.85.160.178]) by smtp.gmail.com with ESMTPSA id e3-20020ad442a3000000b006a0d72cd7fasm1359033qvr.86.2024.05.03.10.03.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 May 2024 10:03:52 -0700 (PDT) Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-43ae23431fbso1771cf.0 for ; Fri, 03 May 2024 10:03:52 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXhtRvVOVYXL3v+g3c+7Cf/uTCIqrex52+TOXcLAgq8qWHYoo3a8ewcXkBnGEyGr1v1j9IUtD4Cdt0KIln37TL3gvWFpj+Ez+bD+zPn X-Received: by 2002:a05:622a:1a91:b0:43a:c278:83f9 with SMTP id d75a77b69052e-43cdbebd9ebmr3461811cf.3.1714755831481; Fri, 03 May 2024 10:03:51 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240404-drop-panel-unregister-v1-0-9f56953c5fb9@linaro.org> <20240404-drop-panel-unregister-v1-5-9f56953c5fb9@linaro.org> In-Reply-To: <20240404-drop-panel-unregister-v1-5-9f56953c5fb9@linaro.org> From: Doug Anderson Date: Fri, 3 May 2024 10:03:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/6] drm/panel: novatek-nt36672a: stop calling regulator_set_load manually To: Dmitry Baryshkov Cc: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Matthias Kaehlcke , Harigovindan P , Ritesh Kumar , Sumit Semwal , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Apr 4, 2024 at 3:08=E2=80=AFAM Dmitry Baryshkov wrote: > > Use .init_load_uA part of the bulk regulator API instead of calling > register_set_load() manually. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu= /drm/panel/panel-novatek-nt36672a.c > index 33fb3d715e54..3886372415c2 100644 > --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > @@ -605,21 +605,16 @@ static int nt36672a_panel_add(struct nt36672a_panel= *pinfo) > struct device *dev =3D &pinfo->link->dev; > int i, ret; > > - for (i =3D 0; i < ARRAY_SIZE(pinfo->supplies); i++) > + for (i =3D 0; i < ARRAY_SIZE(pinfo->supplies); i++) { > pinfo->supplies[i].supply =3D nt36672a_regulator_names[i]= ; > + pinfo->supplies[i].init_load_uA =3D nt36672a_regulator_en= able_loads[i]; > + } > > ret =3D devm_regulator_bulk_get(dev, ARRAY_SIZE(pinfo->supplies), > pinfo->supplies); > if (ret < 0) > return dev_err_probe(dev, ret, "failed to get regulators\= n"); > > - for (i =3D 0; i < ARRAY_SIZE(pinfo->supplies); i++) { > - ret =3D regulator_set_load(pinfo->supplies[i].consumer, > - nt36672a_regulator_enable_loads[= i]); > - if (ret) > - return dev_err_probe(dev, ret, "failed to set reg= ulator enable loads\n"); > - } Thanks for the cleanup! I happened to notice this commit and I'm curious why you didn't take the next step and move to devm_regulator_bulk_get_const(). That would have allowed you to avoid the "for" loop above that copies the data ;-) -Doug