cypress-touchkey: tweak BLN implementation

- don't call enable_irq unless we're actually resuming, there's
  no need have it enabled just to illuminate the touchkeys.

Change-Id: I591150d51b1ab98041fa50c9bdccbeccb876bc26
msm_serial_hs: Back to cm-11.0 again...

Change-Id: I3d8344acfcf64ade0da0d77c6a0f127acf1f9489
timerfd: add alarm timers

Add support for clocks CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM.

Change-Id: Iafc8445d3d7ffb35110c860f1607bf03f1edb895
Signed-off-by: Todd Poynor <toddpoynor@google.com>
timerfd: support CLOCK_BOOTTIME clock

Add CLOCK_BOOTTIME support to timerfd

Change-Id: I14dee6d1104f15a05f463a632268ac4564753faf
Signed-off-by: Greg Hackmann <ghackmann@google.com>
alarmtimer: Use hrtimer per-alarm instead of per-base

Arve Hjønnevåg reported numerous crashes from the
"BUG_ON(timer->state != HRTIMER_STATE_CALLBACK)" check
in __run_hrtimer after it called alarmtimer_fired.

It ends up the alarmtimer code was not properly handling
possible failures of hrtimer_try_to_cancel, and because
these faulres occur when the underlying base hrtimer is
being run, this limits the ability to properly handle
modifications to any alarmtimers on that base.

Because much of the logic duplicates the hrtimer logic,
it seems that we might as well have a per-alarmtimer
hrtimer, and avoid the extra complextity of trying to
multiplex many alarmtimers off of one hrtimer.

Thus this patch moves the hrtimer to the alarm structure
and simplifies the management logic.

Change-Id: I54b2d718ed1d39598e321eacf88c3335284d4cea
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
alarmtimer: add alarm_restart

Analogous to hrtimer_restart, restart an alarmtimer after the expires
time has already been updated (as with alarm_forward).

Change-Id: Ia2613bbb467404cb2c35c11efa772bc56294963a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
alarmtimer: add alarm_forward_now

Similar to hrtimer_forward_now, move the expires time forward to an
interval from the current time of the associated clock.

Change-Id: I73fed223321167507b6eddcb7a57d235ffcfc1be
Signed-off-by: Todd Poynor <toddpoynor@google.com>
alarmtimer: add alarm_start_relative

Start an alarmtimer with an expires time relative to the current time
of the associated clock.

Change-Id: Ifb5309a15e0d502bb4d0209ca5510a56ee7fa88c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
alarmtimer: add alarm_expires_remaining

Similar to hrtimer_expires_remaining, return the amount of time
remaining until alarm expiry.

Change-Id: I8c57512d619ac66bcdaf2d9ccdf0d7f74af2ff66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
alarmtimer: implement minimum alarm interval for allowing suspend

alarmtimer suspend return -EBUSY if the next alarm will fire in less
than 2 seconds.  This allows one RTC seconds tick to occur subsequent
to this check before the alarm wakeup time is set, ensuring the wakeup
time is still in the future (assuming the RTC does not tick one more
second prior to setting the alarm).  If suspend is rejected, hold a
wakeup source for 2 seconds to process the alarm prior to reattempting
suspend.

Change-Id: If38e2568da0ea01dfee6e00323ce7e2c00f2f110
Signed-off-by: Todd Poynor <toddpoynor@google.com>
alarmtimer: add rtc irq support for alarm

Add the rtc irq support for alarmtimer to wakeup the
alarm during system suspend.

Change-Id: I41b774ed4e788359321e1c6a564551cc9cd40c8e
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Revert "HACK: time: Disable alarmtimer"

This reverts commit abbb445f65bbb139202fde5a66f9a249977058c9.

Change-Id: I9c1bbff1321b3165ccb482be99438c86770679da
Convert to upstream alarm interface

Change-Id: Idbd78413af1f47ee044df136290c5d220a5f4878
d2: update bluesleep and bcmdhd

* synced to latest d2 source drop (i535's ML1)

Change-Id: I53b536e8106aaf49adf188804d1cc0b3f2b8b7e8
d2: regenerate defconfig

Change-Id: I63e2f826858d668651a079167decfdf3c7e20af5
msm_serial_hs: sync with caf

Change-Id: Ie44043dc00c0ee1fc7c87c3175542961d580742d
Merge remote-tracking branch 'aeroevan/cm-11.0-aeroevan' into HEAD

Conflicts:
	drivers/net/wireless/bcmdhd/dhd_linux.c

Change-Id: I75c2afcd1e16f972734a3a45757e6db6275749f9