msm: camera: eeprom driver support for target 8974

The eeprom may hold the data for calibration of autofocus,
whitebalance, lens shading and defect pixel correction.
The eeprom driver is supported with read write functionality.

Change-Id: I952bf1972bac9747ae4f0ea09c4dd6b8937c3f98
Signed-off-by: Jeyaprakash Soundrapandian <jsoundra@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
msm: vidc: Fallback to physical address in absence of IOMMU

Add necessary check to confirm absence of IOMMU and fallback
to physical memory address when IOMMU is absent.

Change-Id: I6957ce93392f67161f48371d5fc5ac74773886d8
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
gpu: ion: Remove code for reusable heap

The reusable feature is no longer supported. Remove
the associated code.

Change-Id: I7cf6eb302969287d629603fa0ea05ad9714bfb70
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: pil: Add support for proxy unvoting via SMP2P interrupt

Add support to use an SMP2P interrupt to proxy unvote. Do this
without affecting existing subsystems that may not use SMP2P. If
a subsystem does not use SMP2P, keep current implementation of
performing the unvote 10 seconds after it is brought out of reset.
If the subsystem uses SMP2P to indicate clock/power ready, then
ignore the proxy timeout value and unvote only when the interrupt
occurs. As before, if an error occurs while booting, perform the
unvote immediately after the peripheral is shutdown.

Change-Id: I62b1425cb8a536f455b6e110beabcbd59fdd5479
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
msm: mdss: fix incorrect mixer configuration on boot

When continuous splash screen is configured, logic for mixer allocation
depending on mdp revision doesn't work because mdp revision is not
properly read until after mixer allocation. At the same time when
configuring the correct mixer, need to make sure that any previous mixer
configuration is properly reset so that only desired mixers are set
correctly in control path.

CRs-Fixed: 462585
Change-Id: I5d5d270e9f2f0c38c990743ae55cd98b2e77bbb0
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Perf: Add L1 counters to tracepoints

Create a new tracepoint to get L1 PMU counter
information at every context switch. Counters
are captured only when the tracepoint is enabled
via perf or ftrace.

Change-Id: If05527b29e04c700170cfdf9f88d300b2f558ffa
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
msm: kgsl: Add a type field to the adreno draw context flags

Allow the user space to pass in a type field to indicate the
type of upper level library that owns the context. The type
field is added to all the appropriate ftrace output for easier
debugging.

CRs-fixed: 462903
Change-Id: Ic0dedbadd42fc5ccfffd89738affd4794a6ab85e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Properly record the size of the sglist in the memdesc

It was possible to fail out of kgsl_sharedmem_alloc after a sglist was
allocated but before we saved the size of the allocation which caused
problems when the sglist was freed during cleanup.

Change-Id: Ic0dedbadd57ec4d9422b5e3a873243d0ffed51f7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
input: synaptics_i2c_rmi4: add flipx and flipy to sysfs

- modify enable irq function
- fix F$34 issue of interrupt dispatch
- add pressure report
- add sysfs entry flipx/flipy

Change-Id: I648184496639241c45528c6b806b0ae97bc7a555
Git-commit: 3f6a24d9e9af0f5ba229910225637c081255cdc3
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: Removed unnecessary parts of patch]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics: Correct bugs in fw update

- Fixed reset command could fail after firmware update
- Config reset pin if reset gpio is defined in platform data
- Force do a reset in function probe
- Skip fw/config update process if image firmware id is smaller
  than device firmware id

Change-Id: I3525410c791454f64c680506fe4c77e9da650a46
Git-commit: db1a35c603df138842bdee3b0d9e7f9e24012e4e
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: modified change w.r.t current driver]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
power: pm8xxx-ccadc: implement quick calibration

There are certain systems that wakeup every so often to do some
housekeeping work. We don't want to run a full calibration
when the system wakeups.

For such systems runs a quick calibration with just two samples.
Use the periodic_wakeup flag to indicate such a system.

CRs-Fixed: 454221
Change-Id: Ifc86414f7fab4d0921e3289d6e52b9e077a1f625
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
msm: timer: Don't check state of clock while setting next timer event

The commit fd6681cd4d0782f6e6ac918ab337016f59c2520b introduced
a silent bug that incorrectly checks state of the clock while
setting the next timer event. The bug manifests only during
failure code path of msm idle operation, which is very rare.
Due to the bug, the driver isn't be able to reprogram the timer
device.

CRs-fixed: 468902
Change-Id: I4ec14ea9c3a5d318ef98d2b13bd55efd89538df5
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
msm: vidc: Update compilation flag for video driver

Both 8226 and 8610 shared same arch flag. Now they are seperated so
adding 8226 flag for compilating of video driver on 8226 target.

Change-Id: I619eb9594c0d853d1f68a05e0012f61e881c42d3
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
msm: Don't depend on ANDROID_PMEM for contiguous region

The contiguous region is no longer related to PMEM. Remove
the dependency on it.

Change-Id: I92acd634166bfd0fed1a11475f87b1ba8f34e136
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
defconfig: 8610: add memory and spinlock debug features

Enabling these features gives us more information to work with for
general debugging.

Change-Id: I87acbdd1a271f25e540a46be5b70322e524d663e
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
msm: vidc: Register new nodes to support q6 hfi

Add support for different node values for simultaneous
venus and q6 usecase. This is needed to support HEVC
decode on msm8974, where venus and q6 both will be
present. Also create "link_name" device attribute
to provide a meaningful name to the video device
instead of video32, video33 etc. Userspace reads
this "link_name" sysfs node and creates appropiate
dev node symbolic link.

Change-Id: Iab14cad2c43b78eb7553ac78521611727597a42f
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
msm: Remove unused subsystem map api includes

Remove all unused subsystem map api includes.
Subsystem map api is being deprecated.

Change-Id: Ia2de8aeb2b0b08aa55ad2f25818e0c1ac138af14
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
mmc: core: Bypass clock scaling while accessing RPMB partition

According to eMMC specification, only commands of classes 0, 2, 4
are admitted while accessing RPMB partition. Still usage of any
other command other than CMD0, CMD6, CMD8, CMD12, CMD13, CMD15,
CMD18, CMD23, CMD25 is illegal.

If the MMC clock scaling algorithm decides to switch the clocks
while accessing RPMB partition it might need to send tuning
command (CMD21) which is illegal.

Since RPMB accesses are short and doesn't depend on throughput
bypass clock scaling while the current partion mode is RPMB.
The clock scaling statistics still take into account the duration
of access and hence able to respond quickly on the transfers made
after partition switch.

Change-Id: I422f2e6acb33ab97105944e3f7f90c3afb37ef47
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm_serial_hs_lite: Remove usage of PM Runtime for startup and shutdown

If UART application is running and system suspend happens, serial core
suspends the UART port by shuting down UART port. With that
msm_hsl_shutdown is calling pm_runtime_put_sync() from system suspend
context where before calling system suspend routine of UART driver,
it is already incremented UART device's PM refcount. Hence with that
pm_runtime_put_sync() from msm_hsl_shutdown() doesn't call UART driver's
PM runtime suspend routine. Hence UART device's Clock remains in ON state
which doesn't allow XO shutdown.

Serial core uses its own PM ops to enable/disable clock before invoking
any UART driver functionality. Hence remove usage of PM Runtime APIs
from startup() and shutdown() APIs of UART driver which makes sure that
suspend/resume is supported when UART application has opened the port
and not used any other way of preventing system suspend.

CRs-Fixed: 467750
Change-Id: Ie2b6e7eaeed518950674815c48a9ac3fe173d9e1
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
ASoC: wcd9320: Set DMIC sample rate in the codec

Set the correct clock frequency divider values in codec registers
based on MCLK and DMIC sample rate.  Set the ANC DMIC X2 based on
the sample rate.

Change-Id: I23bb38112a3f2045e1844224545a3c2a0fdd8446
Signed-off-by: Damir Didjusto <damird@codeaurora.org>