radio: iris: Checking if driver's buffer is large enough.

Checking if driver's buffer is large enough to copy
the data from user space.

Change-Id: I7b4eed81cf77ce2973669ce18ccd95a5df397d82
CRs-fixed: 552329
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
Slimbus: Inline a function to avoid multiple definition error

Compilation error(multiple definitons of function) happens
with slim_register_board_info function when CONFIG_SLIMBUS
flag is disabled.
In this patch slim_register_board_info function in slimbus.h
file is modified to static inline to resolve the issue.

CRs-fixed: 529039
Change-Id: I083062670139ae830dde9b0bc82c72febdf3271c
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm-camera: Add placeholders  for 3A features in YUV sensor for 8x10.

Adding support for 3A feature in PORed YUV sensor for 8x10.Features will
not be functional because we are just adding placeholders for now.

Change-Id: I8c99881d50a3b2306d2b9c05844725c13c5e292b
Signed-off-by: Chandan Gera <cgera@codeaurora.org>
mmc: cd-gpio: Add sanity checks in mmc_cd_gpio_free()

Add necessary sanity checks in mmc_cd_gpio_free() to fix
below warning:

[    5.856209] WARNING: at
local/mnt/workspace/builds/jb2/kernel/kernel/irq/manage.c:1219
__free_irq+0x88/0x1a8()
[    5.856215] Trying to free already-free IRQ 0
[    5.856219] Modules linked in:
[    5.856239] [<c010be94>] (unwind_backtrace+0x0/0x11c) from [<c0190f38>]
(warn_slowpath_common+0x4c/0x64)

CRs-fixed: 564084
Change-Id: Ia9ea0e82453e645ce44046a762cd78aeb544e8b1
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
wcnss: Download NV during SSR

If CAL data is already available, then based on the intial design it is
belived that only CAL needs to be downloaded to WCNSS during SSR.
However that design was incorrect, FW always needs the NV after a
reset. So download NV (and CAL if available) during SSR.

Change-Id: I624d40ac3e195997c9638f62fcdb0e88f0cc749e
CRs-Fixed: 557561
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
radio: iris: Add NULL pointer check

Dereferencing a NULL pointer may cause kernel crash,
Check for NULL pointer before dereferencing.

Change-Id: I43b1aa8054646f29833f82b7203192aa3494d912
CRs-Fixed: 548404
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
msm:Camera: Fix Power leak with sp1628 camera sensor

Instead of hard code to  GPIOF_OUT_INIT_LOW .
make use of power setting config value
for sensor power down.

Change-Id: Ib1037af550541b16be1f57c1145d83ea8bce4a27
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
msm: qdsp6v2: memset stack buffer allocation.

This is needed to avoid garbage data in uninitialized variables.

Change-Id: I20e56ee32d3b9d1eecc4fa7761ff164a210fbbde
CRs-Fixed: 561611
CRs-Fixed: 561615
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: ADSPRPC: Use module specific class name

Update the class name passed during class creation to match the module
rather than use a generic one. If another driver uses this same generic
name then the class creation would fail.

Change-Id: I33d7527e27c56fd943c93f823d99d244e2348319
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
power: qpnp-bms: fake a more accurate OCV at end of charge

When the bms is notified of end of charge, it fakes a high OCV in order
to report 100%. The high OCV used is the max voltage design for the
battery. However, that is not what should be used as the high OCV, since
the max voltage design corresponds to an over charged battery if used as
an OCV.

This can cause an issue with the correcting algorithm. When the BMS
driver finds that it needs to correct SOC downwards, it must do so by
lowering the OCV to correspond with a lower remaining charge. However,
since the battery profile does not start at max voltage design for 100%,
the BMS driver must correct about 25-30mV before it even starts
affecting SoC. This can create issues with meeting the cutoff voltage at
low SoCs.

Instead, look up the OCV for 100% charge and use that for the faked OCV.

Change-Id: I5ee3ab99098c3bf3354a4af792f2c5ff91aa60ed
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: increase the high soc adjust threshold to 98

Previously, the BMS driver does not allow OCV corrections when SoC
is above 90. This is because the BMS driver could accidentally pull
down a faked high OCV at end of charge and cause a bad user experience.
However, now that a check was added to make sure estimated SoC is below
15%, we do not need this check any more, since if estimated SoC is below
15%, we always want to correct anyways.

Raise the threshold from 90 to 98 to fix this issue and always correct
when SoC is below 98 and soc_est is below 15.

Change-Id: Ia26c040c6a5aec9a7245c3e13a0beb70309d34c3
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: camera: Avoid uninitialized data copy to userspace

Add proper intialization to avoid invalid access in
userspace.

CRs-fixed: 552359
Change-Id: Iea1d6684fb4b061f7ab51945f15387b7f686ccf3
Signed-off-by: Deepak Cherian <dcheri@codeaurora.org>
msm: qdsp6v2: Deleting kernel driver from arch/arm/mach-msm

Drivers are registering under misc driver but exists under arch/arm/mach

Change-Id: I6210ed2ffbc38608914fb765b8e50ac6d97950ff
CRs-Fixed: 554492
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: clock: Add parent fields to gcc_ce1_clk and gcc_ce2_clk

The votable CE core clocks should be linked up to their
parents. Add the parent fields to these clocks for
MSM8974, MSM8226, and MSM8610.

CRs-Fixed: 572028
Change-Id: Ia5567b2832cdb97f08052017d314f00dbdd41133
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
kernel: rng: Add IOCTL support to disable bus bandwidth

QRNG bus scale is set to high before qrng_read & set to
low after qrng_read, this impacts the performance during
boot-up, as there are various clients using qrng during
bootup. Inorder to fix this problem, a daemon is introduced
which calls into kernel module (that sets low bandwidth).
This change supports the IOCTL call to disable the bus bandwidth.

Change-Id: I386d1eb4c50c057ae2852e7f9d47c8db8e522ca5
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
radio: tavarua: Fix buffer overflow.

Removed improper typecasting to fix buffer overflow.

CRs-fixed: 554963

Change-Id: Ie3ae5a502f060c13eba7cb5c28a1af389b772af2
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
msm: vidc: Support s3d framepacking payload information

This change exposes s3d framepacking payload information
to userspace which client can use for display purpose.

Change-Id: I87daaad41e08ef19be96a86fd21e70a320b8c1e4
Signed-off-by: Maheshwar Ajja <majja@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>
ASoC: wcd9xxx: Correct handling of RC Oscillator

RC oscillator is not disabled properly which is
effecting recording through handset.Correct handling
RC oscillator

Change-Id: I9df292ec8c34ec6a2f514e492adff8eb751ac7f3
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
wcnss: Add support for WCNSS build version

WCNSS build version is now exchanged thru WCNSS control channel.

CRs-Fixed: 567573
Change-Id: I22bbf67b681fadc78bf8c4f256cdea8c9115ca61
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>