[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e586b057-1ec1-896e-374e-dba743709806@mentor.com>
Date: Wed, 18 Mar 2020 22:02:36 +0900
From: "Wang, Jiada" <jiada_wang@...tor.com>
To: Dmitry Osipenko <digetx@...il.com>, <jikos@...nel.org>,
<benjamin.tissoires@...hat.com>, <rydberg@...math.org>,
<dmitry.torokhov@...il.com>, <nick@...anahar.org>,
<bsz@...ihalf.com>
CC: <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<erosca@...adit-jv.com>, <Andrew_Gabbasov@...tor.com>
Subject: Re: [PATCH v7 03/48] Input: atmel_mxt_ts - only read messages in
mxt_acquire_irq() when necessary
Hello Dmitry
On 2020/03/18 7:44, Dmitry Osipenko wrote:
> 12.02.2020 11:41, Jiada Wang пишет:
>> From: Nick Dyer <nick.dyer@...ev.co.uk>
>>
>> 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 = <TEGRA_GPIO(V, 6) IRQ_TYPE_LEVEL_LOW>;
>
> 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
>
Powered by blists - more mailing lists