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]
Date:	Sat, 21 Jan 2012 16:54:52 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	"sameo@...ux.intel.com" <sameo@...ux.intel.com>,
	"jedu@...mlogic.co.uk" <jedu@...mlogic.co.uk>,
	"lrg@...mlogic.co.uk" <lrg@...mlogic.co.uk>,
	"gg@...mlogic.co.uk" <gg@...mlogic.co.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH V1] mfd: tps65910: Add wakeup support

Resending as text formatting was not proper. Sorry for inconvenience..

On Friday 20 January 2012 06:43 PM, Mark Brown wrote:
> On Fri, Jan 20, 2012 at 06:37:42PM +0530, Laxman Dewangan wrote:
>>> No, that's it - when you call those userspace will get control via sysfs
>>> for turning on and off the wakeup support.
>> So should I call them in driver by default without taking parameter
>> from platform data?
> That's the normal behaviour for drivers unless there's some specific
> reason for doing something different.  The choice may well depend on the
> application software running on the system rather than the kernel.
Going through the details of documentation under 
/sys/devices/.../power/wakeup files of power/device.txt, I think 
following should be the change if we want to control the wakeup control 
through user sapce:
During initialization of device, we need to tell that device is wakeup 
capable and hence we need to call the: device_wakeup_init() and 
device_set_wakeup_capable(dev, true).
Then it exposes the required sysfs to userspace to select the wakeup 
enable or not i.e. power/wakeup to be written as enabled or disabled.
Based on user selection, the function device_may_wakeup() will return 
true/false based on  power/wakeup enabled/disabled. So before entering 
into the suspend, we need to check this function and call 
enable_irq_wakeup() to have the wakeup enabled actually in the soc. In 
resume we need to call disable_irq_wake() again.

If this is correct approach then I can push the another patch.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ