mmc: sdhci: add auto command error interrupt support

The auto command error interrupt is not enabled now. Hence,
if there occurs a timeout when auto-cmd is in progress,
no data timeout interrupt would occur and the driver would
only timeout after the software timer expires.

This patch enables the auto command error interrupt and lets the
higher layers know of such an error, if any.

CRs-Fixed: 515513
Change-Id: I69880a72ece7730645dcfe699d58271d60cab33d
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
msm: clock-8974: Change SDCC1 clock to 384MHz

Following the change of hardware configuration, SDCC1 clock frequency is
reduced to 384MHz.

CRs-fixed: 518823
Change-Id: I849b612966d286b5ee18ab4a3da4d998a696e01f
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
ARM: dts: msm: Reduce max SDC1 frequency to 384MHz for MSM8974Pro AC MTP

The clock plan has been updated to support a max frequency of 384MHz,
hence update the SDC1 supported clocks table to reflect that.

Change-Id: I19e21a17e1839e3cdeaaf5d888d434b8be9e34ad
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
netfilter: Enable TOS matching in the kernel

This patch enabled kernel config CONFIG_NETFILTER_XT_MATCH_DSCP.
This adds a netfilter kernel configuration for matching TOS
packets for IPV4 packets. This will be required in certain QOS
filtering scenarios when the filter match is based on TOS.

CRs-Fixed: 542806
Change-Id: I59f311709daba8859db317cc152f96bc09f345b1
Acked-by: Sudharsan Coimbatore Premkumar <supremku@qti.qualcomm.com>
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
mmc: sdhci-msm: set core in proper mode before reset

During probe disable the HC mode since the reset is done in
SDCC mode. HC mode will get set after the reset is complete
before the rest of the initialization is done.

CRs-Fixed: 538028
Change-Id: I1fdc633c218447c15c8caad24e2805e7510088f2
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm: mdss: request and free gpio at display on and off

This fixes a power leakage due to gpio is not put into
the suspended mode at display off.

Change-Id: If37426b821cdf08e207888ac84a2afbcbc011451
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
ARM: dts: msm: Reduce drive strength on SDC1 clk for MSM8974Pro AB MTP

The current clock drive strength of 16mA is causing data corruptions on
some MTP's, hence reduce the clock drive strength to 10mA.

Change-Id: Ic56a56f5ca2ca90063151adeecc2dea3834aaf8b
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
defconfig: msm8226: enable GPIO LED driver for QRD SKUG

QRD SKUG's keypad led is integrated in touch panel,
and controlled by GPIO 34. Enable gpio led driver for
it.

Change-Id: I32841f382ebbcb069d9e4804e5943383d53263e8
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
NFC: Implement multiple NFC clock source and patch version

NFC driver to support multiple clock sources and to support patch
version ioctl to be used by the user mode driver.

Change-Id: Idd10fc1284ae1335a3a59179ad6e3e265c952d08
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
msm: mdss: Fix possible buffer overflow in ppp

Correct the limit check for the buffer format and avoid the
possible buffer overflow.

CRs-Fixed: 542730
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Change-Id: I78f86cf8e7dcd0b3f4e124fbbf70353796583a47
msm: mdss: Revert changes for separating out PP flushes from commits

MDP flush behavior on MSM8974 needs to have single flush in given vsync
cycle, more than one flushes in same vsync cycle can cause unexpected
behavior such as blank screens, incorrect frame updates on LCD or some
visual artifacts. Currently post processing and frame updates have
independent flush mechanisms which in certain cases can cause visual
artifacts or blank screen. So revert changes to independently flush
MDP registers so that post processing piggybacks on flushes for frame
updates.

CRs-Fixed: 494856
Change-Id: Iaa0f6f123487f57abb1b56f7d0946fa3abfe3058
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
defconfig: apq8084: msm8974: enable SMB349 charger driver support

SMB349 is a single path switching mode charger chip. Enable the driver
on apq8084 and msm8974 based devices.

Change-Id: I69206020965a48f725aa85bf6b084df9fe8c4473
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
ARM: dts: msm: Remove bus active-only property from TSPP

TSPP HW blocks would use the PNOC bus independent
of the power collapse state of the CPU. Making bus vote
with active-only will cause the vote to be removed by
RPM when CPU gets into power collapse state.

CRs-Fixed: 546090
Change-Id: Ia3963f84f96eb96747867d28a8b09889de8ca22f
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
ASoC: wcd9xxx: Fix detection issue for headsets with threshold on MIC

Add additional check to see whether micbias is enabled
during DCE measurements and if it is enabled update the
condition so that plug type cannot be wrongly classified
as invalid plug type.

Change-Id: Id758e1bc553e1e6dbc81721f00f9c147b11cf390
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
msm: qmi: Fix access-after-free condition

In case, the sending of a message from handle_resume_tx fails, the
transaction is freed and the failure info is printed in the kernel log
which results in an access-after-free condition.

Free the txn after printing the error message.

CRs-Fixed: 525365
Change-Id: I111634948fa2e8a9737b77a658283ae6d1562531
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
USB: android: Prevent change of host mac address of 'rndis0' interface

On windows 7 platform, previously allocated ip address is maintained.
However, Host MAC address of 'rndis0' interface is changed when the
tethering driver re-enumerated. Thus, the tethering network driver
can't be allocated ip address from dhcp. It causes connection delay
between host and phone for usb tethering.

This patch prevents from changing Host MAC address of 'rndis0' interface.
In other words, this patch maintains the Host MAC address allocated by
userspace although the driver is re-enumerated.

CRs-Fixed: 534083
Change-Id: I94176ec010fc2cf5c57c35ed31a311dd747200bd
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
ASoC: wcd9xxx: Fix disable of clock block

When the external clock to the codec is disabled, the clock gating
internal to the codec also needs to be disabled to avoid any
stability issues. Fix the disable of clock block for the codec to
gate the clock internally to codec whenever external clock is disabled

CRs-fixed: 551937
Change-Id: Iad6962bbed6ca62a6d7f2748676306084ef5c08d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
msm: gpiomux: Add audio clock related misc TLMM registers

Add the misc registers related to drive strength for the clock to audio
codec so that audio driver can use the misc_tlmm_write API to write to
these registers.

CRs-fixed: 551937
Change-Id: Ib015176cf3814d993b9e61db93baa1e65d118a86
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm8x10: Configure the codec external clock drive strength

Whenever the codec external clock is enabled, configure the drive
strength on this clock before clock enable. This is to avoid possible
interference this clock can cause with other signals based on board
layout.

CRs-fixed: 551937
Change-Id: Ie45627424ce4f06dff96051ad18c55f4fb3279bc
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
debug-pagealloc: Panic on pagealloc corruption

Currently, we just print the pagealloc corruption warnings and
proceed. Sometimes, we are getting multiple errors printed down
the line. It will be good to get the device state as early as
possible when we get the first pagealloc error.

Change-Id: I79155ac8a039b30a3a98d5dd1384d3923082712f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>