From patchwork Thu Dec 1 16:02:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Otto_Pfl=C3=BCger?= X-Patchwork-Id: 629968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9398C43217 for ; Thu, 1 Dec 2022 16:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbiLAQHk (ORCPT ); Thu, 1 Dec 2022 11:07:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232156AbiLAQH3 (ORCPT ); Thu, 1 Dec 2022 11:07:29 -0500 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E840CB68D1; Thu, 1 Dec 2022 08:06:49 -0800 (PST) Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id 8F9CA1C004C; Thu, 1 Dec 2022 17:06:48 +0100 (CET) Received: from srv01.abscue.de (abscue.de [89.58.28.240]) by srv01.abscue.de (Postfix) with ESMTPSA id 7FFB21C004B; Thu, 1 Dec 2022 17:06:48 +0100 (CET) From: =?utf-8?q?Otto_Pfl=C3=BCger?= To: =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Otto_Pfl=C3=BCger?= Subject: [PATCH v2 2/3] drm/tiny: panel-mipi-dbi: Read I/O supply from DT Date: Thu, 1 Dec 2022 17:02:44 +0100 Message-Id: <20221201160245.2093816-3-otto.pflueger@abscue.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221201160245.2093816-1-otto.pflueger@abscue.de> References: <20221201160245.2093816-1-otto.pflueger@abscue.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org To support platforms with a separate I/O voltage supply, set the new io_regulator property along with the regulator property of the DBI device. Read the I/O supply from a new "io-supply" device tree property. Signed-off-by: Otto Pflüger Reviewed-by: Noralf Trønnes --- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c index 955a61d628e7..353356ee0397 100644 --- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c +++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c @@ -297,6 +297,11 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi) return dev_err_probe(dev, PTR_ERR(dbidev->regulator), "Failed to get regulator 'power'\n"); + dbidev->io_regulator = devm_regulator_get(dev, "io"); + if (IS_ERR(dbidev->io_regulator)) + return dev_err_probe(dev, PTR_ERR(dbidev->io_regulator), + "Failed to get regulator 'io'\n"); + dbidev->backlight = devm_of_find_backlight(dev); if (IS_ERR(dbidev->backlight)) return dev_err_probe(dev, PTR_ERR(dbidev->backlight), "Failed to get backlight\n");