7 years agochromeos: config: renormalize cfgs and drop debug_ll
Rhyland Klein [Mon, 16 Jul 2012 19:43:50 +0000]
chromeos: config: renormalize cfgs and drop debug_ll

Renormalize split configs based on current TOT k3.1 kernel and
remove DEBUG_LL to clean up the kernel log a bit.

TEST=Verified generated config doesn't prompt.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Change-Id: Ib13e633742a2c4e0060629d145e0571e7a7d5241
Reviewed-on: http://git-master/r/116136
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>

7 years agoasoc: tegra: p852: Added machine driver for P852
Nitin Pai [Fri, 6 Jul 2012 11:01:11 +0000]
asoc: tegra: p852: Added machine driver for P852

Renamed P1852 machine driver to VCM so that can be used
for P1852/P852 and E1853 as well.

Bug 1008391

Signed-off-by: Nitin Pai <npai@nvidia.com>
Reviewed-on: http://git-master/r/113886
(cherry picked from commit 5eb23e30bab716b28146b85438989e58761c7136)
Change-Id: I8d1363a6419c6381b8d23ebd38d625fb482084dc
Reviewed-on: http://git-master/r/116056
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

7 years agoARM: Tegra3: clocks: optional se.cbus
Mohit Kataria [Wed, 20 Jun 2012 05:29:37 +0000]
ARM: Tegra3: clocks: optional se.cbus

Made se.cbus optional so that se clock can be derived
from other clocks and not just from the clocks which drive cbus.

Added config option for the same.

Bug 978870

Change-Id: I7b5bf405efb58bbb53143f52d2bfe0ebcf6b8322
Signed-off-by: Mohit Kataria <mkataria@nvidia.com>
Reviewed-on: http://git-master/r/110827
(cherry picked from commit 35e9017b79a3a4b4e0b4098cd2e63ad24018d3de)
Reviewed-on: http://git-master/r/106397
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

7 years agoARM: tegra: thermal: Call pm register only once
Joshua Primero [Tue, 17 Jul 2012 00:09:42 +0000]
ARM: tegra: thermal: Call pm register only once

Fixed bug where pm register was being called multiple times.

Change-Id: I32f7b10547275e0a9bdad1073f9842589180c0f8
Signed-off-by: Joshua Primero <jprimero@nvidia.com>
Reviewed-on: http://git-master/r/116203
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

7 years agoarm: tegra: pcie: Enable cardhu a02+ Dock detect GPIO
Jay Agarwal [Fri, 13 Jul 2012 12:50:18 +0000]
arm: tegra: pcie: Enable cardhu a02+ Dock detect GPIO

Set E_INPUT and PUPD bit of GPIO_PU4 used for dock
detect event for cardhu a02+ board versions and
hence enable pcie hotplug for them.

Bug 955043
Bug 1009086
Bug 1016722

Change-Id: Ibb66e5bc6fd9cf5333a81988b975b611fe9c5312
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/115692
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agonet: wireless: bcmdhd: disable WLC_E_TXFAIL event.
Narayan Reddy [Fri, 13 Jul 2012 09:09:54 +0000]
net: wireless: bcmdhd: disable WLC_E_TXFAIL event.

In suspend mode WLC_E_TXFAIL event is causing autowake
when the device is connected to an AP, so discarding the
WLC_E_TXFAIL event initialization as per BRCM team suggestion.

Bug 1014610

Change-Id: I297dab7ee589f458bba3e26be090665a36c78502
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: http://git-master/r/115633
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agonet: usb: raw-ip: support more rmnet interfaces
Vinayak Pane [Fri, 29 Jun 2012 23:31:15 +0000]
net: usb: raw-ip: support more rmnet interfaces

New requirement to support upto 5 rmnet interfaces with
raw-ip. Driver will be able to support dynamically multiple
number of interfaces, maximum to 5.

Bug 1006183

Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/112790
(cherry picked from commit 0dde53830d9e21004b2e90c1b997a54c89767fa1)

Change-Id: I8166c448dbfef0391491ffdef9dff2b0e2693d75
Reviewed-on: http://git-master/r/115611
Tested-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Steve Lin <stlin@nvidia.com>

7 years agoarm: tegra: xmm: flashed modem start with hsic_active low
Vinayak Pane [Fri, 29 Jun 2012 20:08:36 +0000]
arm: tegra: xmm: flashed modem start with hsic_active low

Flashed modem should start with hsic_active signal as low.
The hsic register is done at falling edge of ap_wake.

Bug 1006183

Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/112781
(cherry picked from commit 6437d1453d2a7694c2efa183cff135297f9f45e3)

Change-Id: I7bf355088096788b030fd861ef257a9f635c66e7
Reviewed-on: http://git-master/r/115610
Tested-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Steve Lin <stlin@nvidia.com>

7 years agousb: serial: baseband: buffer allocations at init
Vinayak Pane [Wed, 21 Mar 2012 22:06:43 +0000]
usb: serial: baseband: buffer allocations at init

The usb transaction buffers are allocated in module init.
In device open, close and disconnect the buffers will not be
freed. Instead they will be reused to avoid allocation failure
in low-mem conditions.

The usb driver register moved to init so that rmmod and
insmod is not required.

Bug 956211

Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/109935
(cherry picked from commit a4e8219a86f80fd06aaaae2c40a657098d5dcfa5)

Change-Id: Id88cfe3b0a75cb2e6f39176b5297f81f4f9e978b
Reviewed-on: http://git-master/r/115609
Tested-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Steve Lin <stlin@nvidia.com>

7 years agoARM: tegra: curacao_sim: Enable ashmem service
Lauri Peltonen [Fri, 27 Jul 2012 13:29:16 +0000]
ARM: tegra: curacao_sim: Enable ashmem service

Enable ashmem service which is required on Android.

Change-Id: I11abf0d543260ebd7c91fb3f50c3f685ad0055eb
Reviewed-on: http://git-master/r/118985
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lauri Peltonen <lpeltonen@nvidia.com>
Tested-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Mark Stadler <mastadler@nvidia.com>

7 years agoARM: tegra: remove duplicate file inclusions
Bitan Biswas [Fri, 27 Jul 2012 10:51:57 +0000]
ARM: tegra: remove duplicate file inclusions

Tegra2 or Tegra3 specific files are included multiple time.
Conditions used when including files are also changing. This
patch cleans the Makefile in above respect.

Change-Id: I9d21db141909ded1f44ed56590ea824d4e0b5de6
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/118943
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agotegra: dc: fix build errors
Seshendra Gadagottu [Fri, 27 Jul 2012 00:51:23 +0000]
tegra: dc: fix build errors

Fixed compilation erros with CONFIG_TEGRA_DC enable:
1. Unused variables in dc.c and board-curacao-panel.c
2. Merge issue related to window.c

Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Change-Id: I087b6f15b68ef5fa9739c84dc3abc81db7d7b9d2
Reviewed-on: http://git-master/r/118821
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: dvfs: Update CL-DVFS clock definitions
Alex Frid [Wed, 25 Jul 2012 04:17:00 +0000]
ARM: tegra11: dvfs: Update CL-DVFS clock definitions

- Added i2c fast clock to CL_DVFS clocks
- Limited CL_DVFS parent clocks to PLLP and CLKM only
- Changed device id for CL_DVFS clocks to "cpu_cl_dvfs"

Bug 871124

Change-Id: Ife7883a096aef30c351704c960a153047d14284f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/118471
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agoARM: tegra11: dvfs: Re-factor CL-DVFS initialization
Alex Frid [Tue, 24 Jul 2012 03:16:14 +0000]
ARM: tegra11: dvfs: Re-factor CL-DVFS initialization

Moved clock binding for CL-DVFS control logic from common code
to SoC-specific DFLL clock initialization.

Instead of indirect access to safe dvfs table through CPU clock,
use direct access pointer in CL-DVFS object. This pointer is still
populated with CPI legacy dvfs reference.

Serialized DFLL initialization with CPU clock operations, since DFLL
is enabled as possible CPU clock source as a result of initialization.

Bug 871124

Change-Id: I90be05c27dcd9380403380f80c849f1d3f5b51e3
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/118470
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoARM: tegra11: dvfs: Wait for CL_DVFS pending transaction
Alex Frid [Tue, 24 Jul 2012 19:48:03 +0000]
ARM: tegra11: dvfs: Wait for CL_DVFS pending transaction

When disabling CL-DVFS output interface, wait for pending I2C
transaction to complete.

Bug 871124

Change-Id: I7afebc0d218f29bd3efec04cf8dafd9fc767ece7
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/118469
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoARM: tegra11: dvfs: Update CL-DVFS configuration
Alex Frid [Mon, 23 Jul 2012 23:23:39 +0000]
ARM: tegra11: dvfs: Update CL-DVFS configuration

- Account for gain control scale in force value calculation
- Use hs mode rate only as mode support indicator (allow zero
hs master code to be specified)
- Round up rate dividers so that final rate is always below
- Fixed I2C divisor fields definitions

Bug 871124

Change-Id: I41721432e0fa74751342baced7bdda7fcf3a560e
Signed-off-by: Alex Frid <afrid@nvidia.com>


Change-Id: I6c7eb02622889aae10e11d7a8bccd755008e43ad
Reviewed-on: http://git-master/r/118468
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoarm: tegra: usb: removal of WAR for SOF
Suresh Mangipudi [Tue, 24 Jul 2012 06:19:49 +0000]
arm: tegra: usb: removal of WAR for SOF

NULL phy while switching from FS to HS will lead to incorrect line
state and a dropped packet. This issue is fixed in T11x.
Hence remove the WAR.

Bug 969330

Change-Id: I79bb3e311053252839d2c0474d6908b23337f8a4
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/117939
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoarm: tegra: usb: restore the AP/modem handshaking
Suresh Mangipudi [Tue, 24 Jul 2012 06:17:40 +0000]
arm: tegra: usb: restore the AP/modem handshaking

Restore the AP/modem handshaking functions and clean up the null
phy driver.

Bug 996035

Change-Id: I5a7f4af217b1ae99b56c6b82cdc4417cc20f5ca0
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/117938
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Varun Wadekar [Wed, 25 Jul 2012 07:36:09 +0000]

Android kernel v3.4 no longer supports early_suspend state. So we
cannot change the governor to achieve low power with display off
in the kernel. This has to happen from the user space when we
switch from interactive to non-interactive state.

Bug 959487

Change-Id: I4bdc7058a4bdbdd54c7856d83db78b44bf0ec110
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/118287
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: Use CPU private timer for LP2
Bo Yan [Wed, 25 Jul 2012 01:32:12 +0000]
ARM: tegra11: Use CPU private timer for LP2

There is no new change for T20 and T30. For SoCs with arch timer
support, arch timer is used for LP2 accounting.

Also removed ARM_SMP_TWD option from Kconfig, it's no longer
necessary and deprecated.

Change-Id: I4292e333df97da296318224e0aa1411330f67900
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/118365
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>

7 years agoARM: Tegra: remove early_suspend/late_resume use
Varun Wadekar [Wed, 25 Jul 2012 07:24:41 +0000]
ARM: Tegra: remove early_suspend/late_resume use

Bug 959487

Change-Id: Iab813eab0f93a547bb5c94de46ea9a2e7edaab54
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/118286
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoarm: config: tegra20: Disable GART and SMMU
Bo Yan [Mon, 23 Jul 2012 20:14:49 +0000]
arm: config: tegra20: Disable GART and SMMU

This is to fix the broken T20 build.

Change-Id: I7970e95a22a2bac079fe064ee602112b0a4bb36d
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/117751
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoUSB: gadget: tegra: SW WAR for dTD issue
Krishna Yarlagadda [Mon, 18 Jun 2012 15:09:34 +0000]
USB: gadget: tegra: SW WAR for dTD issue

SW WAR implementation for h/w issue observed on all tegra platforms
Adding a dTD to a Primed Endpoint May Not Get Recognized

TD freeing will be delayed until next TD is completed

Bug 1002166
Bug 989108

(cherry-picked from  http://git-master/r/#change,109562)

Change-Id: I22690a15e2a7e83b4a3812a72242ef8c75f3626e
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/117640
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoMerge remote branch 'origin/dev/android-t114-3.4-next' into promotion_build
Rohan Somvanshi [Thu, 26 Jul 2012 17:22:18 +0000]
Merge remote branch 'origin/dev/android-t114-3.4-next' into promotion_build

7 years agoARM: tegra: nvmap: Add missing newline in kernel messages
Hiro Sugawara [Tue, 12 Jun 2012 20:23:50 +0000]
ARM: tegra: nvmap: Add missing newline in kernel messages

Change-Id: I96547276254c2d3c02d7b43f8eeb2ba6255e3c7d
Signed-off-by: Hiro Sugawara <hsugawara@nvidia.com>
Reviewed-on: http://git-master/r/118147
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoARM: tegra: Increase meminfo array size
Hiro Sugawara [Tue, 24 Jul 2012 18:07:19 +0000]
ARM: tegra: Increase meminfo array size

SOCs supporting full 4GB physical memory need fragmented physical
memory information passed in kernel command line.

Change-Id: I19501a3f03db2467c746384cf1a9e390b1a6742d
Signed-off-by: Hiro Sugawara <hsugawara@nvidia.com>
Reviewed-on: http://git-master/r/118116
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra: New macro name for LP2 timer config
Bo Yan [Tue, 24 Jul 2012 17:03:39 +0000]
ARM: tegra: New macro name for LP2 timer config

The config macro TEGRA_LP2_ARM_TWD was defined when only Cortex-A9
was used in Tegra SoC, but the feature enabled by this configuration
option is not just for Cortex-A9. In fact, any CPU with private timer
can make use of this feature. Therefore, change macro name to a more
generic one "TEGRA_LP2_CPU_TIMER" so it can be used with new CPU
architecture (CortexA15)

Change-Id: I6903dba056c554c72bb8d1416df90145a4043295
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/118099
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>

7 years agoARM: tegra11: clock: Add XUSB clocks support
Alex Frid [Tue, 17 Jul 2012 05:56:56 +0000]
ARM: tegra11: clock: Add XUSB clocks support

Change-Id: I754ad041eb884dcf6f8451cb595ab6f9d3c3626c
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/117735
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoARM: tegra11: clock: Add PLLU secondary outputs
Alex Frid [Sun, 8 Jul 2012 06:57:24 +0000]
ARM: tegra11: clock: Add PLLU secondary outputs

Change-Id: Ifaedbaaff309529d763df82d1c53187c622f9fd5
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/117734
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

7 years agoAsoc: tegra: Update ALSA driver
Vijay Mali [Sat, 21 Jul 2012 11:48:49 +0000]
Asoc: tegra: Update ALSA driver

Machine driver change for new platforms.
Fixed clocks in I2S driver for validation on FPGA.
List ALSA driver in kconfig.

Change-Id: If8dcefe2502b28eaa9fe9fbbb7af59bd2ab401a0
Signed-off-by: Vijay Mali <vmali@nvidia.com>
Reviewed-on: http://git-master/r/117528
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agomfd: ricoh583: fix sectionmismatch for ricoh583_i2c_probe
Peter De Schrijver [Thu, 19 Jul 2012 12:48:35 +0000]
mfd: ricoh583: fix sectionmismatch for ricoh583_i2c_probe

ricoh583_i2c_probe calls various functions in the __devinit section. Hence
as a probe function there is no problem to also make it part of that section.

Change-Id: I520f28b72cbae4426eade6a177cd99dfc5f02cd0
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: http://git-master/r/117055
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agoarm: tegra: usb: Disable the usb WAR for MEM_ALIGNMENT
Suresh Mangipudi [Mon, 9 Jul 2012 04:09:57 +0000]
arm: tegra: usb: Disable the usb WAR for MEM_ALIGNMENT

Disable the USB WAR for T114, as the WAR's are not needed for T114.

Bug 969252

Change-Id: I5a50749dfe0fd6f73fc496c850585181c8b8db21
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/116348
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoMerge commit 'v3.4.6' into android-t114-3.4
Varun Wadekar [Wed, 25 Jul 2012 10:35:49 +0000]
Merge commit 'v3.4.6' into android-t114-3.4

Linux v3.4.6

Change-Id: I4518a173ca2852188ebd48121723c8be29d0c682
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoMerge branch 'android-t114-3.4-rebased' into android-t114-3.4
Varun Wadekar [Wed, 25 Jul 2012 05:13:51 +0000]
Merge branch 'android-t114-3.4-rebased' into android-t114-3.4

7 years agopm: remove early_suspend/late_resume uses
Varun Wadekar [Wed, 25 Jul 2012 04:32:51 +0000]
pm: remove early_suspend/late_resume uses

Android kernel based on kernel v3.4, no longer uses early_suspend and late_resume

Bug 959487

Change-Id: Ib2b50b91ee550824a1082046a37ba25fc98eef84
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra11: Save & restore timer registers
Bo Yan [Sat, 16 Jun 2012 07:17:31 +0000]
ARM: tegra11: Save & restore timer registers

Save & restore generic timer registers across cluster switch.

Change-Id: I8a7e131dede5b21259868edf4fff2df8a20c93c2
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/116859
Reviewed-by: Automatic_Commit_Validation_User

7 years agoMerge branch 'android-t114-3.4-rebased' into android-t114-3.4
Varun Wadekar [Tue, 24 Jul 2012 05:36:26 +0000]
Merge branch 'android-t114-3.4-rebased' into android-t114-3.4

7 years agopm: EDP: adding client registration
Sivaram Nair [Tue, 3 Jul 2012 14:20:58 +0000]
pm: EDP: adding client registration

This patch adds client registration functionality to the existing EDP

Bug ID: 917926

Change-Id: I8c9fbe3e1d934a6d95745f3c3933df4c1cbea4e7
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/115706
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

7 years agopm: EDP: introducing EDP manager
Sivaram Nair [Tue, 3 Jul 2012 09:16:17 +0000]
pm: EDP: introducing EDP manager

This patch introduces EDP manager - the central piece of software which
dynamically allocates current sourcing capacity to EDP client drivers
for use by their devices.

Bug ID: 917926

Change-Id: I67d72c8c7738edf11ccfc8fdb73e86a02f653967
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/115696
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

7 years agoARM: Tegra30: defconfig: enable CONFIG_PM_WAKELOCKS
Varun Wadekar [Mon, 23 Jul 2012 10:52:37 +0000]
ARM: Tegra30: defconfig: enable CONFIG_PM_WAKELOCKS

Change-Id: Ib7397c0bce750cc1b4c0574e341de9d7b8049340
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agocpufreq: governor: interactive: fix compilation errors
Varun Wadekar [Mon, 23 Jul 2012 10:03:18 +0000]
cpufreq: governor: interactive: fix compilation errors

Change-Id: Ibc22f8feee42c56583aa20f8945fff9f3152e7a1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: fiq_debugger: add process context reboot command
Colin Cross [Fri, 20 Jul 2012 01:40:04 +0000]
ARM: fiq_debugger: add process context reboot command

kernel_restart cannot be called from interrupt context.  Add support for
commands called from a work function, and implement the "reboot" command
there.  Also rename the existing irq-mode command to "reset" and change
it to use machine_restart instead of kernel_restart.

Change-Id: I3c423147c01db03d89e95a5b99096ca89462079f
Signed-off-by: Colin Cross <ccross@android.com>

7 years agopower: smb347: manage EN pin if given in pdata
Todd Poynor [Thu, 19 Jul 2012 07:31:40 +0000]
power: smb347: manage EN pin if given in pdata

Change-Id: Ie6c6828dc382aaacdd8cb1d3f5d19e9c8bb7d843
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agoPM / Sleep: Print name of wakeup source that aborts suspend
Todd Poynor [Sat, 14 Jul 2012 02:11:53 +0000]
PM / Sleep: Print name of wakeup source that aborts suspend

Change-Id: I32610f93bedef1bbc396d55e09263b4d2424503c
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agoPM / Sleep: call early resume handlers when suspend_noirq fails
Colin Cross [Thu, 19 Jul 2012 01:55:26 +0000]
PM / Sleep: call early resume handlers when suspend_noirq fails

Commit cf579dfb82550e34de7ccf3ef090d8b834ccd3a9 (PM / Sleep: Introduce
"late suspend" and "early resume" of devices) introduced a bug where
suspend_late handlers would be called, but if dpm_suspend_noirq returned
an error the early_resume handlers would never be called.  All devices
would end up on the dpm_late_early_list, and would never be resumed

Fix it by calling dpm_resume_early when dpm_suspend_noirq returns
an error.

Change-Id: I9b984e40c523240bc08f5496183dec763cfef963
Signed-off-by: Colin Cross <ccross@android.com>

7 years agopower: smb347: Stop charging on termination current status or irq
Todd Poynor [Thu, 19 Jul 2012 01:47:01 +0000]
power: smb347: Stop charging on termination current status or irq

The IRQ bts often don't read as set for whatever reason.

Change-Id: Ic23c58da502280e7968410d677b06931a420aa68
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Add POWER_SUPPLY_PROP_CHARGE_ENABLED
Todd Poynor [Thu, 19 Jul 2012 00:16:15 +0000]

Change-Id: Ie62854ae813802d9a57f948917f3275b00e218ea
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED
Todd Poynor [Wed, 18 Jul 2012 23:28:50 +0000]
power: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED

Change-Id: I3e93b502452811cbfc4d904202b4f1d94edc143d
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Disable charging when charge done to ACK the interrupt
Todd Poynor [Wed, 18 Jul 2012 23:05:30 +0000]
power: smb347: Disable charging when charge done to ACK the interrupt

Change-Id: Ibbbb11d8115cd9ab8fb2da9f2bbb538f98c30ebc
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agonet: wireless: bcmdhd: Fix crash if bus->sih was freed
Dmitry Shmidt [Wed, 18 Jul 2012 23:53:33 +0000]
net: wireless: bcmdhd: Fix crash if bus->sih was freed

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

7 years agonet: wireless: bcmdhd: Prevent HT Avail request failure to flood the log
Dmitry Shmidt [Wed, 18 Jul 2012 18:15:10 +0000]
net: wireless: bcmdhd: Prevent HT Avail request failure to flood the log

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>



7 years agopower: smb347: wait for resume before enable interrupt
Todd Poynor [Wed, 18 Jul 2012 00:57:02 +0000]
power: smb347: wait for resume before enable interrupt

Avoid access to I2C bus before bus is resumed.

Change-Id: I8c7d97fcfa08b735e6374852b66aee7b44b3a1ec
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agoARM: ftrace: Trace function entry before updating index
Colin Cross [Tue, 17 Jul 2012 01:24:33 +0000]
ARM: ftrace: Trace function entry before updating index

Commit 722b3c74695377d11d18a52f3da08114d37f3f37 modified x86 ftrace to
avoid tracing all functions called from irqs when function graph was
used with a filter.  Port the same fix to ARM.

Change-Id: I3facbb85447effe54ff92db206068087c892fc28
Signed-off-by: Colin Cross <ccross@android.com>

7 years agopower: smb347: enable wake for interrupt
Todd Poynor [Fri, 13 Jul 2012 22:37:53 +0000]
power: smb347: enable wake for interrupt

Based on code from HongMin Son <hongmin.son@samsung.com>

Change-Id: I6669f9bfdf40e0de396b9f42732efc101d9343dd
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: HongMin Son <hongmin.son@samsung.com>

7 years agocpufreq: interactive: remove input_boost handling
Todd Poynor [Tue, 17 Jul 2012 00:32:44 +0000]
cpufreq: interactive: remove input_boost handling

Now handled in userspace Power HAL instead.

Change-Id: I78a4a2fd471308bfcd785bbefcc65fede27314cf
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agocpufreq: interactive: handle speed up and down in the realtime task
Todd Poynor [Tue, 17 Jul 2012 00:07:15 +0000]
cpufreq: interactive: handle speed up and down in the realtime task

Not useful to have a separate, non-realtime workqueue for speed down
events, avoid priority inversion for speed up events.

Change-Id: Iddcd05545245c847aa1bbe0b8790092914c813d2
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agocpufreq: interactive: keep freezer happy when not current governor
Sam Leffler [Wed, 27 Jun 2012 19:55:56 +0000]
cpufreq: interactive: keep freezer happy when not current governor

Fix a problem where the hung task mechanism was deeming the interactive
clock boost thread as hung.  This was because the thread is created at
module init but never run/woken up until needed.  If the governor is not
being used this can be forever.  To workaround this explicitly wake up
the thread once all the necessary data structures are initialized.  The
latter required some minor code shuffle.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: Ie2c058dd75dcb6460ea10e7ac997e46baf66b1fe

7 years agocpufreq: interactive: take idle notifications only when active
Sam Leffler [Wed, 27 Jun 2012 17:12:04 +0000]
cpufreq: interactive: take idle notifications only when active

Register an idle notifier only when the governor is active.  Also
short-circuit work of idle end if the governor is not enabled.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: I4cae36dd2e7389540d337d74745ffbaa0131870f

7 years agopower: smb347: add POWER_SUPPLY_PROP_USB_OTG
Todd Poynor [Fri, 13 Jul 2012 20:30:55 +0000]
power: smb347: add POWER_SUPPLY_PROP_USB_OTG

Based on code from HongMin Son <hongmin.son@samsung.com>

Change-Id: I8b47ff41fb170aac60d1cbe5cf609fca72f8eb41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: HongMin Son <hongmin.son@samsung.com>

7 years agopower: power_supply: add POWER_SUPPLY_PROP_USB_OTG
Todd Poynor [Fri, 13 Jul 2012 20:30:04 +0000]
power: power_supply: add POWER_SUPPLY_PROP_USB_OTG

Change-Id: Idfc6ef2e37d62aad6f26cc8eafa53db642cd352b
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: power_supply: move POWER_SUPPLY_PROP_USB_HC to type 'int' order
Todd Poynor [Fri, 13 Jul 2012 03:27:16 +0000]
power: power_supply: move POWER_SUPPLY_PROP_USB_HC to type 'int' order

Change-Id: I001af30ab5fe06dde5f368241f21b9e0864777a1
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Add platform data for reg vs. pin control of USB mode
Todd Poynor [Fri, 13 Jul 2012 02:05:56 +0000]
power: smb347: Add platform data for reg vs. pin control of USB mode

USB5/1/HC or USB9/1.5/HC will be selected by pin if true, else
selected by register via POWER_SUPPLY_PROP_USB_HC.

Change-Id: Ib2aff319c0fbae36bc3f1bab1b2048a52741a579
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agosync: optimize fence merges
Erik Gilling [Thu, 12 Jul 2012 00:13:50 +0000]
sync: optimize fence merges

If the two fences being merged contain sync_pts from the same timeline,
those two pts will be collapsed into a single pt representing the latter
of the two.

Change-Id: Iced7ebb7e5a17a0c8b1a2969ba3388a4edb9ecaf
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agosync: reorder sync_fence_release
Erik Gilling [Thu, 12 Jul 2012 00:07:39 +0000]
sync: reorder sync_fence_release

Previously fence's pts were freed before the were the fence was removed from the
global fence list.  This led to a race with the debugfs support where it would
iterate over sync_pts that had been freed.

Change-Id: Ia3ddbf77de42ca593fc2dc353b5d04e42ddf3946
Signed-off-by: Erik Gilling <konkers@android.com>

7 years agousb: gadget: Fix usb string id allocation
Benoit Goby [Fri, 20 Jan 2012 22:42:41 +0000]
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>

7 years agopower: smb347: Make POWER_SUPPLY_PROP_USB_HC readable
Todd Poynor [Wed, 11 Jul 2012 01:25:40 +0000]
power: smb347: Make POWER_SUPPLY_PROP_USB_HC readable

Avoid runtime errors.

Change-Id: Ib48f179d97c3c5be33a8050423d6c6f549536eb4
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Don't skip setting POWER_SUPPLY_PROP_USB_HC if offline
Todd Poynor [Wed, 11 Jul 2012 01:27:29 +0000]
power: smb347: Don't skip setting POWER_SUPPLY_PROP_USB_HC if offline

Avoids runtime errors.

Change-Id: I04e37ecf6b70d4ddccdc95084451becf0c074eb1
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: update state if found changed on property get
Todd Poynor [Wed, 11 Jul 2012 01:01:19 +0000]
power: smb347: update state if found changed on property get

If charger connect status is found changed while retreiving a
property, update the associated driver state and send a
power_supply_changed() for the supplies.  In case an interrupt
was not received for the connection status change.

Change-Id: I8b9fe09dd883bf6c9be6c95e89ea5b9281c8bc6d
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347 Handle charger source connect events
Todd Poynor [Wed, 11 Jul 2012 00:58:29 +0000]
power: smb347 Handle charger source connect events

Undervoltage IRQs are signalled only on charger disconnect, not

* Update the comments to reflect this fact.
* Check for changed connected/disconnected status on any interrupt.

Change-Id: I4d542ae5fc94ce9386fdedc298dbc7d84a4e0d6b
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Use IRQF_ONESHOT for STAT interrupt
Todd Poynor [Tue, 10 Jul 2012 22:14:38 +0000]
power: smb347: Use IRQF_ONESHOT for STAT interrupt

From code by HongMin Son <hongmin.son@samsung.com>

Change-Id: I87645392efceff9ea2d0edd5bb84a089ccbd4f86
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: HongMin Son <hongmin.son@samsung.com>

7 years agopower: smb347: Add USB High Current property
Todd Poynor [Tue, 3 Jul 2012 22:52:30 +0000]
power: smb347: Add USB High Current property

Change-Id: I83a9945fa9713b18de5c4f140f215f216b0bc87a
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower_supply: Add custom property for USB High Current mode
Todd Poynor [Tue, 3 Jul 2012 22:41:20 +0000]
power_supply: Add custom property for USB High Current mode

For smb347.

Change-Id: I3323469072e1ee5085d61af8a89612b06b91f94a
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: Add settable current max property for mains
Todd Poynor [Tue, 3 Jul 2012 21:12:42 +0000]
power: smb347: Add settable current max property for mains

Change-Id: I85ff9fc07b9a9eefad40b729e27887f5a6c1cb84
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agopower: smb347: notify board code of power changes
Todd Poynor [Tue, 3 Jul 2012 05:49:37 +0000]
power: smb347: notify board code of power changes

smb347_battery power supply will use the supplied_to
provided by the board file in pdata, if any, and pass
along a power_supply_changed() for itself if provided.
The board file can use its external_power_changed callback
to be notified of changes in state of the smb347 mains, usb,
or battery supplies.

Change-Id: Idd08b7cc49c5f8c639907371b686fca255825079
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: Add explicit sync ioctl
Rebecca Schultz Zavin [Tue, 26 Jun 2012 20:17:34 +0000]
gpu: ion: Add explicit sync ioctl

This is deprecated in favor of using the dma_buf api which will
automatically sync a buffer to memory when it is mapped to a device.
However, that functionality is not ready, so this patch adds the
ability to sync a buffer explicitly.

Change-Id: Ia15810a13cd5c4b939f4afa5c8e721c89fac76d4
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Modify the system heap to try to allocate large/huge pages
Rebecca Schultz Zavin [Thu, 14 Jun 2012 20:30:01 +0000]
gpu: ion: Modify the system heap to try to allocate large/huge pages

On some systems there is a performance benefit to reducing tlb pressure
by minimizing the number of chunks in an allocation.

Change-Id: Ie6ff215a5f32a837bf3103f79a09748e38759f0e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Add cache maintenance to ion.
Rebecca Schultz Zavin [Thu, 14 Jun 2012 22:08:53 +0000]
gpu: ion: Add cache maintenance to ion.

This patch adds cache maintenance operations to ion.  As per mailing
list discussions regarding dma_buf, cache operations are done implicitly.
At buffer allocaiton time the user can select whether he'd like mappings
(both kernel and user) to be cached.  When cached mappings are selected,
no mappings will be created for a buffer at mmap time.  Instead pages will
be faulted in one at a time so we can track which pages require flushing
before dma.  When the buffers are mapped for dma (via the dma_buf apis)
any pages which were touched will be synced for device.

Change-Id: Id5d6894e8bb52af038c91dd895143bf3b4203b0b
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Switch max num_heaps to 16 to work around an issue elsewere
Rebecca Schultz Zavin [Mon, 25 Jun 2012 21:02:25 +0000]
gpu: ion: Switch max num_heaps to 16 to work around an issue elsewere

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

Change-Id: I3bcbc9c424086f5921a1641afeb16040deffcece

7 years agousb: gadget: accessory: Fix section mismatch
Benoit Goby [Sat, 23 Jun 2012 01:17:10 +0000]
usb: gadget: accessory: Fix section mismatch

create_bulk_endpoints should not be __init since it is called when
accessory is enabled

Change-Id: If827a4531f0f6c15af938345163923186368e2a5
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agopower_supply: convert wakelock to wakeup source
Todd Poynor [Wed, 20 Jun 2012 01:04:30 +0000]
power_supply: convert wakelock to wakeup source

And supply name will be used as wakeup source name.

Change-Id: I53075491c6e1a4c66755afe8a40b7166cd8d6cb2
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpio_input: convert from wakelocks to wakeup sources
Todd Poynor [Wed, 20 Jun 2012 04:06:47 +0000]
gpio_input: convert from wakelocks to wakeup sources

And add device names to wakeup source names

Change-Id: Ia5f2723319a2e749f00d6ec7d846edff6af6d5c2
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agogpu: ion: Fix bug in heap type enum
Rebecca Schultz Zavin [Thu, 14 Jun 2012 21:52:17 +0000]
gpu: ion: Fix bug in heap type enum

Change-Id: I8bf1345896774f02bd25c8d25a05d2c1eae262ef
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agocpuidle: fix error handling in __cpuidle_register_device
Colin Cross [Wed, 14 Mar 2012 18:29:51 +0000]
cpuidle: fix error handling in __cpuidle_register_device

Fix the error handling in __cpuidle_register_device to include
the missing list_del.  Move it to a label, which will simplify
the error handling when coupled states are added.

Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Colin Cross <ccross@android.com>

7 years agogpu: ion: Map only the vma size given
Laura Abbott [Fri, 16 Mar 2012 22:33:39 +0000]
gpu: ion: Map only the vma size given

When mapping carveout buffers into userspace, only map
the size of the vma given, not the full size of the buffer
since clients may map less than the buffer size.

Change-Id: I1b391b23219455e879a900d947c728db3c8c4a76
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

7 years agogpu: ion: Loop on the handle count when destroying
Laura Abbott [Thu, 7 Jun 2012 23:41:30 +0000]
gpu: ion: Loop on the handle count when destroying

When destroying a handle, all kernel mappings to that handle
should be destroyed. Other handles may still have references
and valid mappings to the buffer underneath which should not
be destroyed. Loop on the handle reference count, not the buffer
reference count to get rid of all kernel mappings for the handle.

Change-Id: I7dc5d6a86513fc5fa4e21110ceab434714ea2493
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

7 years agogpu: ion: ion_system_heap: Change allocations to GFP_HIGHUSER
Rebecca Schultz Zavin [Thu, 7 Jun 2012 23:59:59 +0000]
gpu: ion: ion_system_heap: Change allocations to GFP_HIGHUSER

Previously the ion_system_heap was using GFP_KERNEL, forcing all allocations
to be in lowmem.  This quickly causes us to run out of lowmem.

Change-Id: I6d502a5f1c20c8a8e44fb5903fcb228f8435a564
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agogpu: ion: Set the dma_address of the sg list at alloc time
Rebecca Schultz Zavin [Thu, 7 Jun 2012 21:51:21 +0000]
gpu: ion: Set the dma_address of the sg list at alloc time

This patch sets the dma_address field of the sglist representing
an allocation at allocation time.  This technically breaks the dma api
which states that these addresses should be set when a particular device
takes ownership of a buffer via the dma_map apis.  In the case of our
systems the only dma address space is physical addresses.  Additionally,
we can not afford the overhead of calling dma_map_sg from this location
as it implies a cache invalidate that is not necessary if the memory
was previously mapped cached.  Instead, the expectation is that memory
being returned from the heaps is ready for dma in that if any cached
mappings of that memory exist they have been invalidated.

Change-Id: Ib3025e80cee52ac0e9d809291e0196a084ea97bd
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

7 years agoRevert "net: wireless: bcmdhd: HACK - force active power mode"
Dmitry Shmidt [Mon, 11 Jun 2012 17:12:35 +0000]
Revert "net: wireless: bcmdhd: HACK - force active power mode"

This reverts commit 956df1fbda60f8767694699d66015587e6cee089.



7 years agousb: gadget: android: Add FunctionFS
Benoit Goby [Fri, 30 Mar 2012 02:25:23 +0000]
usb: gadget: android: Add FunctionFS

Add support for FunctionFS (ffs) to implement usb functions in userspace.

The aliases property stores the list of functions that are implemented
using functionfs.

For example:
echo "adb,mtp" > /sys/class/android_usb/android0/f_ffs/aliases

Then when the function are enabled:
echo "adb,acm" > /sys/class/android_usb/android0/functions
Internally, ffs and acm will be used.

Change-Id: I44117b183d48a5a99ddbee3ef2cf8998be74598e
Signed-off-by: Benoit Goby <benoit@android.com>

7 years agopower: Add option to log time spent in suspend
Colin Cross [Tue, 19 Jul 2011 19:33:45 +0000]
power: Add option to log time spent in suspend

Prints the time spent in suspend in the kernel log, and
keeps statistics on the time spent in suspend in

Change-Id: Ia6b9ebe4baa0f7f5cd211c6a4f7e813aefd3fa1d
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>

7 years agoepoll: Fix user space breakage related to EPOLLWAKEUP
Rafael J. Wysocki [Mon, 21 May 2012 19:20:48 +0000]
epoll: Fix user space breakage related to EPOLLWAKEUP

Commit 4d7e30d (epoll: Add a flag, EPOLLWAKEUP, to prevent
suspend while epoll events are ready) caused some applications to
malfunction, because they set the bit corresponding to the new
EPOLLWAKEUP flag in their eventpoll flags and they don't have the
new CAP_EPOLLWAKEUP capability.

To prevent that from happening, change epoll_ctl() to clear
EPOLLWAKEUP in epds.events if the caller doesn't have the
CAP_EPOLLWAKEUP capability instead of failing and returning an
error code, which allows the affected applications to function

Reported-and-tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoPM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format
Minho Ban [Mon, 14 May 2012 19:45:31 +0000]
PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format

Sometimes resume= parameter comes in integer style (e.g. major:minor)
and then name_to_dev_t can not detect partition properly. (especially
async device like usb, mmc).

This patch calls get_gendisk() if resumewait is true and resume_file
is in integer format to work around this problem.

Signed-off-by: Minho Ban <mhban@samsung.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoPM / Domains: Make it possible to add devices to inactive domains
Rafael J. Wysocki [Mon, 14 May 2012 19:45:52 +0000]
PM / Domains: Make it possible to add devices to inactive domains

The generic PM domains core code currently requires domains to be in
the "power on" state for adding devices to them, but this limitation
turns out to be inconvenient in some situations, so remove it.

For this purpose, make __pm_genpd_add_device() set the device's
need_restore flag if the domain is in the "power off" state, so that
the device's "restore state" (usually .runtime_resume()) callback
is executed when it is resumed after the domain has been turned on.
If the domain is in the "power on" state, the device's need_restore
flag will be cleared by __pm_genpd_add_device(), so that its "save
state" (usually .runtime_suspend()) callback is executed when the
domain is about to be turned off.  However, since that default
behavior need not be always desirable, add a helper function
pm_genpd_dev_need_restore() allowing a device's need_restore flag
to be set/unset at any time.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoPM / Sleep: User space wakeup sources garbage collector Kconfig option
Rafael J. Wysocki [Sat, 5 May 2012 19:57:28 +0000]
PM / Sleep: User space wakeup sources garbage collector Kconfig option

Make it possible to configure out the user space wakeup sources
garbage collector for debugging and default Android builds.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Arve Hjønnevåg <arve@android.com>

7 years agoPM / Sleep: Make the limit of user space wakeup sources configurable
Rafael J. Wysocki [Sat, 5 May 2012 19:57:20 +0000]
PM / Sleep: Make the limit of user space wakeup sources configurable

Make it possible to configure out the check against the limit of
user space wakeup sources for debugging and default Android builds.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Arve Hjønnevåg <arve@android.com>

7 years agoPM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
Marcos Paulo de Souza [Wed, 2 May 2012 12:33:37 +0000]
PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo

sysfs was expected in this context.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoPM / Sleep: Fix a mistake in a conditional in autosleep_store()
Arve Hjønnevåg [Thu, 3 May 2012 22:14:21 +0000]
PM / Sleep: Fix a mistake in a conditional in autosleep_store()

The condition check in autosleep_store() is incorrect and prevents
/sys/power/autosleep from working as advertised.  Fix that.

[rjw: Added the changelog.]

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoepoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
Arve Hjønnevåg [Tue, 1 May 2012 19:33:34 +0000]
epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready

When an epoll_event, that has the EPOLLWAKEUP flag set, is ready, a
wakeup_source will be active to prevent suspend. This can be used to
handle wakeup events from a driver that support poll, e.g. input, if
that driver wakes up the waitqueue passed to epoll before allowing

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

7 years agoPM / Sleep: Add user space interface for manipulating wakeup sources, v3
Rafael J. Wysocki [Sun, 29 Apr 2012 20:53:42 +0000]
PM / Sleep: Add user space interface for manipulating wakeup sources, v3

Android allows user space to manipulate wakelocks using two
sysfs file located in /sys/power/, wake_lock and wake_unlock.
Writing a wakelock name and optionally a timeout to the wake_lock
file causes the wakelock whose name was written to be acquired (it
is created before is necessary), optionally with the given timeout.
Writing the name of a wakelock to wake_unlock causes that wakelock
to be released.

Implement an analogous interface for user space using wakeup sources.
Add the /sys/power/wake_lock and /sys/power/wake_unlock files
allowing user space to create, activate and deactivate wakeup
sources, such that writing a name and optionally a timeout to
wake_lock causes the wakeup source of that name to be activated,
optionally with the given timeout.  If that wakeup source doesn't
exist, it will be created and then activated.  Writing a name to
wake_unlock causes the wakeup source of that name, if there is one,
to be deactivated.  Wakeup sources created with the help of
wake_lock that haven't been used for more than 5 minutes are garbage
collected and destroyed.  Moreover, there can be only WL_NUMBER_LIMIT
wakeup sources created with the help of wake_lock present at a time.

The data type used to track wakeup sources created by user space is
called "struct wakelock" to indicate the origins of this feature.

This version of the patch includes an rbtree manipulation fix from John Stultz.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NeilBrown <neilb@suse.de>

7 years agoPM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
Rafael J. Wysocki [Sun, 29 Apr 2012 20:53:32 +0000]
PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources

Android uses one wakelock statistics that is only necessary for
opportunistic sleep.  Namely, the prevent_suspend_time field
accumulates the total time the given wakelock has been locked
while "automatic suspend" was enabled.  Add an analogous field,
prevent_sleep_time, to wakeup sources and make it behave in a similar

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>