Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp206949pxh; Thu, 7 Apr 2022 19:02:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1sqFV9BYwbLuveNc11LehXe7RkUW8ryVQ3WDVv/GBK3H5HktXMatUD3uCn+miTc5BCbgm X-Received: by 2002:a17:90b:4a0b:b0:1c7:221a:a600 with SMTP id kk11-20020a17090b4a0b00b001c7221aa600mr19005508pjb.112.1649383328366; Thu, 07 Apr 2022 19:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649383328; cv=none; d=google.com; s=arc-20160816; b=I3TPDY74a/Jrgs6ZFq/C77F9QKPKBZMdUtIM6Btp0fx4cVAL6h887FLF9xAO3+vBnI /qugH/bQV41MNNZXbw+y3srJvOgE+BjmQVyTYy55gl7MKR533U8cIV9O1/JkviePUDBk Z8Ye8NeDc7ZP6LSJTCBjg+v0qvUX11Ikm18w0QQXhj3fxBnlaOt+ZVunvn2QzGIIhdML Om/Z7+O98CesiSh5m6e9feRL69TpXfFyDmmcwDRZndGRZ9WA0UeKQm7mzElUV3NfGLfW YgPymbfN1K3LYH3B6cV3lewn0G9iD7qsmZrK1nxNUJUKxiaSWgiQ5LUkJZAcJkZ7hdmN EvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gMQ9/aXcipVOyiXw0p8Rs8dMFRLpPkcjGoTA/8TErPE=; b=D6bI6Dmcsj1zV7aIB6+u07s3rECuNcG4Tj0azQqCEN/rKHMMdXIh5kALp0xSA/2wpD LCXM/VrN9ep41jo31CfZwAOKATMDqQ2lr9STM/lI+7fKKe+mbIbkMO57B/7+v9CQ6WH/ iXQYPNvwTe8vC2Y1Oppwr2WEgZTclSb37VdyTAvgYGbQ3T80X6YbTf11JXAcin3jhTHi LVVOeBWMFp5GEaE3JBZEe5O+7lGK3hwDsPJSVYFFke+YDaVXNtYS6w7GQqJRfeabc8aO /SJ0+hChAuJtS2sJoNMSLdImXcR37Akv0PLTwdKzAQz25MPygD+YlVUA10RJ4x14XAAB lj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YlIfXEQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 5-20020a630005000000b0038201b8ba7esi16225pga.35.2022.04.07.19.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 19:02:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YlIfXEQt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A31C8278562; Thu, 7 Apr 2022 18:34:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233433AbiDHBgI (ORCPT + 99 others); Thu, 7 Apr 2022 21:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230247AbiDHBgG (ORCPT ); Thu, 7 Apr 2022 21:36:06 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F9326E020 for ; Thu, 7 Apr 2022 18:34:04 -0700 (PDT) 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?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Robert Foss , Neil Armstrong , Andrzej Hajda Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Daniel Vetter , David Airlie , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maxime Ripard , Pi-Hsun Shih , Sam Ravnborg , Tzung-Bi Shih , Xin Ji , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"); -- 2.35.1