All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh@kernel.org>, Dhruva Gole <d-gole@ti.com>
Subject: Re: [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs
Date: Wed, 29 Nov 2023 10:38:44 +0200	[thread overview]
Message-ID: <20231129083844.GU5169@atomide.com> (raw)
In-Reply-To: <ZWF9F9JHKJ-SjUjp@google.com>

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [231125 04:50]:
> Hi Tony,
> 
> On Fri, Nov 24, 2023 at 10:32:41AM +0200, Tony Lindgren wrote:
> > +	/*
> > +	 * Wakeirq shares the handler with the main interrupt, it's only
> > +	 * active during system suspend. See gpio_keys_button_enable_wakeup()
> > +	 * and gpio_keys_button_disable_wakeup().
> > +	 */
> > +	error = devm_request_any_context_irq(dev, bdata->wakeirq, isr,
> > +					     irqflags, wakedesc, bdata);
> > +	if (error < 0) {
> > +		dev_err(dev, "Unable to claim wakeirq %d; error %d\n",
> > +			bdata->irq, error);
> > +		return error;
> > +	}
> > +
> > +	/*
> > +	 * Disable wakeirq until suspend. IRQF_NO_AUTOEN won't work if
> > +	 * IRQF_SHARED was set based on !button->can_disable.
> > +	 */
> > +	disable_irq_nosync(bdata->wakeirq);
> 
> Why _nosync() here and below? Is there any harm in sing the normal
> variant?

Well they are enabled the same time anyways for a while, so I see no
harm using the normal variant here. Will post updated patches after
some testing.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh@kernel.org>, Dhruva Gole <d-gole@ti.com>
Subject: Re: [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs
Date: Wed, 29 Nov 2023 10:38:44 +0200	[thread overview]
Message-ID: <20231129083844.GU5169@atomide.com> (raw)
In-Reply-To: <ZWF9F9JHKJ-SjUjp@google.com>

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [231125 04:50]:
> Hi Tony,
> 
> On Fri, Nov 24, 2023 at 10:32:41AM +0200, Tony Lindgren wrote:
> > +	/*
> > +	 * Wakeirq shares the handler with the main interrupt, it's only
> > +	 * active during system suspend. See gpio_keys_button_enable_wakeup()
> > +	 * and gpio_keys_button_disable_wakeup().
> > +	 */
> > +	error = devm_request_any_context_irq(dev, bdata->wakeirq, isr,
> > +					     irqflags, wakedesc, bdata);
> > +	if (error < 0) {
> > +		dev_err(dev, "Unable to claim wakeirq %d; error %d\n",
> > +			bdata->irq, error);
> > +		return error;
> > +	}
> > +
> > +	/*
> > +	 * Disable wakeirq until suspend. IRQF_NO_AUTOEN won't work if
> > +	 * IRQF_SHARED was set based on !button->can_disable.
> > +	 */
> > +	disable_irq_nosync(bdata->wakeirq);
> 
> Why _nosync() here and below? Is there any harm in sing the normal
> variant?

Well they are enabled the same time anyways for a while, so I see no
harm using the normal variant here. Will post updated patches after
some testing.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-11-29  8:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24  8:32 [PATCH v4 1/2] dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq Tony Lindgren
2023-11-24  8:32 ` Tony Lindgren
2023-11-24  8:32 ` [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs Tony Lindgren
2023-11-24  8:32   ` Tony Lindgren
2023-11-25  4:50   ` Dmitry Torokhov
2023-11-25  4:50     ` Dmitry Torokhov
2023-11-29  8:38     ` Tony Lindgren [this message]
2023-11-29  8:38       ` Tony Lindgren

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=20231129083844.GU5169@atomide.com \
    --to=tony@atomide.com \
    --cc=conor+dt@kernel.org \
    --cc=d-gole@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.