Wifi sleep power mode sysfs
0 is PM_MAX (default), 1 is PM_FAST
path is /sys/module/bcmdhd/parameters/wifi_pm

original commit by KalimochoAz
adapted to Android 4.3 kernel by boype
wireless/bcmdhd: option to override suspend dtim_skip (sysfs)

When suspended, a certain amount of DTIMs are skipped in order to
save battery. The downside is, however, that e.g. push messages
are received with some delay. The override forces the wireless
adapter to pass all DTIMs.

The sysfs entry can be used to switch DTIM skip overriding on and
off. Also, it is possible to define which nth number of DTIMs is
picked up.

The sysfs path is:
/sys/module/bcmdhd/parameters/dtim_skip_override

Setting the sysfs variable to 0 disables the override and forces
the wireless driver to use the standard behavior. Setting it to 1
disables DTIM skipping and forces the driver to process all DTIMs.
Setting it to any value above 1, e.g. to 3, means that every third
DTIM request is processed.

Default value is set to 0.
OMAP4: PM: fix overconsumption on OFF mode

The wrong value of CM_L3INIT_CLKSTCTRL.CLKTRCTRL = 2 (SW_WKUP)
has been stored in SAR during omap4_sar_save() execution and
causes power over consumption on OFF mode due to C2C operation.
It happens because the L3INIT CD need to be enabled during
omap4_sar_save() execution for proper USBHOST module context storing.

Problematic use case:
1) OMAP goes to sleep,
2) modem wakeup the C2C, the EMIF but the MPU is still sleeping
(as expected)
3) Modem release all his constraints, C2C is turned to OFF.
4) but OMAP never reach again OFF while we don't wakeup the CPU
(by a keypress for example), sys_clk is already ON and voltages
are not equal to 0. (OPP 50 for CORE_3 and retention voltages
for both VCORE1 and VCORE2).

As WA overwrite CM_L3INIT_CLKSTCTRL.CLKTRCTRL = 0x1 (SW_SLEEP).

Change-Id: I2e453c07f61bab28a7213dd66044fd41a021961b
Signed-off-by: Arthur Cassegrain <a-cassegrain@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Patch Set 1
omap2plus: cpufreq: Modify lpj recalculation logic

Somethimes "mdelay" function provide delay
that several times shorter than it should be.

This happens because recalculating lpj
performed after switching OPP. In this case,
for short period of time, when OPP on MPU
was switched but lpj was not recalculated,
"udelay" function can provide incorrect
delay - upto 5 times shorter
(if OPP was switched from lowest to highest).

This patch changes lpj recalculation logic to:
if OPP will be switched to higher - recalculate lpj before switching OPP,
if OPP will be switched to lower - recalculate lpj after switching OPP.

Change-Id: I3258e756c471fd0258a849d712ab00f4e1279ea9
Signed-off-by: Sergii Postulga <x0153364@ti.com>