From nobody Tue Dec 2 02:30:43 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C06CD274B5F; Wed, 19 Nov 2025 14:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763562101; cv=none; b=YqJr0MODHmTi/ALzcloRy3oNfTlxcHdSI3o1fjiBtwnchDrPhF/WruTVq3We3DzIezjFsO7NW3dF3z0hM5PpjARieiTk9Bsf3KREIkbZ9WvxLPCNyRHK5N5/wBkQdeNd7rw+WqfYVRgSlv0HMzpvXSsFNOjy+wzxCCQlFfXQxhs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763562101; c=relaxed/simple; bh=W8AFvq4nPlynSNPii3uZ58RgvdVO7lLIvRxVluTsVZY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r+oA3cphiBXyswMJoXPvLBIPL8GRVKDz8SWR6jPQO4Hsb/88x8ciQsGqD+ipZmjR/b4138q71gqVY0+3kOh96ILutNMdoS1qaUq3eUWkd9VyS0IVolNQSRckgVOqV+bvHdwpggDnj7fdi0rYQWWnP9p4IskX6cW4dRP0O+10egE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eNEBUWlj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eNEBUWlj" Received: by smtp.kernel.org (Postfix) with ESMTPS id D2189C4AF0B; Wed, 19 Nov 2025 14:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763562101; bh=W8AFvq4nPlynSNPii3uZ58RgvdVO7lLIvRxVluTsVZY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=eNEBUWlj7cKXQAmn6BRhEPvy9hmojwCXj/jDVUxxAyYNLHsyRsQsakGIYxKnwyc8M ntRWMC+vUQqmA95q1IFeFwq+EIMvs2wCDTssWJP72Mv9lW/GL1Dq3b0uVnjS1M6fVD EbmpE5+YJ3bPxgBGksDwKN6skDEsNQPPa+LjscRjDx+z2PeY2mIFDZrtFq6ftMCHGp 8eMwBt5RQ4DKsGS7PuqCR16NYo9voijVAO8Ube4BDShWNvxxYYGGMNWLechEs50qI2 h14OFKgT+YdxKcYvLbcINmHF3+0j1kQWVJ1XHqNPqmpcraV3SmsRmr5g62bq0Iktwy ZE/cyKthJtEkA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1D85CF34BA; Wed, 19 Nov 2025 14:21:40 +0000 (UTC) From: David Heidelberg via B4 Relay Date: Wed, 19 Nov 2025 15:21:29 +0100 Subject: [PATCH v3 04/12] drm/panel: sofef00: Handle all regulators Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251119-sofef00-rebuild-v3-4-6cd55471e84e@ixit.cz> References: <20251119-sofef00-rebuild-v3-0-6cd55471e84e@ixit.cz> In-Reply-To: <20251119-sofef00-rebuild-v3-0-6cd55471e84e@ixit.cz> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Sam Ravnborg , Bjorn Andersson , Konrad Dybcio , Casey Connolly , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, David Heidelberg X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2667; i=david@ixit.cz; h=from:subject:message-id; bh=mwo54CYnw7MO3Xycn85wubPyOShFMxI9iCM2JhaFHcY=; b=owEBbQKS/ZANAwAIAWACP8TTSSByAcsmYgBpHdJyykQQjBPv/D6e3UV4rkYUeeOAS1ybhrMlJ 37M8wKsmZaJAjMEAAEIAB0WIQTXegnP7twrvVOnBHRgAj/E00kgcgUCaR3ScgAKCRBgAj/E00kg cp3SD/4kVvwnsf4KPZEdZ0I+Tq4vfMsljqvPEQkD7U6imv9aaIBzs1GLrLqdDvaEHhaNfkNUEv5 pW9Y8V1Z05iFkRt74VKl8sD5vSL8hK6/WQLzElQAjBYc7PFihMmbS8JntFa8XVVqlfS71JNo6p5 kn4+3OOKOcy+HIVqHEq62tFVZ9v2x9eZxCmZNsGTZq9IZ5EiC6zJ8gwjFkTFCaacq6B0e1J1My6 y63S1QliRT5eHgdyZd5TwPI/oLzWIJCtCjPpfcdc/LQoWh9fOI05gT05XzvyjVgRuuMEPk9NJj1 wRq0qo64isIAp4GCRV2q8mgIFqTWMKu8a2tjjwA+r1LAYhnnX6UD5xvHNZTelA2IbSTH7Uadycg Q8BRg78HK17Ss1JIE7HYDtDVhjnb5SkpfCE4qjgI3WW3erLazI5y7wszT0PrC0qBgiTEy44lmFW 7gGG8Xr+t6vZD8V14EotaUZg+9/cFs25Ht4v3PJXaV3GdwzJutPDZqiYLaeVEDRQO2iGSbDyOBI xLjmnW23s/8phTns4YhhA2uGtUmAu1ZtOhHlevTx08jBmNXgbWW0kiC/GBQBo4B/gPv1agaBM4x yglKS5Wldkms26ex6fjW0JkoVAoWyPM1340zxemoAx6eZyFnvfgZQ+3qaYIdkaShtbEmvfGZOyO SwmQSo9Ozwj+PZQ== X-Developer-Key: i=david@ixit.cz; a=openpgp; fpr=D77A09CFEEDC2BBD53A7047460023FC4D3492072 X-Endpoint-Received: by B4 Relay for david@ixit.cz/default with auth_id=355 X-Original-From: David Heidelberg Reply-To: david@ixit.cz From: David Heidelberg Recently we documented, there is more than vddio regulator, adapt the driver to work with VCI and POC regulator. Signed-off-by: David Heidelberg --- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 28 ++++++++++++++++-------= ---- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/dr= m/panel/panel-samsung-sofef00.c index c88574ea66e1c..3097040e6bfa0 100644 --- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c +++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c @@ -20,10 +20,16 @@ struct sofef00_panel { struct drm_panel panel; struct mipi_dsi_device *dsi; - struct regulator *supply; + struct regulator_bulk_data *supplies; struct gpio_desc *reset_gpio; }; =20 +static const struct regulator_bulk_data sofef00_supplies[] =3D { + { .supply =3D "vddio" }, + { .supply =3D "vci" }, + { .supply =3D "poc" }, +}; + static inline struct sofef00_panel *to_sofef00_panel(struct drm_panel *panel) { @@ -86,20 +92,18 @@ static int sofef00_panel_off(struct sofef00_panel *ctx) static int sofef00_panel_prepare(struct drm_panel *panel) { struct sofef00_panel *ctx =3D to_sofef00_panel(panel); - struct device *dev =3D &ctx->dsi->dev; int ret; =20 - ret =3D regulator_enable(ctx->supply); - if (ret < 0) { - dev_err(dev, "Failed to enable regulator: %d\n", ret); + ret =3D regulator_bulk_enable(ARRAY_SIZE(sofef00_supplies), ctx->supplies= ); + if (ret < 0) return ret; - } =20 sofef00_panel_reset(ctx); =20 ret =3D sofef00_panel_on(ctx); if (ret < 0) { gpiod_set_value_cansleep(ctx->reset_gpio, 1); + regulator_bulk_disable(ARRAY_SIZE(sofef00_supplies), ctx->supplies); return ret; } =20 @@ -111,7 +115,7 @@ static int sofef00_panel_unprepare(struct drm_panel *pa= nel) struct sofef00_panel *ctx =3D to_sofef00_panel(panel); =20 sofef00_panel_off(ctx); - regulator_disable(ctx->supply); + regulator_bulk_disable(ARRAY_SIZE(sofef00_supplies), ctx->supplies); =20 return 0; } @@ -197,10 +201,12 @@ static int sofef00_panel_probe(struct mipi_dsi_device= *dsi) if (IS_ERR(ctx)) return PTR_ERR(ctx); =20 - ctx->supply =3D devm_regulator_get(dev, "vddio"); - if (IS_ERR(ctx->supply)) - return dev_err_probe(dev, PTR_ERR(ctx->supply), - "Failed to get vddio regulator\n"); + ret =3D devm_regulator_bulk_get_const(dev, + ARRAY_SIZE(sofef00_supplies), + sofef00_supplies, + &ctx->supplies); + if (ret) + return dev_err_probe(dev, ret, "Failed to get regulators\n"); =20 ctx->reset_gpio =3D devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) --=20 2.51.0