slimbus: clear slimbus read transaction if synchronous read fails

Failed read transaction is removed from the table of active transactions if the
transaction fails.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
slim_msm: Satellite channel should not be deallocated more than once

It is possible that satellite channel deallocation is requested more
than once. (e.g. if the satellite times out waiting for response from
previous removal, then it will request removal again during
channel deallocation from its side).
Make sure that does not result in deallocating the channel more than
once.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
slimbus: Avoid same channel definition, removal in same sequence

Do not add the channel removal request to the remove list
when the client sends it right after the channel definition
without sending reconfigure_now request. Also remove the
channel define request from define list. This avoids
channel definition count being inconsistent, which may
lead to slimbus driver going into wrong state.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
slim_msm: Retry initial sequence messages

Initial sequence messages (logical address assignment, and master
capability message) are very important messages to enable the
devices. It is possible that the device may NACK these messages
initially if it is in process of acquiring sync.
If these type of messages fail, retry a few times before actually
deeming the device unresponsive. Log the registers in case of NACKs
to better analyze the reason.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
power: pm8921-bms: use pmic power reason to check restart

For accurate SoC calculation, bms need to know if target
was booted from reset or power down. Previously, minimum
CC value check was used to detect power on reason.
But this minimum CC value check is useless when charger is
connected. So, this patch use pmic power on reason to know
the exact power on reason.

Signed-off-by: Iliyan Malchev <malchev@google.com>
mako: power: use fixed ibat_avg during first soc calculation

Use fixed average ibat during first SoC calculation to remove
sudden SoC drop.

Change-Id: Ic06f5eed3365cb42bacd4a8453c7aba5ce6886c6
Signed-off-by: Iliyan Malchev <malchev@google.com>
power: pm8921-bms: use fixed ibat_avg instead of shutdown ibat_avg

Using stored average ibat(shutdown ibat_avg) which came from
previous boot sometimes cause SoC sudden drop in boot up time.
So this patch use fixed ibat_avg value instead of shutdown ibat_avg
during 1st SoC calculation.

Change-Id: I9675652c3b4918529be40a8d6f8ee29b6dee1359
Signed-off-by: Iliyan Malchev <malchev@google.com>
EHCI: Update qTD next pointer in QH overlay region during unlink

There is a possibility of QH overlay region having reference to a stale
qTD pointer during unlink.

Consider an endpoint having two pending qTD before unlink process begins.
The endpoint's QH queue looks like this.

qTD1 --> qTD2 --> Dummy

To unlink qTD2, QH is removed from asynchronous list and Asynchronous
Advance Doorbell is programmed.  The qTD1's next qTD pointer is set to
qTD2'2 next qTD pointer and qTD2 is retired upon controller's doorbell
interrupt.  If QH's current qTD pointer points to qTD1, transfer overlay
region still have reference to qTD2. But qtD2 is just unlinked and freed.
This may cause EHCI system error.  Fix this by updating qTD next pointer
in QH overlay region with the qTD next pointer of the current qTD.

CRs-Fixed: 386914
Change-Id: Idbc41b93674955325c8da445fcb25d189bddddb2
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
prima: release v3.2.1.10f

    git://codeaurora.org/external/wlan/prima.git

    2dac1fd wlan: Release 3.2.1.10f
    f55ef6d Fix GCC 4.6 compile failure due to inlining
    3070878 In csrRoamLostLink(), only send HDD 1 eCSR_ROAM_LOSTLINK

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.10g

    git://codeaurora.org/external/wlan/prima.git

    985fb65 wlan: Release 3.2.1.10g
    8efbc30 wlan: Enable ERROR level logs by default across all components

Signed-off-by: Iliyan Malchev <malchev@google.com>
mako_defconfig: set CONFIG_SLUB_DEBUG_ON=y

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.11a

    git://codeaurora.org/external/wlan/prima.git

    f2dfa0f wlan: Release 3.2.1.11a
    abdd80d Fix for crash during roaming
    f11f72d Handle race condition in Management Frame TX Timeout
    e25769f wlan: Release 3.2.1.11
    fb531ee wlan: No longer allow large stack frames
    c803461 Use unique logging for driver commands
    9eb6b11 Reduce stack frame usage

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: set frame-size warning to kernel default

Signed-off-by: Iliyan Malchev <malchev@google.com>
backlight: lm3530: add default brightness to pdata

Signed-off-by: Iliyan Malchev <malchev@google.com>
mako: backlight: add default brightness

default brightness will be used in recovery or off-charing mode
This definition comes from lm3530 driver.

Change-Id: Ic3914403cc4844dc98049d7d131e1072c0eb79ca
backlight: lm3530: remove board specific hard-coding value

get the board specific data from pdata. do not hard coding in driver.

Change-Id: Id2ebc4475755adcd81297064f32cc3169c55eaca
mako: backlight: use linear brightness ramp
mako: camera: update bus vectors to increase peak bandwidth

In extreme cases VFE needs more bandwith to suffice the client req in normal
power mode. This patch sets ensures to changes the bandwith dynamically.

Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.11c

    git://codeaurora.org/external/wlan/prima.git

    warning: refname 'v3.2.1.11a' is ambiguous.
    9cddb7e wlan: Release 3.2.1.11c
    8ea1b8f Memory corruption fix
    6e40114 wlan: Release 3.2.1.11b
    9e40fc2 Address IMPS failure(s) due to lingering FT session.
    6445ffb Fix Buffer overflow due to invalid WscIeLen
    7e26327 Fix buffer overscan in csrRoamIssueFTPreauthReq()
    2a9c051 Reduce stack frame usage (updates)

Signed-off-by: Iliyan Malchev <malchev@google.com>
mako: camera: no muxing of common cam gpios

Both front and back camera share the common cam gpios.
Each sensor controls the common cam gpios on his own power control.
It causes the power up failure.

Front camera requests the common cam gpios, and then back camera try
to request the common cam gpios. However common cam gpios is already
requested by front camera. At that time, front camera power up is failed.

It also might cause the kernel panic.

Mako common cam gpios are not used by other device. So muxing is not
needed.

[  957.927514] msm_camera_request_gpio_table common gpio request failed
[  957.927910] msm_sensor_power_up: request gpio failed
[  957.928460] msm_sensor_power: imx119 power_up failed rc = -16
[  957.928765] msm_mctl_open: sensor powerup failed: -16
[  957.929284] msm_open: HW open failed rc = 0xfffffff0
[  957.929558] msm_release_ion_client Calling ion_client_destroy
[  957.930138] msm_open: error end
...
[ 1078.978696] msm_camera_request_gpio_table common gpio request failed
[ 1078.979032] msm_sensor_power_up: request gpio failed
[ 1078.979123] msm_sensor_power: imx119 power_up failed rc = -16
[ 1078.979276] msm_mctl_open: sensor powerup failed: -16
[ 1078.979337] msm_open: HW open failed rc = 0xfffffff0
[ 1078.979490] msm_release_ion_client Calling ion_client_destroy
[ 1078.979673] msm_open: error end
[ 1079.691805] Unable to handle kernel NULL pointer dereference at virtual address 00000228
...

Change-Id: Ie3bf982b4e1cea6c989fb93bbd39d5bd4eb1bf51