Commit Graph

143692 Commits

Author SHA1 Message Date
Subhash Jadavani
996bb4c5dc mmc: msm_sdcc: set IO_PAD_PWR_SWITCH bit based on IO voltage level
SDCC4 controller has IO_PAD_PWR_SWITCH control bit in MCI_CLK register.
Driver should set this bit to 1 if the IO voltage level is within
low voltage range (1.7v - 1.9v) else clear it.

But driver sets this bit to 1 only if the MMC core layer initiates
the voltage switch sequence. So if voltage switch sequence is not
initiated (which is the case with non UHS-I cards) then even if
the IO voltage level is within low voltage range, IO_PAD_PWR_SWITCH
bit remains cleared.

This change checks the IO voltage level and based on that sets the
IO_PAD_PWR_SWITCH bit.

CRs-Fixed: 386445
Change-Id: Id0648b0f87ea9bcc942e855e30da810e0fe5ebf5
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
(cherry picked from commit 341b9e7dbaf0a3caf6e41d37486e3bccc9795feb)
2013-03-07 15:19:48 -08:00
Amy Maloche
27495ca54e input: atmel_mxt_ts: Fix macro (CONFIG_OF) name usage.
Macro should be CONFIG_OF and not OF_CONFIG.

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
(cherry picked from commit 56cb58c1b832760adfe382b845e52837b7ea7e85)

Conflicts:

	drivers/input/touchscreen/atmel_mxt_ts.c

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 54d1b97939cab0482aa5f4549e81ecf3599e2024)

Change-Id: I102d6871958a03ca596c7c538c539fcc27a4e14d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:47 -08:00
Ram Mohan Korukonda
17c80c265d Bluetooth: hci_ibs: Vote on/off UART clocks in non atomic context.
As per the latest clock design, we should not vote for the clocks
in the atomic context.

CRs-fixed: 377905
Change-Id: I70f269d40f007326de7a6279bfd11c4e576d251b
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
(cherry picked from commit d0063b6620e90266599cec711d6c5160878d47ca)
2013-03-07 15:19:46 -08:00
Mayank Rana
b8336bb35b msm_serial_hs: Don't destroy mutex from msm_hs_shutdown()
mutex is used uninitialized while unloading N_TTY line discipline
and installing SMUX Line discipline as msm_hs_shutdown() of HSUART
driver is called which is destroying this used mutex. Hence while
SMUX Line discipline is used, and clock off API is called, mutex
slowpath warning is seen. Destroying of mutex shouldn't be done from
msm_hs_shutdown() as initizalition and destroying of the mutex
is done from probe() and remove() of HSUART driver. Hence don't
destroy mutex from msm_hs_shutdown() to fix the issue.

CRs-Fixed: 391551
Change-Id: I74ac1372405e1b893d658ee03e9955858c9e782f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit d21314cc42558fe60cb0052bb1b645985f6be456)
2013-03-07 15:19:45 -08:00
David Collins
c63a1a6aa7 regulator: qpnp-regulator: Add support for rev 1 N1200 and N600 LDOs
The mapping between voltage control register set point values and
physical output voltage changes for range 1 of N1200 and N600
LDOs between PM8941 v1 and PM8941 v2.  LDOs with the previous
mapping have digital major revision equal to 0.  LDOs with the
new mapping have digital major revision equal to 1.  Modify the
qpnp-regulator driver so that the digital major revision register
value is taken into account when deciding which voltage mapping
to utilize.  N1200 and N600 regulators have identical
(range, voltage set point) --> output voltage mapping.

N1200 LDO range 1 hardware set points (rev=0):
375 mV to 768.75 mV with 6.25 mV step size

N1200 LDO range 1 hardware set points (rev=1):
375 mV to 1537.5 mV with 12.5 mV step size

Configure qpnp-regulator to use only range 0 for N1200 rev 1.
Range 0 is used because there is no benefit to using ranges 1 or
2 given that they have the same maximum voltage and step size
and their minimum voltage is greater than or equal to that of
range 0.

Change-Id: Icac6a1d8fccc014a754843d61c1fa40f550f9c77
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit bad606a7739aae9f79d45a394b39d6d321ee793e)
2013-03-07 15:19:44 -08:00
David Collins
d6c79bdb62 regulator: qpnp-regulator: Update boost regulator current limit reg address
Update the address used for the boost regulator current limit
register to reflect the correctly location in hardware.  The
proper address is 0x4A, not 0x40.

Change-Id: Ieefcd072858691940103664a2130a6c69341448f
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit 6f84675e8ca540df1ab704b527db672a2c229c78)
2013-03-07 15:19:43 -08:00
Amy Maloche
32b9ed9275 leds: leds-qpnp: Add QPNP PMIC led driver
QPNP (Qualcomm Plug N Play) LEDs driver is used for
controlling LEDs that are part of PMIC on Qualcomm reference
platforms. The PMIC is connected to Host processor via
SPMI bus. This driver supports various LED modules such as
WLED (white LED), RGB LED and flash LED. The first version of
the driver supports WLED and other features are added in the
next versions.

Change-Id: Ib2962c784cf566905f909faa0d46f8ebfee77b2d
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
(cherry picked from commit f3d5a06505faa2d7690ad48ce7bb5e32afb56df2)
2013-03-07 15:19:43 -08:00
Chiranjeevi Velempati
90ae290cfe ehci_msm2: Fix enumeration during PHY suspend failure
PHY suspend fails as part of USB LPM at times. Currently, we are resetting
the PHY and Link during this failure case, but the EHCI stack is not reset
due to which we are seeing device enumeration failure cases. Fix this issue
by removing hcd and adding hcd back during PHY suspend failure.

CRs-Fixed: 382279
Change-Id: I2d69e75409ec2b783dbdd06de4f34fe0356c1c45
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
(cherry picked from commit ce16958d07cedf2c46c97a9b0088a410c1a464a2)
2013-03-07 15:19:42 -08:00
Yan He
2dd5179bca msm: sps: add option for external block pipe reset
Clients can specify whether to ignore external block pipe reset
or not during BAM registration.

Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit 821e276e5c19c80dcdf9c933acb6a3b0b9df0fce)

Change-Id: I1cde36cae8328c5b2cc5ec7f1dd053271f69e604
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:41 -08:00
Asish Bhattacharya
f1abcda9aa mfd: wcd9xxx-core: fix the device registeration check.
The current logic checks for only one byte id for device
registration. this is not sufficient to identify all
variants. fix this to check all 4 byte id registers.

Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
(cherry picked from commit fbe371bbce2b166e4f651454f00fe4e8ecc2c3b8)

Change-Id: Ife41b16049f9061fc649ad78ed887681c85f5ac1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:38 -08:00
Joel Nider
adec35c3d6 tspp: add kernel api for video demux component
The demux is an in-kernel software component whose purpose is to take
an incoming TSIF stream and split it into multiple output channels
based on the PID field in each TS packet. Each output channel can be
used for a different purpose, such as audio, video or channel
information. In order to get good performance when moving such large
data streams around, the demux was placed in kernel-space as to
prevent copying memory buffers between kernel-space and user-space, at
least at this early stage in processing the traffic. Originally the
design of the TSPP driver was based on the earlier TSIF driver, so it
contained only a user-space API.

Signed-off-by: Joel Nider <jnider@codeaurora.org>
(cherry picked from commit 435ad8e2157eec5783a435f1e7ec47f67d759882)

Change-Id: I0dadf04ec2694c82fc8378fbed5fbf81fc889337
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:31 -08:00
Yan He
0f671cd924 msm: sps: improve debugging in SPS driver
1> Output BAM_TEST_BUS content with specified TEST_BUS_SEL value,
which helps HW team's debugging.
2> Support selection of pipes to only output registers' values of
selected pipes.

Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit fc1aa893e95a45a8a55b5ccc0cc01a5a8261f085)

Conflicts:

	drivers/platform/msm/sps/sps.c

Change-Id: I78cd4f4f3f847b709d69f973b1d3ae7becab666d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:30 -08:00
Michael Bohan
b873ee8106 gpio: qpnp-pin: Add support for gpio major revision 1
In revision 1 of the gpio block, the GPIO_STATUS1 GPIO_OK changes
from bit 1 to bit 7. Update the code to reflect this.

Also verify that PMIC pins have valid types and subtypes upon
probe. This allows us to make assumptions about correctness later
on when checking for capabilities of a pin in question.

Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
(cherry picked from commit bfe64c7551275d24cb8eb45ff0b578427d68c2e0)

Change-Id: Idc7464799ff354b83c82e38004aa299356551630
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:29 -08:00
Mayank Rana
95c79481a1 msm_serial_hs: Call clk_set_rate() from non-atomic context.
By default, HSUART Core CLK frequency is set to 7.37MHz. With this
CLK Frequency, it is not possible to get higher baud rate of 3.2 or
4 Mbps. Hence to set higher baud rate, driver calls clk_set_rate()
to set HSUART Core CLK frequency as ( required baud_rate * 16 ).
clk_set_rate() shouldn't be call from atomic context otherwise below
BUG is seen.

BUG: sleeping function called from invalid context at
mutex.c:85 in_atomic(): 1, irqs_disabled(): 128, pid: 1, name: init
[<c00151c4>] (unwind_backtrace+0x0/0x12c) from
		[<c07aebbc>] (mutex_lock+0x18/0x3c)
[<c07aebbc>] (mutex_lock+0x18/0x3c) from
		[<c0021258>] (clk_set_rate+0x2c/0x178)
[<c0021258>] (clk_set_rate+0x2c/0x178) from
		[<c0364a34>] (msm_hs_set_termios+0x820/0xb9c)
[<c0364a34>] (msm_hs_set_termios+0x820/0xb9c)
		from [<c0362170>] (uart_change_speed+0x90/0x94)
[<c0362170>] (uart_change_speed+0x90/0x94)
		from [<c03626c0>] (uart_startup+0xc8/0x1a0)
[<c03626c0>] (uart_startup+0xc8/0x1a0)
		from [<c0363534>] (uart_open+0xe4/0x13c)
[<c0363534>] (uart_open+0xe4/0x13c)
		from [<c0343d64>] (tty_open+0x360/0x4ec)
[<c0343d64>] (tty_open+0x360/0x4ec)
		from [<c013787c>] (chrdev_open+0x114/0x134)
[<c013787c>] (chrdev_open+0x114/0x134)
		from [<c0132844>] (__dentry_open+0x190/0x29c)
[<c0132844>] (__dentry_open+0x190/0x29c)
		from [<c0132a00>] (nameidata_to_filp+0x50/0x5c)
[<c0132a00>] (nameidata_to_filp+0x50/0x5c)
		from [<c0141b08>] (do_last+0x7ec/0x928)
[<c0141b08>] (do_last+0x7ec/0x928)
		from [<c0141d08>] (path_openat+0xc4/0x390)
[<c0141d08>] (path_openat+0xc4/0x390)
		from [<c01420b4>] (do_filp_open+0x30/0x7c)
[<c01420b4>] (do_filp_open+0x30/0x7c)
		from [<c0132518>] (do_sys_open+0xd8/0x174)
[<c0132518>] (do_sys_open+0xd8/0x174)
		from [<c000e380>] (ret_fast_syscall+0x0/0x30)

Hence use mutex to protect msm_set_termios() allowing clk_set_rate()
to be called from non-atomic context.

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit e672516d9348319af27ff1d11834fffb97dd90af)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit dad1f2594fce0b75695416e93898067bc582d5a3)

Change-Id: Idec64f3d8938148b5c1dd135bde041be5ae3b34d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:28 -08:00
Kiran Gunda
dd0ab5edec qup_i2c: turn off the ahb clock conditionally.
Each GSBI has QUP-I2C and UART cores which can be
used independently. However, the AHB clock is
shared by these blocks. So we keep it on if the
cores are used independently from different processors.

CRs-Fixed: 387908
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit 9aa5e91924934035fe0567f02f94a7cd5d0c963f)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit 3c11ab97102bd1e713e00ef7d4eae872269cf35e)

Change-Id: I18f139d90f51c773b65bf62ac219ed24c9fc09b9
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:28 -08:00
Ayaz Ahmad
fcf952fcb7 radio: iris: Pass proper parameters to SOC for RDS transmission.
- Pass number of ps string instead of ps length
 - Use proper name for radio text length

CRs-Fixed: 388115
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit 1c0db5273216ea80f3762dc5675daebac16e1e0b)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit d327e591c875450aa8ff157645974aa3fb7c0cc3)

Change-Id: I501af5c175c07f84dc117fc5e8ac410cecc8c35d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:27 -08:00
Wentao Xu
589acb3c40 input: mpu3050: adjust LPF bandwidth according to sampling frequency.
Low pass filter bandwidth is configured to be equal to or greater than
half of the sampling freqency.

Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
(cherry picked from commit 04f4cc9ff3707a39af39c23cc9f3aeb5c344c60c)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit a7d8fe1d40061ec56c938308d8f7265f29b146c1)

Change-Id: I796d30d474aa64c1679781b38ca5f151b37c92fd
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:27 -08:00
Amy Maloche
751fecf8da leds: leds-pm8xxx: Add CABC support for backlight control
Content adaptive backlight control (CABC) support is needed to
control backlight by external PWM.  It can be enabled by setting
"cabc_en = true" in the platform data wled_cfg structure.

CRs-fixed: 379347

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
(cherry picked from commit c366d5bfc380183e1c4f9877b2c8558098bd4281)

Change-Id: Iae7940d25d8754ab539d5ce1fa3f78972b5222d1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:23 -08:00
Deepthi Gowri
eda46c2a8d WLAN: WCN1314: Fixed kernel panic during unloading WLAN driver
Declaring completion variables, card_rem_event_var and shutdown_event_var
as global variables, because we observed these completion variables,
getting freed while wait on these variables.

Change-Id: Iec4e913d58fafa4804ae0b2d34e15460b4f7d0b1
CRs-Fixed: 393414
Signed-off-by: c_gowri <deepthi@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:22 -08:00
Carl Vanderlip
9bca4ef76a video: msm_fb: Ensure backlight is scaled atomically.
Ensure that when backlight scaling ratio or backlight level is being
changed that the operation execute atomically. This prevents a backlight
level change from being overwritten when it interrupts a backlight scale
update.

CRs-Fixed: 404017
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit ce328861aa1f4fa489e9abfc9d1e02b13af2ba47)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
(cherry picked from commit 0584596f75f8f2b184b8be1a0479ee61e449acba)

Change-Id: Ifb4bd5e823815b51dae38f1b8647b80d21b8ee45
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:21 -08:00
Jay Chokshi
af5646b4a1 msm: Add support for APQ8064AB variant.
Update the call sites of cpu_is_apq8064() to include an
additional check for the APQ8064AB target where
appropriate.

Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit 11abd8bdf369e6ddaf5569e780f2c62180095653)

Change-Id: I3cc0ba7279ce6e111d1b87933a8f8251ca306830
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:19 -08:00
Pratik Patel
f3c53fa1c7 coresight: disable ETM probe for Krait pass3.
Memory mapped accesses to ETM registers on Krait pass3 cause
intermittent hangs that lock up all the Kraits and their T32
sessions.

This is currently under debug but until this is resolved
error out of ETM probe for Krait pass3.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Joel King <joelking@codeaurora.org>
(cherry picked from commit 670627c323f1d6a72a35763d6b9dddca18f654df)

Change-Id: I563451964ae5b5afd72423c1a2cec391edc6142e
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:17 -08:00
Eric Holmberg
9e04856ff4 tty: smux_ctl: Do not set POLLERR if signal received.
During the userspace freeze process, a fake signal is sent to userspace
applications.  In the case of SMUX CTL, the smux_ctl_poll() will set the
POLLERR flag if a signal is received.  This incorrectly unblocks the
userspace application that called poll() and the userspace application
will grab a wakelock before doing additional processing which aborts the
freeze process.

Change smux_ctl_poll() to not set POLLERR if a signal is received.

CRs-Fixed: 402651
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 3cbcfa3d79564063fc4aa52173feeff101926cb9)

Change-Id: I6c2753b97bd8cf694b75d6fd3713adc99da8b266
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:16 -08:00
Pavankumar Kondeti
9e498b8333 EHCI: HSIC: Fail root hub bus suspend when port is not enabled
HSIC controller can not detect HSIC device in low power mode.  Hence
controller suspend is allowed only when port is enabled.  But this
check is done in controller suspend routine.  Controller suspend is
attempted after root hub bus is suspended.  Even if we fail, controller
suspend, root hub bus remains in suspend state.  This would delay
the enumeration of HSIC device as root hub bus resume takes some time.

CRs-Fixed: 396444
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
(cherry picked from commit a723f744025854c7132410fd1699bc0997617fb9)

Change-Id: I30c2117a0a6debfbc98a08610a83b56d5ac75f5b
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:15 -08:00
Eric Holmberg
d456638efe rmnet_smux: fix flow control race condition.
If multiple packets are written quickly and the high watermark is
exceeded, then the -EAGAIN return code is returned (A) and the code is
checked and the tx processing is throttled (B) until a low-watermark
notification is received (C).  If the packet queue is
drained and the low-watermark notification is delivered between steps
(A) and (B), then the order of events will be ACB and the tx queue will
be permanently stalled.

To fix this, a spinlock is held to ensure that the sequence is always
either ABC.

CRs-Fixed: 401544
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit cb24b09ebcf924b43e14cfbf78dcc29c98f3a79b)

Change-Id: I729333f7d6cf7f0c1b39518705571b744ee4b924
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:15 -08:00
Eric Holmberg
f0b7c4bc37 u_data_hsuart: Fix high-watermark race condition
If multiple packets are written quickly and the high watermark is
exceeded, then the -EAGAIN return code is returned (A), the return code
is checked and the tx processing is throttled (B) until a low-watermark
notification is received (C).  If the packet queue is drained and the
low-watermark notification is delivered between steps (A) and (B), then
the order of events will be ACB and the tx queue will be permanently
stalled.

To fix this, a spinlock is held to ensure that the sequence is always
ABC.

CRs-Fixed: 404380
Change-Id: I639eda87e115f592a6465f624e611830e6173852
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit e92b15ff084f1aeb9dec2a722c68f3b05f65fffd)
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 8d0dda8098216754375e994f90fcd1ef5ef36832)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:13 -08:00
Hemant Kumar
b11f5e3334 EHCI: HSIC: Increase IAA watchdog timeout to 100ms
In order to remove queue heads(QH) from Asynchronous Schedule Interrupt
on Async Advance(IAA) bit is used in USBCMD as doorbell by ehci driver
to handshake with host controller. When the host controller has evicted
all appropriate cached schedule states, then the host controller will
assert an interrupt which indicates ehci driver that it is safe to
modify a removed queue head from the asynchronous list.

EHCI driver walks through the asynchronous schedule list to search for
the QH(say QH1) which needs to be unlinked from HW. It removes QH1 from
the list, sets ehci->reclaim points to QH1 and starts iaa watchdog timer
after setting IAAD bit in USBCMD register. Before getting IAAD interrupt
for QH1, rest of other interface drives can also issue unlinking of their
QHs which get added to the list of QHs to be removed and pointed by
ehci->reclaim. It is possible that IAAD interrupt gets delayed for more
than current watchdog timeout value. This causes watchdog handler to
finish the unlinking process of QH1 with ehci lock held. Unlinking process
ends by setting QH1's next pointer to NULL, ehci->reclaim pointing to next
QH to be unlinked(say QH2) and calling qh_completions() to retire all the
transfer descriptor associated with QH1. qh_completions() releases
ehci->lock in ehci_urb_done(). There is a possibility of controller
asserting IAAD interrupt during this time on other core. After ehci lock
is released, ehci irq handler gets a chance to acquire ehci lock and
execute which results in premature unlinking of QH2, since ehci->reclaim
now points to QH2. QH2 is not yet removed from the asynchronous list and
ehci driver has not initiated IAAD handshake for QH2. Similarly unlinking
ends for QH2 by setting QH2's next qh pointer to NULL, since QH2 is not yet
removed from asynchronous list, this breaks the list. Due to this racing
between IAAD interrupt and watchdog timer interrupt ehci driver loses
track of which IAAD interrupt triggered for which QH. This results in NULL
pointer dereference while searching for subsequent QHs to be unlinked, in
already broken asynchronous list. Hence increase the IAA watchdog timeout
value from 10ms to a higher value of 100ms. Higher timeout value avoids
the race between IAAD interrupt and IAA watchdog handler and allows IAAD
interrupt to finish the unlinking of QH. Watchdog handler is still be
used to take care of scenarios when controller does not generate IAAD
interrupt for some reason (which is rare, but possible).

CRs-Fixed: 396250
Change-Id: Id1deccf834ca1108121c6533e016b9b3f5fc0ff2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 8a657de16d301e1bfab7ba69349446720d4a70e3)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:13 -08:00
Eric Holmberg
acf856c7fb tty: n_smux: Adjust receive retry queue parameters
If the remote modem has queued many small packets in the UART FIFO and
the SMUX client cannot provide receive buffers fast enough, then the
auto flow control command may not get processed before the receive queue
has overflowed.  In measured cases, an average of 10 packets are
received after flow control is enabled.  In the failure cases, up to 19
packets are received which is more than the max queue size (32 packets)
minus the high watermark (16 packets) which causes an overflow.

Use a bigger retry queue and more aggressive watermark values to make
auto flow control more responsive and to allow more packets to get
queued before an overflow occurs.

CRs-Fixed: 394198
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 0ab6fc1757ae275a7e29c95588c8470fb787ee2a)

Change-Id: I20817f4dab3360f3c62bd83e74594555571a3a9f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:13 -08:00
Eric Holmberg
b5673d5f29 tty: n_smux: Increased smux log buffer size
Increase log buffer size to handle the maximum possible log line size.
This prevents passing in a negative buffer size to sprintf() which is
handled gracefully, but generates a warning message in the kernel log.

Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit acd4c77f0311b42a49d254d5308397fd0a39277a)

Change-Id: I6b78092d0dc687184c9a12203441085382fd5c1a
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:11 -08:00
Kiran Gunda
f8011ae5d4 spi_qsd: support to transfer 64K chunks in DM mode
Support to transfer 64K bytes in a single SPI
transfer in DMA mode on targets which support
16 bits in QUP_MX_OUTPUT_CNT register. Earlier
if the application sends more than 4K data it is
split up in to 4K chunks,  irrespective of the size
of the QUP_MX_OUTPUT_CNT register.

CRs-Fixed: 383120
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit c5fbd7f2dccf52e95e6c1504a28b19d1dc622028)

Change-Id: Idb27c651e0a81a4efe363feabc44e26c5b61fb0f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:09 -08:00
Joonwoo Park
79829558fb mfd: wcd9xxx: Fix codec hardware reset sequence
The wcd9k codec hardware's reset is held since system boots to make sure
hardware is in reset during enabling regulators.
But current codec driver toggles reset which results in resetting twice.
Fix reset sequence so hardware can get reset only once.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit fdf4751fb7f599070d5e10f84ea232b3b648a9b5)

Change-Id: I2be857ef8d702aecff2427da3c75ad57d2040299
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:08 -08:00
Hamad Kadmany
1140ef05b7 tsif: Improve workaround for DMA bug
During tsif stress tests it was reported that the dma flush caused by
calling action_close() is sometimes unrecoverable. The root cause is
stopping the tsif while a read by the dma of the tsif FIFO is in
progress. The previous workaround relied on closing the tsif GPIOs
to stop incoming data to the tsif, then add a delay to allow the
dma to complete all outstanding transactions. A customer still reported
seeing the dma issue. The reason the issue was still happening is due to
the call of gpio API (request/free) which was done on pins not configured
to act as GPIOs. Doing so caused tsif interface not to be closed properly.

Per gpio-mux documentation, pins with function configured as non-gpio
may suffer from un-expected behavior when calling gpio API, these calls
were removed. The delay after closing tsif interface was enlarged to better
cope with low bitrate streams.

Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
(cherry picked from commit b18fac5fe2c45d24bcac2bcd3db9bceb98317909)

Change-Id: I5115d9cd51bac5a7cd5200731c5dd4eb0d4fc352
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:07 -08:00
Saket Saurabh
b5c78babab msm : Add support to get user defined TTY device for Uart port
Currently UART port is enumerating with platform device ID. It is not
necessary that TTY<ID> is same as available UART device ID. Provide
optional support which allows to override used platform device ID with
uart port by userid to get TTY based Uart device as /dev/ttyHS<userid>
instead of /dev/ttyHS<ID>.This support helps third party application/test
framework to use the same TTY uart device name across different platform
without changing in those applications as it is not necessary that on
different platform used UART device would be having same TTY<ID> name.
The userid value should be from 0 to 256

CRs-Fixed: 386736
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
(cherry picked from commit 51690e5e8c2d6199a0e1162aa2c0317a2c6a9f89)

Change-Id: I3d9546ceab48345d0e3456c6223e3ff82e5a2f8b
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:04 -08:00
Hemant Kumar
d4377caea3 EHCI: HSIC: Handle wakeup interrupt properly during probe
During HSIC probe driver registers the level triggered interrupt
on wakeup gpio. Wakeup irq line is disabled based on the return
status of interrupt registration. There is a possibility that
wakeup gpio is already pulled high after registering the interrupt
which can cause wakeup interrupts to be fired on continuously
without getting chance to disable the irq line. Hence do not
enable wake up interrupt on request irq.

CRs-Fixed: 394540
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit bbcdcbc3f09cc90d4b8fdd607244c3d73c9ae801)

Conflicts:

	drivers/usb/host/ehci-msm-hsic.c

Change-Id: I9b20d54d919333d11201d30513b4111f3fb31df3
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:01 -08:00
Deepak Verma
865de5b4af msm:vdec: Correct filled length of the output buffer
Filled length of the output buffer at FBD for videos
with frame height less than 96 was incorrect. With
this change, we get the proper filled length.

CRs-fixed: 395179

Signed-off-by: Deepak Verma <dverma@codeaurora.org>
(cherry picked from commit f01274b904a4899b13c64f35f2479a1080bfb2c4)

Change-Id: I88fdf915647d8a2123175599931fbdd4b7d1ddf0
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:58 -08:00
Mayank Rana
d7625da37f Rndis: Don't request Host to send aggregated RNDIS packets
Currently MaxPacketsPerTransfer is set to 3 due to which
Windows 7 Host is sending aggregated RNDIS packets. RNDIS driver
is not having de-aggregation support and due to that multi-packet
RNDIS data are not getting decoded properly and those packets are
being discarded. This is leading to degradation in TCP UPLINK
throughput. Hence set MaxPacketsPerTransfer to 1 and accordingly
set MaxTransferSize for accepting 1 RNDIS packet.

CRs-Fixed: 392052
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit e5d2b3da2f8583f7b7625085234309f912a96c14)

Change-Id: I59e5f35084b546d2d72d3f87446f0775f80941b2
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:58 -08:00
Jeff Hugo
abd5c52510 msm: Kconfig: add new dependencies to MSM_RMNET_BAM
747a936d6fd1d49331b0891df6797144eec56e23 added dependencies on networking
quality of service modules into msm_rmnet_bam.  Properly enumerate those
dependencies in the MSM_RMNET_BAM Kconfig item

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
(cherry picked from commit 2696715ce8dea4f8150e4a7ab8ce1f6286be840b)

Change-Id: Idd74913e5ed0dc8c21c9620560e0fb21edab45ab
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:56 -08:00
Siddartha Mohanadoss
213b8f5bce hwmon: qpnp-adc: Add PMIC 2.0 ADC bringup fixes
VADC/IADC peripheral is supported from PMIC 2.0 onwards.
Add version check to allow VADC/IADC reads if the
version is supported. Add probe defereal api for clients
who need to know if the ADC driver is ready. There is a
bug where the completion is not initialized. Fix it
by initializing it. Add support to disable the peripheral
after the ADC is read and enable it before starting a
conversion.

Add scaling functions to support reading the die temperature,
XO_THERM, batt_therm and batt_id. Add the ratiometric
calibration routine that uses the vref/gnd for calibration.
The ratiometric calibration is used for calibrating xo_therm,
batt_therm, batt_id.

Update the gain value used for calibration on the IADC
peripheral. PMIC 2.0 IADC peripheral uses 17.857mV instead
of 25mV for its gain calibration.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
(cherry picked from commit 5ace110e2165fba66227e18154d58b0e6cbb24b2)

Change-Id: I37b02de53ea2bed913c30261624c31a1ae57131c
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:54 -08:00
Siddartha Mohanadoss
43e2e65b8c hwmon: epm_adc: Fix incorrect SPI writes
Incorrect spi write transactions and incorrect readings
are seen. This is because of using incorrect SPI slave
address while initiating the SPI writes to the ADS ADC.
Also fix the incorrect scaling when converting the raw ADC
code to the appropriate physical result.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
(cherry picked from commit de90ed4d1f8285e4fe663a3ca52d3e377b590ef1)

Change-Id: I0280d7d014a9ba88e3b6eac02764feb8cdd55c66
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:51 -08:00
Siddartha Mohanadoss
ec560a9c20 hwmon: epm_adc: Add EPM support using PSOC
Add support for communicating with the PSOC
using the supported protocol commands from
the PSOC.

The support includes communicating with the
controller to initiate and start the ADC
conversion for the selected channels. Start
and receive ADC conversion for single measurement,
buffered reads, averaging the samples and returning
the results over the set averaging period.

Other commands supported include setting/receiving
the timestamp, setting reference voltage, toggling
gpio to set triggers on set events.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
(cherry picked from commit efddea4639f2953375fb822524fcae756ae67dc0)

Change-Id: Id519a5b9033b85953f1d6229a144f9df78910900
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:51 -08:00
Yan He
219ae92960 hwmon: epm_adc: Update the physical result
The scaling function multiplies the ADC code with
a high scale factor to avoid rouding accuracy errors.
This results in a 32 bit integer not being sufficient
to store the result. Therefore use a 64 bit integer
type to process the result.

Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit f6adab796cfd509c4c5beb9f0458e0d9fd8da6a6)

Change-Id: I94b26df3a3d0860c92fbb991e015ed0e3b185884
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:50 -08:00
Eugene Seah
3a0a24410a thermal: tsens: Leave sensors enabled on TSENS init.
This change allows kernel thermal mitigation to read sensors
that are not the main sensor (TSENS0) even after the driver probe
occurs.

Signed-off-by: Eugene Seah <eseah@codeaurora.org>
(cherry picked from commit bf8b0777937ab5f06f81d7b26cb7226f69099f70)

Change-Id: I4ab19b6b7604344f91700340115dcf6c4ecfe820
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:49 -08:00
Hemant Kumar
14585a7c95 EHCI: HSIC: Add enhancements to debug logging
This change addresses following enhancements to debug
logging:-

1) Add data payload logging which is not currently
supported. This helps to sniff first 32 bytes of data
being sent and received. Data payload logging is
enabled by default. To disable data payload logging:-

echo 0 > /sys/module/ehci_hcd/parameters/enable_payload_log

2) Current urb submission event logging does not cover
root hub submissions, hence move urb submission logging
to hcd driver.

3) Current urb submission event logging does not return
the correct status if submission fails. Hence log the
return status of urb submission.

CRs-Fixed: 393294
Change-Id: Ic7e555e1545ec7d7b0e4042cd35235e0af26fb01
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit 4d50a43dce8645955d8ed739d7a183e62922c721)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:44 -08:00
Yan He
d48622d2d8 msm: sps: output the log before callback
Currently the log is output after callback is returned from the
client driver. Output the log first so that we could know the
callback is executed.

Change-Id: If9183b364d518f8b426b94f58556232605575714
Signed-off-by: Yan He <yanhe@codeaurora.org>
(cherry picked from commit 93fe9147cd2f053880a0156892328e290088cd65)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:41 -08:00
Anirudh Ghayal
45304b0ee6 input: pwrkey: Handle out-of-order press and release interrupts
There is a possibility of receiving a release interrupt
before press when both these actions (press and release) of the
power-key are very close-by (~1-2ms) to the debounce time
of the key. Handle this case by maintaining a state variable.

Also mark the release interrupt as a wakeup source to
wakeup the system when the above mentioned abnormal case
occurs.

CRs-Fixed: 394289
Change-Id: I74475c1e5159dd30e52aca91243eec7e2fac4d57
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
(cherry picked from commit 306e3197b5cc657a62c41823fb6cd03600d35f3f)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:40 -08:00
Hemant Kumar
83347875ce EHCI: HSIC: Prevent disabling wakeup irq twice
If PM resume and Wakeup irq happen at same time
its possible to disable wakeup irq twice. Prevent
the same by protecting with spinlock

CRs-Fixed: 396895
Change-Id: I3320478d6c770787bc571964f4a38dce6927af63
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
(cherry picked from commit d343c01025fc3bb597fbb60c8fc4369cc17cbf5d)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:40 -08:00
Pavankumar Kondeti
0b23fad5ab msm: hsic: Disallow processor idle sleep while driving resume signal
HSIC controller should send SOF with in 3 msec after completing
the resume signal.  If processor is in idle sleep state, the timer
interrupt generated by HSIC controller to indicate resume completion
gets delayed.  If the interrupt handler is not run with in 3msec
after resume, the resume sequence is repeated.  Disallow processor
idle sleep to avoid multiple resume cycles.

CRs-Fixed: 397154
Change-Id: Ibc8965ad8bcd94e0b1b1d39b5b2ad8f39cf51095
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
(cherry picked from commit 4f5dc3be7b2b9939bc7a1b9526ccb70d93b53361)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:39 -08:00
Stepan Moskovchenko
af33ebe883 ks8851: Add GPIO and regulator support
Allow the ks8851 driver to configure regulators and GPIOs
specified as platform data or in device tree.

Change-Id: I806f7c22ba4b75eb26720704968cdec9cd7796c8
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit c990b2faa3ce0b4f2361630a687abdedee4241a9)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:38 -08:00
Ramesh Masavarapu
2a1f81cc66 msm: Fix correct topology for qseecom bus scaling.
Currently, bus scaling topology for qseecom is incorrect.
 -Added the correct topology paths for accessing Crypto
  Engine which is controlled by QSEE.
 -Removed setting the clock frequency of DFAB. This is
  done by the bus driver.
 -Removed references to the dfab clock instance defined
  in clocks file.

Change-Id: Ib6953ea3bf5721d458bfe2aa06c54be329a8fdb9
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
(cherry picked from commit 1e8c7242fd3f32ade703484d2113f4a6f442a0e8)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:37 -08:00
Mayank Rana
30677d03cd Rndis: Add debug support to disable RNDIS Multipacket Feature
This change adds module param which allows to disable RNDIS
Multi-packet Feature (Aggregation support in Downlink path)
as this feature is enabled by default.

To disable use this param before moving to RNDIS Composition:
echo 1 > /sys/module/g_android/parameters/rndis_multipacket_dl_disable

Also counts errors as Rx errors if received RNDIS packets are
not following RNDIS message format as those packets are being
discarded.

Change-Id: I2c99409f689c131cf92c4967235643d001d90773
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit 93df275e337ee68a5561bcf3c8eafdc35d455b81)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:18:35 -08:00