From: Marek Vasut <marek.vasut@mailbox.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Frank Li <Frank.Li@nxp.com>, Job Noorman <job@noorman.info>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v4 3/3] Input: ili210x - add support for polling mode
Date: Thu, 22 Jan 2026 00:12:35 +0100 [thread overview]
Message-ID: <afd5a80f-63ff-43e3-a682-56eae25896b4@mailbox.org> (raw)
In-Reply-To: <tuvidadi4sezm5b3ydvuie6pcxpf7pw2jrysafwdhpmtz6vjxl@o4zqdnjxkaed>
On 1/21/26 11:53 PM, Dmitry Torokhov wrote:
> On Wed, Jan 21, 2026 at 11:42:55PM +0100, Marek Vasut wrote:
>> On 1/21/26 6:23 AM, Dmitry Torokhov wrote:
>>> On Tue, Jan 20, 2026 at 11:50:53PM +0100, Marek Vasut wrote:
>>>> On 1/20/26 7:31 PM, Dmitry Torokhov wrote:
>>>>> Hi Marek,
>>>>>
>>>>> On Sat, Jan 17, 2026 at 01:12:04AM +0100, Marek Vasut wrote:
>>>>>> @@ -860,16 +893,12 @@ static ssize_t ili210x_firmware_update_store(struct device *dev,
>>>>>> * the touch controller to disable the IRQs during update, so we have
>>>>>> * to do it this way here.
>>>>>> */
>>>>>> - scoped_guard(disable_irq, &client->irq) {
>>>>>> - dev_dbg(dev, "Firmware update started, firmware=%s\n", fwname);
>>>>>> -
>>>>>> - ili210x_hardware_reset(priv->reset_gpio);
>>>>>> -
>>>>>> - error = ili210x_do_firmware_update(priv, fwbuf, ac_end, df_end);
>>>>>> -
>>>>>> - ili210x_hardware_reset(priv->reset_gpio);
>>>>>> -
>>>>>> - dev_dbg(dev, "Firmware update ended, error=%i\n", error);
>>>>>> + if (client->irq > 0) {
>>>>>> + scoped_guard(disable_irq, &client->irq) {
>>>>>> + error = ili210x_firmware_update_noirq(dev, fwbuf, ac_end, df_end);
>>>>>> + }
>>>>>
>>>>> You already have a scope here, no need to establish a new one:
>>>>>
>>>>> guard(disable_irq)(&client->irq);
>>>>> error = ili210x_firmware_update_noirq(dev, fwbuf, ac_end, df_end);
>>>>
>>>> This part ^ I do not understand. If there is no IRQ defined in DT, I need to
>>>> call ili210x_firmware_update_noirq() without the guard because I cannot
>>>> disable_irq() with client->irq < 0, else I need to call
>>>> ili210x_firmware_update_noirq() within the scoped_guard() to disable IRQs to
>>>> avoid spurious IRQs that would interfere with the firmware update ?
>>>
>>> You do not need to use scoped_guard() because you already define a scope
>>> in your if statement:
>>>
>>> if (client->irq > 0) {
>>> guard(disable_irq)(&client->irq);
>>> error = ili210x_firmware_update_noirq(dev, fwbuf, ac_end, df_end);
>>> } else {
>>> error = ili210x_firmware_update_noirq(dev, fwbuf, ac_end, df_end);
>>> }
>>>
>>> This is sill a bit awkward. Maybe we could add to interrupt.h
>>
>> Let me do the part above in V5 , and then the part below as a separate
>> follow up patch/series. I already added the later in tree so it won't be
>> lost. Does that work for you ?
>
> It does, thanks.
OK, V5 is out, the disable_valid_interrupt guard part is coming shortly.
next prev parent reply other threads:[~2026-01-21 23:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-17 0:12 [PATCH v4 1/3] dt-bindings: touchscreen: trivial-touch: Drop 'interrupts' requirement for old Ilitek Marek Vasut
2026-01-17 0:12 ` [PATCH v4 2/3] Input: ili210x - convert to dev_err_probe() Marek Vasut
2026-01-17 11:22 ` Krzysztof Kozlowski
2026-01-20 10:20 ` Geert Uytterhoeven
2026-01-20 18:25 ` Dmitry Torokhov
2026-01-17 0:12 ` [PATCH v4 3/3] Input: ili210x - add support for polling mode Marek Vasut
2026-01-18 17:19 ` Frank Li
2026-01-20 18:31 ` Dmitry Torokhov
2026-01-20 22:50 ` Marek Vasut
2026-01-21 5:23 ` Dmitry Torokhov
2026-01-21 22:42 ` Marek Vasut
2026-01-21 22:53 ` Dmitry Torokhov
2026-01-21 23:12 ` Marek Vasut [this message]
2026-01-17 11:22 ` [PATCH v4 1/3] dt-bindings: touchscreen: trivial-touch: Drop 'interrupts' requirement for old Ilitek Krzysztof Kozlowski
2026-01-17 15:33 ` Marek Vasut
2026-01-17 18:34 ` Krzysztof Kozlowski
2026-01-20 10:23 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afd5a80f-63ff-43e3-a682-56eae25896b4@mailbox.org \
--to=marek.vasut@mailbox.org \
--cc=Frank.Li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=job@noorman.info \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®