lkml.org 
[lkml]   [2023]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/2] Input: gpio-keys - Add system suspend support for dedicated wakeirqs
* 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

\
 
 \ /
  Last update: 2023-11-29 09:40    [W:5.239 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site