From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EBE5C10DCE for ; Wed, 18 Mar 2020 13:02:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1267E20724 for ; Wed, 18 Mar 2020 13:02:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgCRNCv (ORCPT ); Wed, 18 Mar 2020 09:02:51 -0400 Received: from esa1.mentor.iphmx.com ([68.232.129.153]:23793 "EHLO esa1.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbgCRNCv (ORCPT ); Wed, 18 Mar 2020 09:02:51 -0400 IronPort-SDR: VN2W5FDW5IzeIApCYsQpKfsEb9uaG+u+Mu2F3u4+xj6myHXB7ISHEGBwp6XBYzcC2ze7mt6XbU oOjoGUiYwtRbIW1gUvilsBg715TCMT/3cNPcV5rJ3dvZbViAO65rhje/9d5f3y0vJR0xD+KkDD 8ijjjyVwAHKGE+LA1r/3xSl8WwjsBXiDdwkv+/fQ2ijkHo0sx71AGz9JZtfuw9D63/bw5MvCz9 prlRGDpf7AZYTqjMzHCG0Sgc776UC0e9r8GkIRf45RszzSA3EuFGyyYfPF7RYdo+dJG6Rf5ykr H94= X-IronPort-AV: E=Sophos;i="5.70,567,1574150400"; d="scan'208";a="48803579" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 18 Mar 2020 05:02:50 -0800 IronPort-SDR: VOewRTdBF2YEGobwY6tYStdtlGoMq4v9FtnEeJskrsApWCEBGxSF6H1rCOwuBx/STrJDy9a27P EP0qvFfF3O2UIoi/y+GqslvgEhMk+tJGEi4Mmi79UypYOeJw7vrJdQvQVO+VozbhFn0IIfGDTN 6CJcMgEpJ4+iix3DA0w7EoTQhnUrVXmXrYHcXMjO6fjeY01D1/ip8rxVmjuCZ2+QoNIpIXcR52 3tiMEmc3eolg6ArjYINFE1qPHi9EaKysY3vrt74x/PNjHQDypo/aPyi9yOO50ICgroYeU8dogY Vi8= Subject: Re: [PATCH v7 03/48] Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary To: Dmitry Osipenko , , , , , , CC: , , , References: <20200212084218.32344-1-jiada_wang@mentor.com> <20200212084218.32344-4-jiada_wang@mentor.com> <8ea1244b-f045-df34-b6b2-2b812ab6dee4@gmail.com> From: "Wang, Jiada" Message-ID: Date: Wed, 18 Mar 2020 22:02:36 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <8ea1244b-f045-df34-b6b2-2b812ab6dee4@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Hello Dmitry On 2020/03/18 7:44, Dmitry Osipenko wrote: > 12.02.2020 11:41, Jiada Wang пишет: >> From: Nick Dyer >> >> The workaround of reading all messages until an invalid is received is a >> way of forcing the CHG line high, which means that when using >> edge-triggered interrupts the interrupt can be acquired. >> >> With level-triggered interrupts the workaround is unnecessary. >> >> Also, most recent maXTouch chips have a feature called RETRIGEN which, when >> enabled, reasserts the interrupt line every cycle if there are messages >> waiting. This also makes the workaround unnecessary. >> >> Note: the RETRIGEN feature is only in some firmware versions/chips, it's >> not valid simply to enable the bit. > > ... >> +static int mxt_check_retrigen(struct mxt_data *data) >> +{ >> + struct i2c_client *client = data->client; >> + int error; >> + int val; >> + >> + data->use_retrigen_workaround = false; >> + >> + if (irq_get_trigger_type(data->irq) & IRQF_TRIGGER_LOW) >> + return 0; >> + >> + if (data->T18_address) { >> + error = __mxt_read_reg(client, >> + data->T18_address + MXT_COMMS_CTRL, >> + 1, &val); >> + if (error) >> + return error; >> + >> + if (val & MXT_COMMS_RETRIGEN) >> + return 0; >> + } >> + >> + dev_warn(&client->dev, "Enabling RETRIGEN workaround\n"); >> + data->use_retrigen_workaround = true; >> + return 0; >> +} > > Hello Jiada, > > I'm seeing "Enabling RETRIGEN workaround" message with the following > device-tree entry: > > touchscreen@4c { > compatible = "atmel,maxtouch"; > reg = <0x4c>; > > interrupt-parent = <&gpio>; > interrupts = ; > > reset-gpios = <&gpio TEGRA_GPIO(Q, 7) GPIO_ACTIVE_HIGH>; > }; > > This happens because data->irq is NULL. Please fix it, thanks in advance. Thanks for reporting this issue, I will fix this issue in v8 patch-set Thanks, Jiada >