Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp612236ybh; Wed, 18 Mar 2020 06:04:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvZa+4C2T0X8leDmijRkikRCb+vqlx2IgkpW+Syp0Isi4wLVQDW4A0LXPBjZlifwcnKs9YV X-Received: by 2002:a9d:6c58:: with SMTP id g24mr3596231otq.106.1584536666716; Wed, 18 Mar 2020 06:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584536666; cv=none; d=google.com; s=arc-20160816; b=ZMuzk6OWdmv832DABXhPg59qQxCflVa6YMNZbB+AjLqFIXa7BzLyCR0OFGhHc0rBLu 01K9EVIy+hsDfM520jBDq+Pa+/HToCOnW7clcVO+pIbomRu1FztictnaV7F+hyxoxfFl +eiNvZD+LteYqNehfpfhb5k2gpfprw+tRVsh+GfFz7kd4AXV2J8INDMdt68ZKPH1Lnnm ygI3OhA9XdFxx+GVrq05+QrnzzL9INdAKyVEUxsVSfdrVlpaYCTf36r5Wgq2nHPnQQVc YgBUK1W7qOIMDg3MIQxk4Nd/2XfPUyJ3fWqW68qwDg98dDA7sJJu9bQxSEuRtygxLaJq rRNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=+FkC6vS0TmlY+mXJRByumGIlfuRnMFnjVHD0+3j7768=; b=BxhZ2jlRByseduGfmux/RCHDRMDaeok1GORfXk7titI8LHYyK+Neg3yKan562lX+ll q/W33CtS9uV+wt/aoPCjRni6ez2grYA3knyF52wcWrREjUAMu2iHZftIYADFt/tyISh6 zaXsZqVipyaSmOPg9M8yGG3rRQaNAqet1sKcNTcz5V9OuqnwOMifOKsIbrrQ+P5Og7XV 31BlEK8JM+JJv2eMaPzH01IcvMPXCMYHKsyFvuiBx5HG1uKltt+9Hb1GICzB+lQ944ar fBUp88GG5garZ72Wr6JYJTU/aTqo+edzLmwEUc/C+UPDoH/VfoV3tDtsdFofQVPLLFlF nvtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c130si3462504oig.98.2020.03.18.06.04.09; Wed, 18 Mar 2020 06:04:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbgCRNCv (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 >