From nobody Fri Dec 19 12:31:36 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 37B6C2D2481; Tue, 4 Nov 2025 22:16:14 +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=1762294575; cv=none; b=HfaUaVUSfC0kKRtYnkpbEUd9fBZiwK0GzNh++gOxFpJDj7Fxmk+aB8J26pr6Zw6hyiuM/INTsd6TrXKAJa5bFJ+7Y/WabAUaRTqLXz/5qzupo5i8mY4Kg/YuwtfpU6/QGatKKHJX7y+jukM3Vc2/zdjYTaBtIyOIYIbFt+8XTW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762294575; c=relaxed/simple; bh=W8AFvq4nPlynSNPii3uZ58RgvdVO7lLIvRxVluTsVZY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hWzzhsaCHisNupgMc0jRmRTLDriXjE+cw5eBHDClgIkfOggzJF+mIDPxGO4vAWL1iBSv6RSHlemEgjTqDbE7SKFCQWTuVHGd2y/Z8L4p2vn6FzKJjv7ZEr3S7fntHSooaBdHWaTBDfOfXQ56tU9KVcmZgUSGWwtyX5BYZgOiIXg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UW5wGZVc; 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="UW5wGZVc" Received: by smtp.kernel.org (Postfix) with ESMTPS id B5AD0C2BC86; Tue, 4 Nov 2025 22:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762294574; bh=W8AFvq4nPlynSNPii3uZ58RgvdVO7lLIvRxVluTsVZY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UW5wGZVckGK0GKF668EgLOhR40cPbdEtXAASH8clVwkw/O1jf1mi8AkXaT2aVVBDJ QinM/jZmkilQgaFaPoG4LP6Xk+xW24he/PXiAfQvLX/WdQtKRDnBpS6v2uijn/fmza j/pzPkrvmJ02PMmbzvjb8cfla1tUqrQUax8H/RqaH+pY3rVj01Qypqh9w+JdJfkLzi gwiqSNbHEDkDrlCfzHRL+48PranDsVgQL2NEB3KL38syyA3AcDhFCkpl2+C+UwQWlz CfS/GVhYXWKqquoV+AZT3lpoOU6amEwMacF4ngjCT/giiZBWPnrjQqYFkRmh1kJHLC Q3i7uGrCr4fUA== 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 AC6D4CCFA07; Tue, 4 Nov 2025 22:16:14 +0000 (UTC) From: David Heidelberg via B4 Relay Date: Tue, 04 Nov 2025 23:16:12 +0100 Subject: [PATCH 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: <20251104-sofef00-rebuild-v1-4-dfcfa17eb176@ixit.cz> References: <20251104-sofef00-rebuild-v1-0-dfcfa17eb176@ixit.cz> In-Reply-To: <20251104-sofef00-rebuild-v1-0-dfcfa17eb176@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 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/ZANAwAIAWACP8TTSSByAcsmYgBpCnssiWzEUYXzfPzUG+DAUG0W0WdxEhSI7H1YW 2IlnexEXQmJAjMEAAEIAB0WIQTXegnP7twrvVOnBHRgAj/E00kgcgUCaQp7LAAKCRBgAj/E00kg ctB2D/90SCTjo1p9cHBtAqaK+mOEBhbtYlwQ4rtVT98t/Vjt5AGeRi378dC1fgJ6C3onmmFagh2 WbRWCFA1mH3fIqf3mBPo4/FB9rdSFtGvCsEiG5n7ek5ZwgGXeQQTtigWUfSGwb/zBSejVG8aYxJ qtijRxjHaN44V8YdY/ki2pONEIsn9krZkekeLxtrAq6XHyTCYNy8cqacXDyC6EmHhh5MRIHG67I sM6Sn+k2yq/I3Nci38H6GInWtqgCHvMibDbD5IQjo9hLoFpZ+IdQgeyQ3jvJo67csMsS6Gx3J3x PTtR2mPW2J+JT+E/pVBPEOE2mSmui1y/ltIAkSFfLAQDbRNIrRarYy/mDsErMLV1Khz1t6VThe1 vhvSJwpPMWIFdyJJ/YRv5WMb7Aez/bLM08NasIY5Zi04NkBIcgimj4mTNykq4T5z+tCBVCTFLaD DaBpq2zIwofhkDsfOcNNGFTQ+RzHdtbdkv2gZyo0qzGOyfRvwzUkrnK04j2Cyqs/eDMh0Bfd/nS y7Qsm8nYEwlm+oQULb+dMkJEpZZH4OoVCbU+R0lco4f9udlNurWVcgZGZf23dWnce7bZ807MIRd 7fX6IcOdKlxqmKbh8Z8AeE/z/16ZKY1t2+rfDWReQwZvfBCL/QSkHwHp/4PQnYSpCCMVwh97P/g Z7BuA5nEe7FahEA== 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