cpufreq interactive governor: event tracing

Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
cpufreq interactive governor: event tracing

Change-Id: Ic13614a3da2faa2d4bd215ca3eb7191614f0cf66
Signed-off-by: Todd Poynor <toddpoynor@google.com>
mmc: omap_hsmmc: Prevent calling mmc_host_lazy_disable() on suspend path

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ram_console: set CON_ANYTIME console flag

We want to ensure that we get all the console messages, even ones
that occur while the printing CPU is not yet online.

Change-Id: I1d2694d05ac9415669a92f38efdd8e71c927705b
Signed-off-by: Dima Zavin <dima@android.com>
usb: gadget: android: Don't allow changing the functions list if enabled

Change-Id: I3ad39b420ce79a8602a7eca1daac1f56b30bad5c
Signed-off-by: Benoit Goby <benoit@android.com>
mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Revert "usb: gadget: rndis: don't use dev_get_stats"

This reverts commit ffdab0c0c40bab6de78b1952bb07aed221994b73.

Not needed anymore in 2.6.39 and 3.0, dev_get_stats has been fixed
and may be called from atomic context. See:
1ac9ad1 net: remove dev_txq_stats_fold()
misc: remove android pmem driver, it's obsolete.
usb: gadget: Fix usb string id allocation

Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.

Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
usb: gadget: android: Honor CONFIG_USB_GADGET_VBUS_DRAW

The maximum current draw was hard coded to 500 mA.  composite.c
has code that uses CONFIG_USB_GADGET_VBUS_DRAW to set the
bMaxPower and to set whether or not the device is self-powered if
they haven't been set.  This change removes the code in android.c
to allow composite.c to set them.

Change-Id: I9db37922e91ee86e9e5c0e14519e119e5c41ca48
Signed-off-by: Scott Anderson <saa@google.com>

Conflicts:

	drivers/usb/gadget/android.c
Input: evdev - Don't hold wakelock when no data is available to user-space

If there is no SYN_REPORT event in the buffer the buffer data is invisible
to user-space. The wakelock should not be held in this case.

Change-Id: Idae890ff0da8eb46a2cfce61a95b3a97252551ad
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Input: evdev - Add ioctl to block suspend while event queue is not empty.

Add an ioctl, EVIOCSSUSPENDBLOCK, to enable a wakelock that will block
suspend while the event queue is not empty. This allows userspace code to
process input events while the device appears to be asleep.

The current code holds the wakelock for up 5 seconds for every input
device and client. This can prevent suspend if sensor with a high data
rate is active, even when that sensor is not capable of waking the
device once it is suspended.

Change-Id: I624d66ef30a0b3abb543685c343382b8419b42b9
Signed-off-by: Arve Hjønnevåg <arve@android.com>
serial: omap: disable serial port irq during suspend

If the serial port interrupt is left enabled during suspend, it
can fire during uart_resume_port, while the uart is in an
undefined state and the port lock is not held.

Disable the interrupt in serial_omap_suspend, and enable it in
serial_omap_resume.  This also requires moving the request_irq
into probe, instead of startup, so that the irq is always
available to disable.

Change-Id: Iaa88fa527b056828303fe1fbad6883b720278440
Signed-off-by: Colin Cross <ccross@android.com>
MFD: TWL 6030: clear IRQ status register only once

TWL6030 family of PMIC use a shadow interrupt status register
while kernel processes the current interrupt event.
However, any write(0 or 1) to register INT_STS_A, INT_STS_B or
INT_STS_C clears all 3 interrupt status registers.

Since clear of the interrupt is done on 32k clk, depending on I2C
bus speed, we could in-adverently clear the status of a interrupt
status pending on shadow register in the current implementation.
This is due to the fact that multi-byte i2c write operation into
three seperate status register could result in multiple load
and clear of status and result in lost interrupts.

Instead, doing a single byte write to INT_STS_A register with 0x0
will clear all three interrupt status registers without the related
risk.

Change-Id: Iba62dd1caeabf8c2db21d1b6c9fd62455f73205e
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4: trim_quirks: Fix wrong implementation of erratum i684

OMAP4430 erratum i684:
Due to trimming program issue and a related architectural issue,
the LPDDR I/O and Smart I/O was not trimmed correctly on certain
OMAP4430 revisions. The default value in CONTROL_EFUSE_2 is not
correct and requires to be over-ridden by software.
Units with ProdID[51:50]=11 are not impacted by this issue.

Workaround:
For all affected OMAP4430 units, the value of CONTROL_EFUSE_2 must
be overwritten with 0x004E4000.

Current implementation impacts all OMAP4, hence the fix
restricts to implement the WA only for OMAP4430 affected units. The
wrong value overriden to SoCs not impacted such as OMAP4460 can
cause memory instability in samples as the override
trim value was purposed purely for erratum impacted samples.

Change-Id: I747181ce25eb2574e2b91b5a0a102c538f43b632
Signed-off-by: Konstantin Shlyakhovoy <x0155534@ti.com>
ARM: OMAP4: cpuidle: prevent CPU1 from locking CPU0 in idle entry

We can have a lockup scenario when two cpu are spin waiting for each other:

CPU0:
	omap4_enter_idle()
		|---omap4_enter_idle_primary()
			|---------while (omap4_idle_requested_cx[1])
					cpu_relax();

CPU1:
	omap4_enter_idle()
		|----
		while ((omap4_idle_ready_count == 0) && omap4_all_cpus_idle()) {
			spin_unlock(&omap4_idle_lock);
			cpu_relax();
			spin_lock(&omap4_idle_lock);
		}

Depend on idle ready count to let CPU0 to progress forward.

Change-Id: Ida6b60f618e8078701fcad8d976c3f1620cc71e6
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Yuan Jiangli <jlyuan@motorola.com>
Merge branch 'ics.add' into ics
ASoC: twl6040: Remove invalid LP constraints

TWL6040 codec supports all its features and paths when using the
Low-Power PLL regardless of 44.1kHz or 48kHz configuration, so
current software constraints are removed.

Change-Id: I5aefe324dee35888f8bcc04fff0ea77d864b6ab4
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: twl6040: Use single set of PLL ids

Use a single set of TWL6040 PLL ids: TWL6040_LPPLL_ID and
TWL6040_HPPLL_ID; redundant PLL definitions are removed.

Change-Id: I9d396dafccc95054130a8f2fc691a84d2cabc759
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: twl6040: Configure PLL during hw_params

Configure TWL6040 PLL during hw_params() operation since at that
point the final PLL settings are known. Current PLL configuration
done at DAI sysclk handler is redundant and hence removed.

Change-Id: If72b6ac2145dad7f3756e19390181642021b5838
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>