kernel: power: update from msm-jb_chocolate
update genlock from msm-jb_chocolate - thanks to johnnyslt
net: wireless: bcm4329: Init locks in dhd_attach() at the beginning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: update from msm-jb_chocolate
update config
wakeup: Use irqsave/irqrestore for events_lock
--- thanks to jonnyslt for finding this

John Stultz - Sept. 6, 2012, 6:07 p.m.
Jon Medhurst (Tixy) recently noticed a problem with the
events_lock usage. One of the Android patches that uses
wakeup_sources calls wakeup_source_add() with irqs disabled.
However, the event_lock usage in wakeup_source_add() uses
spin_lock_irq()/spin_unlock_irq(), which reenables interrupts.
This results in lockdep warnings.

The fix is to use spin_lock_irqsave()/spin_lock_irqrestore()
instead for the events_lock.

Full bug report here:
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037565

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Android Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Jon Medhurst (Tixy) <tixy@linaro.org>
Reported-and-debugged-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
earlysuspend: block userspace until late resume completes
--- thanks to johnnyslt

Currently the late_resume function runs in a workqueue that is
triggered when the /sys/power/state is changed when the screen
is turned on. The problem this causes is that userspace sets
/sys/power/state to turn the screen on and after
request_suspend_state() returns userspace expects that the
kernel is ready to receive backlight adjustments, however
the backlight driver may not have finished its late_resume()
function yet, because the late_resume workqueue is still running.
Therefore we can get brightness requests before the backlight
driver late_resume function has completed and during the
resume sequence which can cause for undesired backlight
brightness results.

The solution for this is to have the late_resume functions run
within the context of the user space process that triggered the
screen on event. So that the request_suspend_state('wakeup')
function doesn't return until all the late_resume functions
have been completed. And therefore, userspace doesn't send
backlight (and other) requests to the kernel drivers before
they are all resumed.

Signed-off-by: Joe Swantek <w98568@motorola.com>