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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPKp9uaF_xrAT7rJTF74KeKC+Vh4Ex=Z5_riagZW1nwgsFfu4g@mail.gmail.com>
Date:	Mon, 18 Jan 2016 15:35:59 +0000
From:	Sudeep Holla <sudeep.holla@....com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Rob Herring <robh@...nel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Thierry Reding <treding@...dia.com>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	open list <linux-kernel@...r.kernel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH] driver-core: platform: automatically mark wakeup devices

On Mon, Jan 18, 2016 at 6:14 AM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> On Sun, Jan 17, 2016 at 09:11:25PM -0800, Greg Kroah-Hartman wrote:
>> On Sun, Jan 17, 2016 at 06:11:38PM -0800, Dmitry Torokhov wrote:
>> > When probing platform drivers let's check if corresponding devices have
>> > "wakeup-source" property defined (either in device tree, ACPI, or static
>> > platform properties) and automatically enable such devices as wakeup
>> > sources for the system. This will help us standardize on the name for this
>> > property and reduce amount of boilerplate code in the drivers.
>>
>> How much boilerplate code can be removed?  Do you have an example patch
>> of this removal for any drivers if we move this logic into the driver core?
>
> Admittedly not a lot, a few lines. There is a couple of lines for
> checking the property and calling device_init_wakeup() and also
> sometimes clearing wakeup flag is the only thing that is left in
> remove() method after converting to devm*. I am more interested in
> standardizing on the property name and having wakeup flag cleared on
> removal or probe failure, similarly how we do it for driver data in
> device structure.
>
> I do not have good patches in input at the moment as even though we are
> using "wakeup-source" now lots if the drivers did not start with it and
> so we have compatibility parsing still that we want to keep around. I
> want the new drivers to use only this property though.
>

True. We can move the standard property to driver core while legacy compatible
match can be retained in the individual drivers. The list[1] is not
too bad though,
and more over it remain static from now on.

--
Regards,
Sudeep

[1] Documentation/devicetree/bindings/power/wakeup-source.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ