From patchwork Mon Jul 1 08:58:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikandan Muralidharan X-Patchwork-Id: 13717695 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23B9EC2BD09 for ; Mon, 1 Jul 2024 08:59:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E1D610E34C; Mon, 1 Jul 2024 08:59:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="EqtpMg7h"; dkim-atps=neutral Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AEE810E34C for ; Mon, 1 Jul 2024 08:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1719824372; x=1751360372; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vKsDgZDbAveDzASb8F3C/IqfEeLs4OJGXgc8VAbr7pk=; b=EqtpMg7hlOTCuQPnqAisDmgojkblTDA7C4OTN2+JtySv+B/XESwiqcvP QsnoEqdpGCIZQ4iOfKOK7LkZqfI7xIJ1DssVAiz99f4GaQpjAaq5uxg1P bansF9s3bzn0tk/lLLnY54dCOxZpWMuM+OHfDRTNdAOJdZwQrqkuUhDdW SpPlwvVEADrRNdKvqUQhihgg5xTuRe99MQWkViNTu5veypvZ8kUzma+cB N4iLY/gXbXdFSzcgIzqUNKNaWpEz/Ekex4n+yDibNy3JELi/HTrq6IEC+ gNFv4Adl70SO85O5HQAWluUkXwWy2nu8yKs/aUoNGxmDXlNCgmmwXEWZr Q==; X-CSE-ConnectionGUID: ZeBr/Ue5TPu0YC0REmLPhw== X-CSE-MsgGUID: 5lDZQskOTR2k6Yaj0r0mVg== X-IronPort-AV: E=Sophos;i="6.09,175,1716274800"; d="scan'208";a="31278303" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 01 Jul 2024 01:59:31 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 1 Jul 2024 01:58:58 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 1 Jul 2024 01:58:52 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v2 2/3] drm/panel: himax-hx8394: switch to devm_gpiod_get_optional() for reset_gpio Date: Mon, 1 Jul 2024 14:28:36 +0530 Message-ID: <20240701085837.50855-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240701085837.50855-1-manikandan.m@microchip.com> References: <20240701085837.50855-1-manikandan.m@microchip.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Switch the driver to use devm_gpiod_get_optional() on reset_gpio to avoid driver probe issues when reset line is not specified. Signed-off-by: Manikandan Muralidharan --- drivers/gpu/drm/panel/panel-himax-hx8394.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c index ff0dc08b9829..d0e44f1f85d9 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -487,7 +487,7 @@ static int hx8394_probe(struct mipi_dsi_device *dsi) if (!ctx) return -ENOMEM; - ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); + ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "Failed to get reset gpio\n");