Re: [PATCH v4 3/3] Input: ili210x - add support for polling mode
From: Dmitry Torokhov
Date: Tue Jan 20 2026 - 13:31:51 EST
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);
BTW, not a fan of the "_noirq" suffix... Maybe drop it and add
lockdep_is_held() there?
> + } else {
> + error = ili210x_firmware_update_noirq(dev, fwbuf, ac_end, df_end);
> }
>
Thanks.
--
Dmitry