From patchwork Tue Sep 20 04:26:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 607843 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 5B158C6FA90 for ; Tue, 20 Sep 2022 04:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbiITE03 (ORCPT ); Tue, 20 Sep 2022 00:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbiITE0X (ORCPT ); Tue, 20 Sep 2022 00:26:23 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6929558F9; Mon, 19 Sep 2022 21:26:13 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id c198so1562644pfc.13; Mon, 19 Sep 2022 21:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=uVqkXrKh/BOL72z7RBz/jXCRaf0wbeq1TN40XiN2ST0=; b=H7mdcLBDJJDfrxDeMtiv1gAHhc5Y2zNKH7rxB7L+cveN7GFkfxN8M2aNCkirA8GhXW Ld3PRMtg4mssDLcXHoQuSbuy6is2/3kYaa9XOZUu1cH244uF5CRW1y0L7m9B0BSevky0 DQBGpm2omE6vdTc60XiHsonxzCyL3VYzjKgeAZsEgcWsXk/wmT4t3OOUBF2gWF9HjykU FWCfho+uCzumfXk0mlQNO4NstAZWFG/sgbtt61dye+6EkRe8I3GfZHZzpCg66i3ykxZX 6dXf5PNzXHUA1M+65bNIijKbc+NL3oahfccTZt+30DNUyywpcj2KC12r317P+3Oyb8fk yK1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=uVqkXrKh/BOL72z7RBz/jXCRaf0wbeq1TN40XiN2ST0=; b=TOnAEWI8l4Bs3pNq3lepS+jdYQXgiseAOqgxUa/d5QH368xcobbXpwytFmb09WAluu 3A9yfrhJF1SsjlHzXaHznLy8mp2uQzckjhgCNZzsI2zpTRZUPSqGP0M9b7oVfEUTH0Oq oOUUISq9wLcpBQ2F5c6GmYUKEa89ls29MYHW8+kym0fngZPQUTU05sgdXaUifeRK8+dT F/nD8jZaWKNIf5yAanPw48r5WTU+E2p28ltwG6jUqI9Hshaa6Sqn9jJ6DBT09fpoangr XuH7tJq/lJjgDaPSDa23PR2NH24zG55+Nm6s4gaFaMGsk0dLvUHzOeVbJB1VtsKQCDg/ VMow== X-Gm-Message-State: ACrzQf2AyFiH8+79bJh918voHsOfLl+j4fUbSWyPcBivS2sZrh2n1vyF 4nf4luLjsPlskwU4b0rNsgo= X-Google-Smtp-Source: AMsMyM6weMjGDsVYFkcghzfNlMx4UQ6aeMIYIS6GGO8IPN7xgqg7/XhpJJz54LI2DSqMInhnpw23wA== X-Received: by 2002:a63:9041:0:b0:438:8ed0:8470 with SMTP id a62-20020a639041000000b004388ed08470mr17979059pge.25.1663647972762; Mon, 19 Sep 2022 21:26:12 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:b095:5d5d:4c28:8088]) by smtp.gmail.com with ESMTPSA id t15-20020a17090a024f00b001fab208523esm337518pje.3.2022.09.19.21.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 21:26:12 -0700 (PDT) From: Dmitry Torokhov To: Shawn Guo , Sascha Hauer , linux-input@vger.kernel.org Cc: Krzysztof Kozlowski , Fabio Estevam , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] ARM: dts: imx6qdl-sabre*: fix Egalax touchscreen properties Date: Mon, 19 Sep 2022 21:26:05 -0700 Message-Id: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch fixes interrupt trigger (should be level low as that is what the driver is always using), the GPIO that is the interrupt source that is also used to wake up chip by driving the line low. The proper polarity is be needed for converting the driver to gpiod API. Signed-off-by: Dmitry Torokhov Acked-by: Shawn Guo --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 4 ++-- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 1368a4762037..1883350d004e 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -451,8 +451,8 @@ touchscreen@4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_egalax_int>; interrupt-parent = <&gpio2>; - interrupts = <28 IRQ_TYPE_EDGE_FALLING>; - wakeup-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + wakeup-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index 37482a9023fc..09f4c2fa3ad6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi @@ -311,8 +311,8 @@ touchscreen@4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2_egalax_int>; interrupt-parent = <&gpio6>; - interrupts = <8 IRQ_TYPE_EDGE_FALLING>; - wakeup-gpios = <&gpio6 8 GPIO_ACTIVE_HIGH>; + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; + wakeup-gpios = <&gpio6 8 GPIO_ACTIVE_LOW>; }; ov5640: camera@3c { @@ -450,8 +450,8 @@ egalax_ts@4 { compatible = "eeti,egalax_ts"; reg = <0x04>; interrupt-parent = <&gpio6>; - interrupts = <7 2>; - wakeup-gpios = <&gpio6 7 0>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>; }; magnetometer@e { From patchwork Tue Sep 20 04:26:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 607842 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 917C6C6FA82 for ; Tue, 20 Sep 2022 04:26:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbiITE0s (ORCPT ); Tue, 20 Sep 2022 00:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbiITE0X (ORCPT ); Tue, 20 Sep 2022 00:26:23 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2908158B69; Mon, 19 Sep 2022 21:26:15 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id l65so1588573pfl.8; Mon, 19 Sep 2022 21:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=kNFWWy7bwpQVYleHcT5hR/K7/r+CDpNqO6pCTqZ+Bqk=; b=iEoOYDQuDeKqlyz9GzDA5FBF1n+Te1LRLAVTNZY+LC9cDRaDrwdI07j386rCcjd/+b jWSruN7EDHX7ArOufpN/hDIWzVfTZfN7YgrBRuGcWQRg6lH7e4sbajvVJ9oXiNQeCaTe 76+dqf22D4yzJl3PPTKcG948hM6pO+PlHjvyW1vtG4Sf/nbJjMVxVWNCn+HTUe/cLsui 8Q4bs1P5Jh8MAmvTVnp2O1IF6BBq/6nJcVdYZob/VlrrTIXE574cAKRnKWGGVpINxWHM QY90cN6dlVwwMtoWODH+RcX8nJPUGlI0HUXd3nEsZwXziRBq/UEfUkb12AkCK+HSvolf RFkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=kNFWWy7bwpQVYleHcT5hR/K7/r+CDpNqO6pCTqZ+Bqk=; b=ppK0yN/1ku2O2bVs7Y2RF3keynMe2yF8Wg4UkjNTyBsdD0gi5MFk3k15ufj3tuwQYH zSkUmLvBpfYsnCEylpG0tegKwA253Ric6l4k9bPrfIq8J+V+8IXbfVRke96C3hqEq1mY 9m8077tPfZPuCax5Zogqn5jcbn8NWuheEAkXCEO68T67qbypPJil0s2mKFLyEAiimu4r kGhq7oVPuW69bzkZOgFSf6PK9gahzyIgAaiZhbA7wyTVyj/sMYZDUjDR5PqJRQ4lPZwl BM4pjgjCVYz1vIGzELH6OjqgDEs4UOjJyTubDOWybiDLBARw9lrPkr+4tNm2rfK6d/J5 vdCg== X-Gm-Message-State: ACrzQf2hCE87QpaB7n0rQmEdmG/Xe33j8f5TA8Xh1lCh3hd/XJ1TNYGt 3JKOtJznVCFzJ/V9cShkSPY= X-Google-Smtp-Source: AMsMyM6kjzieQk2rKnAzOxto0IPCpm9CxxoKAfWuP0jfdKwCKYLBCjC1iEbrRHSMs6hoOtRm5gZHew== X-Received: by 2002:aa7:952f:0:b0:540:e8ee:a077 with SMTP id c15-20020aa7952f000000b00540e8eea077mr22001999pfp.34.1663647973928; Mon, 19 Sep 2022 21:26:13 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:b095:5d5d:4c28:8088]) by smtp.gmail.com with ESMTPSA id t15-20020a17090a024f00b001fab208523esm337518pje.3.2022.09.19.21.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 21:26:13 -0700 (PDT) From: Dmitry Torokhov To: Shawn Guo , Sascha Hauer , linux-input@vger.kernel.org Cc: Krzysztof Kozlowski , Fabio Estevam , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] dt-binding: input: egalax-ts: fix GPIO and IRQ in example Date: Mon, 19 Sep 2022 21:26:06 -0700 Message-Id: <20220920042608.1865560-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog In-Reply-To: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> References: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The driver is using level triggered interrupt (low) which is backed by and active low GPIO that can be used to wake the controller by driving it low. Let's annotate it properly in the example. Signed-off-by: Dmitry Torokhov Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/input/touchscreen/egalax-ts.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt b/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt index 92fb2620f5e2..ebbe93810574 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/egalax-ts.txt @@ -13,6 +13,6 @@ Example: compatible = "eeti,egalax_ts"; reg = <0x04>; interrupt-parent = <&gpio1>; - interrupts = <9 2>; - wakeup-gpios = <&gpio1 9 0>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + wakeup-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; From patchwork Tue Sep 20 04:26:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 608081 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 048B0C54EE9 for ; Tue, 20 Sep 2022 04:26:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbiITE0c (ORCPT ); Tue, 20 Sep 2022 00:26:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbiITE0Y (ORCPT ); Tue, 20 Sep 2022 00:26:24 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A04C56B94; Mon, 19 Sep 2022 21:26:16 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id fv3so1804415pjb.0; Mon, 19 Sep 2022 21:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=pIGkYbf9yJq729wkfcXhqGqwyONGFWTL2PsMGXYGRvA=; b=b1A/UY/etRaIToqRoaqAcmDdOu0iH5cXbcOhn+YhlJosnosC1rD7s7QfxhFGiRikNE /zYKEgqwFVesX6Qcky1cciscr/9ZSZXXlVlQCSdy/oFiJfPpSDUrSkSSGegMYdyM9rS/ ubmH2jI8lBtJ0qjtYexMwjJKAFRorbONbNTqS0vIQvhsnoqPxQXQ4NWGdZ9rkA/oARy6 /6rsAK6w/rIKrVamDDJa/WNYOdhEROcdUebOcI+6MFNZ2k/N0OYt45cxfQ07aQqKu12W I7+csj1oIBRGJYKbVwt8hgAak8Da7iXHXlyCFhG3c8A2rn6ZkcuJW81OzJoSr1BtORKb ORvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=pIGkYbf9yJq729wkfcXhqGqwyONGFWTL2PsMGXYGRvA=; b=BQWhnk8z9Xf19sKwRd+Q1AiYs1xYl5tYHULpodrSCeMjv/OES58T5nt/FqpPE/gUet ZFt6eyvI2HwXy4hZtCtgpKF3/GvyuiNLO2UlVD8xisvq5FdYCWZos3/79oCGwX12ogjP DqZhIDw8EgHln+NAXtzRURAyWHYmXG362lkAirv0xhVNjSzXePH87fWDxJlhqLRWw9gy ObdAs2oMLC/RBaw4KhVLWlH54QiJxOofYqz5zlJNGubq9IS/LWnlakKkR87Tdstxmd/l qaZS9R73k0hcA07PIzsZEMDW2C3lAgPQvMMGYNzXXER7kbBHdqjPyBW+70jjJzaGEY/6 nZ3w== X-Gm-Message-State: ACrzQf2ogjS+vRmlpySOh5P8veCl3pemEsKapbhE8hG6cN58vZL+iJl5 3FtMyJsOdXeGiFFpbeVHtH4= X-Google-Smtp-Source: AMsMyM57I0D9KIVw5AL4bdyaT/GSXFo5QhBvAjAk5tjNPB7zD3KhkddmqgVNM5gMV4mJBMN9PV5OmQ== X-Received: by 2002:a17:902:c941:b0:177:e69a:a517 with SMTP id i1-20020a170902c94100b00177e69aa517mr3090266pla.144.1663647975125; Mon, 19 Sep 2022 21:26:15 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:b095:5d5d:4c28:8088]) by smtp.gmail.com with ESMTPSA id t15-20020a17090a024f00b001fab208523esm337518pje.3.2022.09.19.21.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 21:26:14 -0700 (PDT) From: Dmitry Torokhov To: Shawn Guo , Sascha Hauer , linux-input@vger.kernel.org Cc: Krzysztof Kozlowski , Fabio Estevam , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] Input: egalax_ts - switch to using gpiod API Date: Mon, 19 Sep 2022 21:26:07 -0700 Message-Id: <20220920042608.1865560-3-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog In-Reply-To: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> References: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/egalax_ts.c | 42 +++++++++++---------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 83ac8c128192..9e9b1c52720d 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -14,17 +14,17 @@ - auto idle mode support */ +#include #include #include #include #include #include -#include +#include #include #include #include #include -#include /* * Mouse Mode: some panel may configure the controller to mouse mode, @@ -119,32 +119,26 @@ static irqreturn_t egalax_ts_interrupt(int irq, void *dev_id) /* wake up controller by an falling edge of interrupt gpio. */ static int egalax_wake_up_device(struct i2c_client *client) { - struct device_node *np = client->dev.of_node; - int gpio; + struct gpio_desc *gpio; int ret; - if (!np) - return -ENODEV; - - gpio = of_get_named_gpio(np, "wakeup-gpios", 0); - if (!gpio_is_valid(gpio)) - return -ENODEV; - - ret = gpio_request(gpio, "egalax_irq"); - if (ret < 0) { - dev_err(&client->dev, - "request gpio failed, cannot wake up controller: %d\n", - ret); + /* wake up controller via an falling edge on IRQ gpio. */ + gpio = gpiod_get(&client->dev, "wakeup", GPIOD_OUT_HIGH); + ret = PTR_ERR_OR_ZERO(gpio); + if (ret) { + if (ret != -EPROBE_DEFER) + dev_err(&client->dev, + "failed to request wakeup gpio, cannot wake up controller: %d\n", + ret); return ret; } - /* wake up controller via an falling edge on IRQ gpio. */ - gpio_direction_output(gpio, 0); - gpio_set_value(gpio, 1); + /* release the line */ + gpiod_set_value_cansleep(gpio, 0); - /* controller should be waken up, return irq. */ - gpio_direction_input(gpio); - gpio_free(gpio); + /* controller should be woken up, return irq. */ + gpiod_direction_input(gpio); + gpiod_put(gpio); return 0; } @@ -185,10 +179,8 @@ static int egalax_ts_probe(struct i2c_client *client, /* controller may be in sleep, wake it up. */ error = egalax_wake_up_device(client); - if (error) { - dev_err(&client->dev, "Failed to wake up the controller\n"); + if (error) return error; - } error = egalax_firmware_version(client); if (error < 0) { From patchwork Tue Sep 20 04:26:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 608080 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 A97B1ECAAD8 for ; Tue, 20 Sep 2022 04:26:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbiITE0u (ORCPT ); Tue, 20 Sep 2022 00:26:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiITE0Z (ORCPT ); Tue, 20 Sep 2022 00:26:25 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B113758B78; Mon, 19 Sep 2022 21:26:17 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id j6-20020a17090a694600b00200bba67dadso1219668pjm.5; Mon, 19 Sep 2022 21:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=rfUpzYsI63frIDNqdmtPpUE/MEzLhWYo/H+oG5zg+h8=; b=UbE8mSCw4zn9exu+f8n6nmg2N5VlvTNPteV9yQ84pmabq9FyvlDwWZUtyEB/gFIPcL YcHgfHgRkZtRpwpIw4rh/OmS0bSbwYkynpmB2cY3tswQTH8tLkoHlsuMUMAbiJnKlh+Q vwa5wxZ4thbiZY9lmUsdSvrjTGzmNW8t3wOPRDunGxfzfbPlbGVv/9Me9VhJFoX/T51r 4Xhh3R+mohFH245CVSTeW4fNK2LjuD8d8XQ0HqsO6yu9zp7usqoXjBsVJSSobWmdVKwR 3LF0ZJaV9A4q4w35HbOOOKioeuArN7unkZ3Ir/X1LxHGbywXfs1mqeWitwBj/iFm6QTp 2d/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=rfUpzYsI63frIDNqdmtPpUE/MEzLhWYo/H+oG5zg+h8=; b=a0F+Us3NM1cilvMDJzCQhBoXu7oqQ2odWarwGgTHwA7DykhYDsfypvvTMdvF5z4Nlg EKIHwRwGLnDTBFZ4CaAaDNUThYcQlP+3KqVDX5uRpfzkFZ/6h/zBYgoFHuMPakxNVgpK 6XtNOLH8uY0UK2tiS1LTEqxq8I5JFpDMBMKS6am4XqqHjcxk1lN/lV7FabnMabm+zWOM grE2TvY2a4JREgNajSGfD6lX4ljlxG8mbxOwtiMTGHlSZs7e5R9mN1aCw2128Ulr7Qr9 xtmfyNNWC6/WRWEkdpXPqHCCj2AQWRCwTSjiOtbwtDQS9cY2LlVPFGy+NIfcwa/R45VZ DNnw== X-Gm-Message-State: ACrzQf0bJa+q+7uq2I4QGKYkVNnybXJLPCe0aSLgHtfE9ktr8gUCfr4M iboU2hKUeRI0CQnRRfA1nJPOQbZ2Ais= X-Google-Smtp-Source: AMsMyM6Eo2sVwAvW4yjDLBtQUL5K0AJwz1fwTFJsPODUbnZKBr5vLscVdpLogQsr8lAuEC1TZag7Eg== X-Received: by 2002:a17:902:e550:b0:177:f115:1646 with SMTP id n16-20020a170902e55000b00177f1151646mr3148201plf.112.1663647976320; Mon, 19 Sep 2022 21:26:16 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:b095:5d5d:4c28:8088]) by smtp.gmail.com with ESMTPSA id t15-20020a17090a024f00b001fab208523esm337518pje.3.2022.09.19.21.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 21:26:15 -0700 (PDT) From: Dmitry Torokhov To: Shawn Guo , Sascha Hauer , linux-input@vger.kernel.org Cc: Krzysztof Kozlowski , Fabio Estevam , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] Input: egalax_ts - do not hardcode interrupt trigger Date: Mon, 19 Sep 2022 21:26:08 -0700 Message-Id: <20220920042608.1865560-4-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog In-Reply-To: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> References: <20220920042608.1865560-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Stop hard-coding interrupt trigger, instead rely on the platform code to do the right thing, according to DT or ACPI data. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/egalax_ts.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 9e9b1c52720d..8333a512b605 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -203,10 +203,9 @@ static int egalax_ts_probe(struct i2c_client *client, ABS_MT_POSITION_Y, 0, EGALAX_MAX_Y, 0, 0); input_mt_init_slots(input_dev, MAX_SUPPORT_POINTS, 0); - error = devm_request_threaded_irq(&client->dev, client->irq, NULL, - egalax_ts_interrupt, - IRQF_TRIGGER_LOW | IRQF_ONESHOT, - "egalax_ts", ts); + error = devm_request_threaded_irq(&client->dev, client->irq, + NULL, egalax_ts_interrupt, + IRQF_ONESHOT, "egalax_ts", ts); if (error < 0) { dev_err(&client->dev, "Failed to register interrupt\n"); return error;