lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 01 Sep 2017 14:12:13 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Johannes Stezenbach <js@...21.net>,
        linux-input@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 2/3] input/keyboard: Add support for Dollar Cove TI power button

On Fri, 01 Sep 2017 13:09:36 +0200,
Andy Shevchenko wrote:
> 
> On Thu, 2017-08-31 at 11:33 -0700, Dmitry Torokhov wrote:
> 
> > > +
> > > +	ret = enable_irq_wake(irq);
> > > +	if (ret)
> > > +		dev_warn(dev, "Can't enable IRQ as wake source:
> > > %d\n", ret);
> > 
> > We do not normally enable wake IRQs in probe, but instead do:
> > 
> > 	device_init_wakeup(&pdev->dev, true);
> > 
> > in probe() and then check it in suspend/resume:
> > 
> > 	if (device_may_wakeup(dev)) {
> > 		err = enable_irq_wake(XXX->irq);
> > 		if (!err)
> > 			XXX->irq_wake_enabled = true;
> > 	}
> > 
> > ...
> > 
> > 	if (XXX->irq_wake_enabled)
> 
> No need to duplicate a flag which IRQ core already has.
> 
> See, for example, commit
>  aef3ad103a68 ("serial: core: remove unneeded irq_wake flag")

I couldn't find the commit, but checked the web search.

So everything is set up and done by dev_pm_set_wake_irq(), no need to
create the own PM ops just for that, right?  That stuff was already in
v3 patch.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ