From patchwork Fri Apr 8 01:33:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 12805990 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 2BA53C433EF for ; Fri, 8 Apr 2022 01:34:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 24AC110E072; Fri, 8 Apr 2022 01:34:05 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CAB410E072 for ; Fri, 8 Apr 2022 01:34:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 1C6661F46B10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649381642; bh=o8jyjimeTtzJ50BwKCRZ9f6gmB8wWl9FaBazezNCQ2M=; h=From:To:Cc:Subject:Date:From; b=YlIfXEQt3gi/6hDFEHwlPjoJ4xuHoCLzl5EtEkYNidX8kC4pfiTTIStaGad/8xtGy SgXMagTAp4i5u4O+q4IdIMQ6Ov7VmFvqLA7onwUwjXvFzOHqEm3VQAChufM4T64Uj1 KyScdLzT7Tei6OfwqsNGQTbvotz4VNlm0EqULINJ8xks/zeZONcyn+I+twXdIweMHn RnqLBy5gnFOU5d5MzPk8q2WynBbONjKfplCrbXMqFBnzhPa/5JjQok3Sgl4k5JFxGQ ltW2LjNl7i28Bt3FdKwEhCcRVNW4hrB+3tzv8l8PT+Db1p63CRka8wQRRBMtknkmSr POvRznn/xkc4w== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Robert Foss , Neil Armstrong , Andrzej Hajda Subject: [PATCH] drm/bridge: anx7625: Use irq flags from devicetree Date: Thu, 7 Apr 2022 21:33:56 -0400 Message-Id: <20220408013356.673732-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.35.1 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: , Cc: Pi-Hsun Shih , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4g?= =?utf-8?b?UHJhZG8=?= , Jonas Karlman , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jernej Skrabec , Tzung-Bi Shih , Laurent Pinchart , Hsin-Yi Wang , Maxime Ripard , kernel@collabora.com, Sam Ravnborg , Xin Ji , AngeloGioacchino Del Regno Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Read the irq flags, like which edge to trigger on, from the devicetree and use those when registering the irq instead of hardcoding them. In case none was specified, fallback to falling edge trigger. Signed-off-by: NĂ­colas F. R. A. Prado --- drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 6516f9570b86..97d954b8cc12 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2588,6 +2588,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, struct anx7625_platform_data *pdata; int ret = 0; struct device *dev = &client->dev; + unsigned long irqflags; if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) { @@ -2639,10 +2640,13 @@ static int anx7625_i2c_probe(struct i2c_client *client, goto free_hdcp_wq; } + irqflags = irq_get_trigger_type(client->irq); + if (!irqflags) + irqflags = IRQF_TRIGGER_FALLING; + ret = devm_request_threaded_irq(dev, platform->pdata.intp_irq, NULL, anx7625_intr_hpd_isr, - IRQF_TRIGGER_FALLING | - IRQF_ONESHOT, + irqflags | IRQF_ONESHOT, "anx7625-intp", platform); if (ret) { DRM_DEV_ERROR(dev, "fail to request irq\n");