board-m7: fixup proximity sensor table
board-m7: fixup lightsensor table
msm_fb: hdmi: change HDMI_PHY_REG1 based on foundry.

Set value of HDMI_PHY_REG1[2:0] for output voltage swing control,
to prevent fallout for Vlow for GF foundry MSM's.

Change-Id: Ifb0f694226896fa1ad74dd84fb489f015901fc3e
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Signed-off-by: Mukesh Jha <cmjha@codeaurora.org>
msm_fb: hdmi: change HDMI_PHY_REG1 based on source.

Set value of HDMI_PHY_REG1[2:0] for output voltage swing control.

CRs-Fixed: 488207
Change-Id: I9aeba47491467a14a3141cf7688a95a2f43e80f5
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Revert "msm: move printk out of spin lock low_water_lock"

This reverts commit 43860bfdb29f86210d52e22770cc16e09981e9b4.
Revert "msm_fb: display: remove wait4vsync during dtv off"

This reverts commit 470e67df1ce8cca67aa5faf2cf48db350a61e72e.
msm_fb: display: Add compulsory wait after DTV's TG is disabled.

When DTV timing generator is disabled during dtv_off, a wait for
at least a frame period is required. This is done by waiting on
vsync. In some scenarios, vsync interrupt is received such that, no
wait really happens which results in MDP hangs.
Add wait for 20ms after TG is disabled, to ensure wait for at least
a frame period. Also, print timeout error in case wait for vsync
times out.

Change-Id: I960326e495bc8dc108bf6c6f1994ea3071f1c06d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: HTC: m7: add missing dsi_pll regulator supply

* Originally introduced in patch ID:
  fb4e77edf9ce62aa836e8406aa9dfc1bf9aecab5
  "msm: display: Add DSI clock control for MDP GDHS power collapse"

Change-Id: Ic31897b6dee815be858fe5eda3e9e092539be19b
msm: sps: update clocks for 8974 in SPS driver

Two changes for clocks:
1> Vote for dfab_clk which is the peripheral NOC on 8974;
2> Do not vote for mem_clk since it does not exist on 8974.

Change-Id: Ia9d5547073219cea4250d3038aa5aa01a47ff4e0
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: adapt to clock API change

With the change in clock driver, clk_get() can return -EPROBE_DEFER even
when the clock is actually present in HW. Thus, we need to return
-EPROBE_DEFER in SPS driver probe function if clk_get() fails.

Change-Id: Ia1b9f18425ca5432f4a56419adf142f2674ce64a
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: improve BAM inactivity timer function

1> Add the support for BAM global inactivity timer which is a new feature
in B family.
2> There is an update that changes the time unit of the inactivity timer
counter from 0.1ms to 0.125ms. Thus, we adjust the parameter in SW driver
for this update.
3> Inactivity timer timeout interrupt will become a new type of BAM global
interrupts, and it is a normal interrupt different from other BAM global
error interrupts. Thus, change the log level for callback message from INFO
to DEBUG.
4> Change timer result argument of inactivity timer API to an optional one
for client drivers.

Change-Id: If223ef311f0393f2f2243f6b8a862fe760ff5214
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: enable BAM DMA client to control BAM DMA clock

For power saving reason, SPS driver will turn off the clock of
BAM DMA after the initial configuration. A new API is provided
to BAM DMA clients to vote for or relinquish BAM DMA clock when
they start/stop using BAM DMA.

Change-Id: I03f8a6cfa19c1722ca4e92e0785ca309fdd10ba2
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: turn off BAM DMA clock after initial config

For power saving, SPS driver will turn off BAM DMA clock after the
initial configuration of BAM DMA. The clients of BAM DMA will vote
for the clock when BAM DMA is used.

Change-Id: I388a21cff3c619ef49705a064d7d5ef760fa9ef8
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm_fb: hdmi: Do not turn on HPD at boot

HPD is getting turned on by userspace if HDMI is enabled.
We don't need to turn on the HPD from HDMI driver.

CRs-Fixed: 377899
Change-Id: I29af0ca6ba222c7af61b1a0e8b51be35dee6426c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: HDMI: Fix for high HDMI sleep current

In certain cases, the HPD circuitry is not switched off when the
device goes to suspend state, resulting in high sleep current on
the HDMI power rail. This patch ensures that the HPD circuitry is
always turned off during suspend operation by removing an
unnecessary condition check.

Change-Id: I5846255ff4405ff1f449158f4b2f0d5ed0cd96bb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
gpio_input: stop spamming so much
sound: wcd9304: add usleep range
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

0.3 mA higher sleep current .This happens
due to  manually forcing digital mic clock
pin to GPIO mode rom functional mode through
the TLMM mux.
This reverts commit a7105cd8d1bf6a673004a517ca351c82813490cb

Change-Id: Ibf6a4b5a48a325377e894e2c680cbe2434e9cbd4
CRs-Fixed: 529174
Signed-off-by: johny <mjshai@codeaurora.org>
seq_file: Allocate memory using vmalloc when kmalloc failed

When dumpstate access /proc/xxx/binder, this binder include lots of info,
it will use seq_read in kernel, in this function, it will trigger
high order memory alloc, when read binder info or other large file,
this will cause memory presure when system don't have contious high order
memory, it will lead to high kswap workload to reclaim the page. so change
kmalloc to vmalloc, it can avoid contiously high order memory allocating.

CRs-fixed: 514982

Change-Id: I463d5f72c24b7bb298e14b0da49c5fc96091ecc1
Patch-mainline: linux-arm-kernel(lkml) @ Thu, 31 Jan 2013 14:11:32 +0800
Link : https://lkml.org/lkml/2013/1/31/20
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]

Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.

CRs-fixed: 519050
Change-Id: I1466c4f56f3f4df90cf8a1ae17afa80c89b813e8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>