power: qpnp-charger: check for reverse boost on probe

The accidental reverse boost scenario may occur
before probe.

Fix this by checking the CHG_GONE interrupt status
on probe and running the ARB workaround if necessary.

Change-Id: I6ecc0d5796e7fdacdf61c62eeb14523061a51605
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
diag: diag over uart not working for QSC

On executing diag_uart_log app with QSC option
switching is not happening. On the other hand, MSM
switching is working fine. Added changes in order
to allocate memory to user space data type buffer
during diag char initialization.

Change-Id: I8afd79017e543b088381fd70c2a585f6c0c2ca1e
CRs-Fixed: 576830
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
power: qpnp-bms: disable sw_cc_thresh interrupt after it fires

Currently in the BMS driver, when the software coulomb counter threshold
is reached, only a soc recalculation is scheduled in the irq handler.
This can cause issues where the BMS hardware fires another sw_cc_thresh
irq because the coulomb counter is still over threshold.

Instead, disable the sw_cc_thresh irq when it is handled and renable it
after adjusting the software coulomb counter threshold registers.

Change-Id: I70791fdae1835c8d24b7c045831d22fe86e83fdb
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
ARM: dts: msm8974pro: Update MPM mapping for GIC interrupts

Add cpubw-krait interrupt to the Bypass list as this
intterupt can only be raised when CPU is actively
executing instructions.

Change-Id: Ife1854e933ccefdf5730f22ab94a75a9c642ad79
Signed-off-by: Badhri Jagan Sridharan <badhris@codeaurora.org>
Revert "ARM: dts: msm: Add NFC device for 8974 bc"

Partially revert commit bc2bf21d5ae217b0735443d23686391da940e5a9.

Change-Id: Ia716ca499cd5538862b2aa5332e4e9c50127dfba
Signed-off-by: Houston Hoffman <hhoffman@codeaurora.org>
Wlan: Missing Info and Error Logs for scan path in HDD

Adding missing error and info logs for scan path in
wlan_hdd_cfg80211.c

CRs-fixed: 594112
Change-Id: If31c4b6fb7309fa5787a10fe98025205295640d7
[media] v4l2-ctrl: add constrained high h.264 profile to menu

Constrained high profile was added as a profile option but the menu was
not updated. This causes dereference an invalid area in case this
profile is selected.

Change-Id: I5811a845a9232bab19125a0dae0be38f9054d250
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
PM / devfreq: Add a new target flag for the performance governor

The new flag for the devfreq profile->target() function is used
by the performance governor to notify the driver that the device
should wakeup on the max frequency.

Change-Id: I91c2d649177bdd1841a087a2125d1cdbc979f5c1
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
ARM: dts: msm: Add CX regulator Phandle to MDP node

The Phandle might change for different
versions of the msm8974 chip. Add the proper
Phandle of CX regulator to 8974 v2 and
8974pro versions.

Change-Id: Ifce120fcb349360e36c4ea74bcaf5ea14e1dece5
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
sensors: Add the class device support for stk3x1x sensor

Add the sensor class device support for the stk3x1x light and
proximity sensor. By using the class device, the driver will
create the subfolder in the "/sys/class/sensors/". The userspace
app could detect the sensors by searching this folder.

Change-Id: Id601679ec219ce541e8ee92837185461c9dc74bd
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
sensors: Add the class device support for bmp18x sensor

Add the sensor class device support for the bmp18x pressure
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/" and the userspace app
could detect the sensors by searching this folder.

Change-Id: Id947e8b7dd101d15bc7ffcbe5a01fa9c6cf28efe
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
sensors: Add the class device support for mpu3050 sensor

Add the sensor class device support for the mpu3050 gyroscope
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/". The userspace app
could detect the sensors by searching this folder.

Change-Id: Ieba9cebaa2bb62da223d78290b64865142c945f7
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
sensors: Add the class device support for mma8x5x sensor

Add the sensor class device support for the mma8x5x accelerometer
sensor. By using the class device, the driver will create the
subfolder in the "/sys/class/sensors/" and the userspace app could
detect the sensors by searching this folder.

Change-Id: I6b96c43fa6da78d84a950f67843c62a41e03aa99
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
sensors: Add the class device support for cm36283 sensor

Add the sensor class device support for the cm36283 light and
proximity sensor. By using the class device, the driver will
create the subfolder in the "/sys/class/sensors/". The userspace
app could detect the sensors by searching this folder.

Change-Id: I4d96ed54ee647069a5f1cf592c4aea1d8636a0f5
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
tcp: call sock_orphan() before freeing socket in tcp_nuke_addr

Ensure socket is marked as dead prior to freeing it. This will
prevent other tasks executing in the system from potentially
using the freed resource.

Change-Id: I3c7c3ce24f287c4ea7ca7c1d1e5dc96ad37596b0
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
defconfig: msm8974: Enable secure touch

Add CONFIG_SECURE_TOUCH to enable secure touch feature
in Atmel MXT driver.

Change-Id: I7df77d3d69e8afbc0e4cdb269e2f8bb81a7d24f3
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
kernel: rng: Change master id to 54 in rng vector

This fix prevents BKE Limiter from activating during boot due to
rng.

CRs-Fixed: 570296
Change-Id: Ie52f02a4af9cd824533e80ae3722496d09497529
Signed-off-by: Liam Fernandez <liam@codeaurora.org>
deconfig: msm8610: Reduce default CMA region to 4MB

Reduce the size of CMA region from 16MB to 4MB to
allow for more unmovable pages in the system which
will help in low-memory conditions.

Change-Id: Id3caefc9e75c2423b08a179534f073e4742abda9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:
	arch/arm/configs/msm8610_defconfig
arm/dt: 8226: Disable otg-disable-reset flag

When switching from peripheral to host mode, usb controller reset is
not happening as otg-disable-rese flag is enabled. For the USB host
mode functionality to work it is required that usb controller reset
should happen when switching from peripheral to host mode as per
suggested by hardware designers.

Hence fixing the issue by disabling the otg-disable-reset flag which
would result in usb controller reset as part of switching from
peripheral to host mode.

Change-Id: Ide1f72d922cf43386b90778f3858dcec52489561
CRs-Fixed: 583351
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
diag: dci: Remove the cap on number of delayed rsp registrations

Currently, diag driver allows a definite number of command
registrations. This limit can be reached easily since we don't
delete delayed rsp cmd registrations. Make changes to allow
any number of cmd-rsp registrations and to remove delayed rsp
cmd registrations after receiving its corresponding last rsp.

Change-Id: Ia62bb3cf8a1359568c2579acee490ec2b246ee75
CRs-Fixed: 583922
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>

Conflicts:
	drivers/char/diag/diagchar_core.c