msm: camera: Update sensor mount angle and position

Update sensor driver to add sensor mount angle and
position as part of media entity flag. This info
is used by upper layers to get the info from
media device entity insted of opening camera
to reduce the launch latency.

Change-Id: Ie807a21206f95bbcc784aa4d2259cef7ac51e544
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
ASoC: wcd9xxx: Correct handling of RC Oscillator

If only RC oscillator is enabled and disabled with out
enabling mclk,RC oscillator is never getting disabled
which is effecting recording through handset.So disable
RC oscillator completely by writting appropriate registers.

Change-Id: I9df292ec8c34ec6a2f514e492adff8eb751ac7f3
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
ASoC: wcd9xxx: Increase delta for Invalid detection

Currently only 50mv delta in DCE measuremet is considered.
Increase this delta as per observation, sometimes even
more difference in DCE can be seen.

CRs-Fixed: 572295
Change-Id: If55b746ad4e4bca23cda9bcb594078acd9b1e01d
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Remove unnecessary condition

There is no need to check if internal micbias is
already enabled when we are only updating the bits,
as updating the bits does not do register write
if bit is already set.

CRs-Fixed: 572295
Change-Id: I79ea05150c6d3a2bbaeff0ac66bd39888451f11d
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
msm: vidc: Fix a race condition in core instances list access

While checking the supported load, we are accessing core
instance list and there are chances that it can be
modified else where. Add a mutex lock while accessing
the core instances list to avoid such scenarios.

CRs-Fixed: 566451
Change-Id: I2ac5d1e51720557790a151af66e2e9fb5d3d152f
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
ASoC: wcd9xxx: Make recalibration configurable

Add support to have option to enable and disable
recalibration of DCE during headset detection.

CRs-Fixed: 572295
Change-Id: I3fff0b5479e6827acf0e8952acdab5730c61f8c5
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Make vddio usage configurable

Switching to VDDIO for DCE measurement can cause
micbias to drop. If micbias is shared for handset
and headset, this can result in pop noise in
recorded data. Make this option configurable
so that it can be disable if micbias is shared.

CRs-Fixed: 562782
Change-Id: I77aa973583c482d5c0169774054627aed81d22cd
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
qseecom: Remove debug  messages

Remove unnecessary debug  messages.

Change-Id: Ida80fbc1376f15753f8329c44550b14d8f4de163
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
qseecom:  Check for case where listener service is not found

When listerner service is not in the list of registered listeners,
the resulting ptr will a NULL. Check for this case of NULL ptr
to indicate missing listener service.

Change-Id: I0d2c7b01143c40711f71bf434493ac5301314cf2
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
qseecom: Copy userspace buffer into kernel space before dereferencing

ION memory is used for user space to kernel space data passing.
This is directly accessible in kernel. But, if the IOCTL is called
from user space without using User space library, then data might
be pointing to some other memory location, in which case, it would
not be possible to dereference this location in kernel & hence it
would be accessing invalid memory.

Change-Id: Ic50c76ee8b2a696dbb786fce3a68cdc782e15268
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
msm: acpuclock-cortex: Fix off by one error for large frequency tables

If a frequency table was greater than a certain size, data will be written
past the end of an array. Fix the loop conditions to prevent this.

CRs-fixed: 561651
Change-Id: If7bafcf79c044877f4a29c2437c139d23aa1fb32
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
qseecom: Fix error handling path in receive_req()

This patch fixes the error handling path in receive_req() function
called from userspace. Issue seen if user is calling the receive_req
function without calling the listener registration. qseecom_find_svc()
should return NULL if there are no services found.

Change-Id: Id51d8f48d7266b5acbc845f7b9ac0068d16b1ede
CRs-fixed: 496927
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
mdss: Correct the solid fill color swap for mdp3

There was a color swap happening on solidfill by a color.
This patch makes sure right color is filled.

Change-Id: I7f0a76d2b345414c51e332ad6dee7ed24486c725
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
media: dvb: Protect against variable update

DVR device variables may be modified by DVR input
thread which protects against the variables
update using a spin-lock. Such protection is required
also when variables are updated in DVR release function
that is executed upon user-space request.

Change-Id: I5d6a7aeba0a74f2496d7b645321d379cba6fb8b7
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
power: qpnp-charger: make the battery capacity writeable

There are some applications that may want to fake a battery state of
charge (SoC). To standarize this on different devices, make the battery
power supply capacity property writeable.

Change-Id: I75fd301febb994032de8b07c1d58bb38ffdc2c55
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
sensors: add the sensors class support

Add a new sensors sysfs class and put all the sensors device driver
information in this class folder.

Change-Id: I7c35ec4642e4dbd264945ad3839914935b301af0
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
msm: mdss: Document mdss driver parameters

mdss driver parameters, visible to userland, are documented,
giving out short descriptions of their role.

Change-Id: I34bfe0152c7f7629c18a968a474ab0a3369560fa
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: mdss: Enable solid fill on pipe

Add support to enable solid fill on pipe with an option to
configure fill-color by userspace. This support does not confine
to background pipe and can be used to enable solid fill on any source
surface processing pipes irrespective of the z-order.
This support can be used in requirements involving constant
color layers.

Change-Id: Iae3c2968ca2f2f1be161e9c2f857641ffbb859e5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
input: sensors: calibrate the cm36283 als sensor for 8x10 MTP

The cm36283 als sensor reported inaccurate illumination value
due to not calibrated on 8x10 MTP devices.

CRs-Fixed: 579407
Change-Id: Ie7239f11944579e3d107b3fe739844ceb764998b
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Merge "media: dvb: Protect against variable update"