Add firmware upgrade support for MXT224E and also support
the new T55 object introduced with the newer firmware. Read
T38 object from touch controller after the firmware upgrade
to avoid reading/writing into old T38 address.
Change-Id: Ifc7e0b2c31badbbf5a402413e841606db4f6dc66
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
In failure conditions, some clients violate the SMD PKT restriction of
single-threaded access resulting in overlapping open requests which
corrupt the wakelock list.
Move the wakelock initialization into the channel mutex to prevent
concurrent access from corrupting the wakelock.
CRs-Fixed: 374644
Change-Id: Idfdfc07fa69258d29154c4fce3fbcf2f000e63d6
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Due to power requirements arising from the USB bus suspend
feature, it is required that some USB-HS clocks be left on
across XO shutdown. Prevent these clocks from voting for
CXO in the sleep set.
CRs-Fixed: 376857
Change-Id: I38704fccaba26857f79dc0fc73672a95a050609b
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
The pll*_acpu_clk PLLs were created to allow PLLs to be
enabled and disabled without voting on CXO in the sleep
set. Previously, acpuclock was the only client of these
PLLs, but there are now some USB clocks that require
them as well. Rename these clocks to pll*_activeonly_clk.
Change-Id: Id94f9d41a8d566a95e2cfb615de67c11eaa081dd
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Add an idle for synchronization after writing the SMMU ASID register.
Change-Id: I1e13c9725e52293b7d4b9034fd1bac045ca5f0d1
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Reverse boosting is also seen on the DC charging path
and may cause charger removal detection problems.
Fix this by changing the reverse boost detection to only
check the active charging path. Only the active charging
path will see reverse boosting voltages because the other
path's OVP will automatically be opened (off) by the
hardware.
Change-Id: I23a48cd49d912e2bb2651159ec91d0ccfa7f5e0d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
PM8917 has a new register which allows configuring
the falling USB under voltage detection (UVD) threshold
from 3.85V to 4.35V in 100 mV steps.
Add an API that allows to set this value per default and
also only do this for PM8917 chips.
Change-Id: I9b4259b43f148762ac72af40bdc79b895d9b4fc2
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Microphone Bias may or may not have an external bypass capacitor
depending on the board configurations. Add the microphone bias
capless mode setting to the platform data for codec
CRs-fixed: 363941
Change-Id: Ia949d240b3b3122bc4bd6aca02ee5b6cd785d246
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
When decreasing the usb value from the usb_ma_table make
sure to take into account wether the value is available
on the PMIC platform by checking the first bit and if
the iusbfineres flag is set. This ensures that both
PM8917 and PM8921 are supported correctly.
Change-Id: I0be94103a066554924f8b212d3751f13812c49e0
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Set the BOOT_TIMER_EN bit when writing the
BOOT_DONE configuration. This is required to make
sure the boot timer will be enabled during the
next phone boot.
Change-Id: I0c43de3a0c285979f7bccd42e464ca0d2fbbe42a
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
For every soc calculations there are three unusable charge (uuc)
values.
uuc_uah_itest:
The uuc value in micro amp hour (uah) based on the max current
(itest). Typically this value is very high and changes as the
battery resistance changes
uuc_uah_iavg:
The uuc value based on the average current (iavg). Typically
this is lower than uuc_itest
uuc_reported:
The reported uuc based on state of charge (SOC) of the battery
which chooses a stepsize value and approaches towards
uuc_uah_itest or uuc_uah_iavg based on whether the device is
being charged.
The expectation is that the reported uuc increase as the battery looses SOC
and decrease as SOC approaches full condition.
To help us coming up with a satisfactory algorithm the following
parameters are introduced.
uuc_multiplier:
The multiplier used in stepsize calculation
uuc_iavg_div:
The divisor to use in calculation of stepsize when there
is a significant jump in average current from the
previous attempt
uuc_min_step_size:
The minimum stepsize to use if the calculated stepsize is very less
Also, in order to ignore the high bootup time load a timer is introduced
which makes the algorithm ignore iavg values upon bootup.
The algorithm also uses the previous uuc based on iavg in
"uuc_uah_iavg_prev". This aids in checking if there was a significant
increase in average current from the previous time uuc was calculated.
The algorithm keeps track of the previous reported uuc in last_uuc_uah.
Change-Id: I360fd74e7fd2c939dd67023c128b2d70da923e9a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Video core is dropping certain IDR frames due to timeout.
This is resulting in video corruption. Computing the core
timeout based on input frame size and programming it for
each input frame fixes the issue.
Change-Id: I75d5039bc09f9be6a3028461ee4a2f13064bf53a
CRs-fixed: 370570
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
After upgrading to kernel 3.4, there is 5 second delay
at the closing of PCM playback. The delay is due to missing
EOS from QDSP6 audio session manager causing pcm close function
of PCM platform driver to wait for 5 seconds. The root cause
for missing EOS is that ALSA dynmic PCM shutdown sequence has
changed. Now, trigger stop is called on the back-end DAI-LINK.
Furthermore, back-end trigger stop is called before front-end
trigger stop. Since sink stops rendering data, data at source
will never get consumed. EOS event will not arrive. As trigger
operation has to be atomic, it is very difficult to guarantee
sequence on shutting down various modules in QDSP6. The decision
is to abandon starting and stopping QDSP6 AFE port in trigger
function. This decision is considered acceptable as playback
and capture over SLIMBUS is no longer subject to strict sequence
which Q6 AFE port must be started after CODEC configuration.
Change-Id: I0cc1d8b7d058052d7fae55c84b6be46b5b0678e9
CRs-fixed: 373966
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Currently reading PMIC ID line status immediately once PMIC interrupt
is triggered. This leads to returning wrong ID line state sometimes
and causes not detecting connected devices. Hence add debouncing time
of 5msec for PMIC ID line state to settle down before reading PMIC
ID status.
CRs-Fixed: 371552
Change-Id: I4a5eae1d3759b5cc5c7ab70c4bde900a57ec1bd1
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Expose the following packed commands tests:
- Test the write packed commands list preparation
- Simulate a returned error code
- Send an invalid packed command to the card
Change-Id: I9e061a1992cc09f3203d25eba14418d9ebde371a
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
During a subsystem restart or a line-discipline unload with active data
transfer, the logical channel purge function (smux_lch_purge) could lead
to a deadlock while flushing the workqueues if it is called with
mutex_lha0 locked and one of the worker functions calls a function that
locks mutex_lha0. In addition, the local mode was reset which is not
expected behavior.
This change aborts all work functions in the case of a reset allowing
the flush to be performed without any locks held. Once the flush is
complete, then the appropriate locks can be obtained before the reset
flag is cleared and work items can once again get scheduled.
Change-Id: I2afbcc3885907cd0cc8695f7c7a85b61a999e1fb
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Add IIR2 filter interface for the wcd9304 codec.
Control the two 5 band IIR filters in the audio
codec through mixer controls. Enable individual
IIR filter bands and set band coefficients.
Change the IIR filter code to use snd_soc_write
instead of snd_soc_update_bits. If update bits
is used the IIR registers may not be correctly
updated.
Change-Id: I92fc147641e9eb270d8176f20445371fe5cc2f92
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
After we dump the current context in the fiq bark handler,
we call panic and wait to restart into download mode without
flushing the caches. Flush the cache before calling panic to
ensure that data is written out.
Change-Id: I507ffaafa1c8206d682a49f70fae30e4d408993e
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
User memory needs to be zeroed out before it is sent to the user.
To do this, the kernel maps the page, memsets it to zero and then
unmaps it. By virtue of mapping it, this forces us to flush the
dcache to ensure cache coherency between kernel and user mappings.
Originally, the page_alloc loop was using GFP_ZERO (which does a
map, memset, and unmap for each individual page) and then we were
additionally calling flush_dcache_page() for each page killing us
on performance. It is far more efficient, especially for large
allocations (> 1MB), to allocate the pages without GFP_ZERO and
then to vmap the entire allocation, memset it to zero, flush the
cache and then unmap. This process is slightly slower for very
small allocations, but only by a few microseconds, and is well
within the margin of acceptability. In all, the new scheme is
faster than the default for all sizes greater than 16k, and is
almost 4X faster for 2MB and 4MB allocations which are common for
textures and very large buffer objects.
The downside is that if there isn't enough vmalloc room for the
allocation that we are forced to fallback to a slow page by
page memset/flush, but this should happen rarely (if at all) and
is only included for completeness.
CRs-Fixed: 372638
Change-Id: Ic0dedbadf3e27dcddf0f068594a40c00d64b495e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
- Two different locks (spin lock and mutex lock) are used
to protect the shared data, this may cause kernel panic.
- Use spin lock to protect the shared data between interrupt
function and non-interrupt functions.
CRs-fixed: 375637
Change-Id: I10c93e2ca80d821908b93c22525695d89143825a
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
If Q6 does not support DTS, LA driver has to exit gracefully.
Introducing a new member cmd_response in audio_client structure
to indicate format is supported or not, and use this cmd_response
to return error from open_write.
Change-Id: Icad30c787e8a5f26ead92584e163721b94ba509d
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
8x30 FLUID device has integrated solution for MHL.
Power and GPIO related changes for MHL feature
is added. This is the first solution
where 8334 chipset is integrated as the MHL tx. The power
up for rails and MUX selection is specific to 8x30, since
8960 doesn't yet have this solution. This change also
includes the change to move the power and GPIO functions
to the driver from the board file.
Change-Id: I63219fb2fabf8af611792f0a4f71699553297d84
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
SDC3 slot is used to interface external SD card but we have seen
DATA/CMD CRC errors with few cards especially on CDPs. Currently
internal pad drive strength for DATA/CMD/CLK line is 8mA and we
are not seeing the DATA/CMD CRC errors if drive strength is set
to 10mA.
This change increases the DATA/CMD/CLK line internal drive strength
to 10mA for CDP platform.
CRs-Fixed: 376068
Change-Id: I34ecd868529d0039bde4471cd67efe2c8d1fb6d1
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
PCIE device resources are being allocated from the system memory
address space, instead of the PCIE device address space. This causes
conflict in system memory address space. Specify the PCI framework
to allocate device resources from a separate PCIE device address space
instead of the default system memory address space. Correctly allocate
the PCIE AXI resources from the system memory resource. The PCIE hardware
address translation block translates the PCIE AXI region to PCIE device
address region. Pass the PCIE AXI region as platfrom data instead of the
device platform resource to the PCIE controller driver. That way only the
required PCIE AXI resources are allocated from the system memory resource.
Change-Id: Id01bcbeb95f6894d00dfb786267c6c2fb30657e8
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: Ifbd7ffe6633860ab3858cf2b3465d593724c5c64
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
This reverts commit 5462907f72ddcc7d337ce9431d54428c8dc486eb.
Change-Id: Ibe6ec76096838b71e43cd9beac1f57ff179c5008
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
This reverts commit fb77f15240533390416da82a6c779919fa56d98c.
Change-Id: Ia725d79cc6aca8996a8194b26e5512ee0996626a
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
These sysfs attributes are generated dynamically and thus need to
be initialized with sysfs_attr_init() to avoid warnings such as:
BUG: key ef15ff8c not in .data!
which occur if lockdep is enabled.
Change-Id: I81145da5c2be7b81ba64302730856331e8ea8cf4
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
The current code sets up irq attributes at postcore_init. But
with irqdomains, irqs are mapped later at runtime. Thus we need
to set these parameters within the irqdomain map routine for
systems that are using Device Tree.
Change-Id: I185ebc4efdb194d690ecbec75171709bd09e0588
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
After writeback mode is switched for DSI Video interface, wait for
overlay done for prefill frame to avoid unnecessary fetches from previous
buffers resulting in page faults.
CRs-Fixed: 372389
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Iacd3775a718fe8e08404b4d119d447a88b628617
Update the call sites of cpu_is_msm8930() to include checks
for the MSM8930AA() variant. Relevant drivers will be
updated for more driver-specific specific MSM8930AA checks
at a later time.
Change-Id: Iff1af7a5454ec56c40390682ce2b4b6d1d325c91
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the SoC ID and cpu_is wrapper for identifying the
MSM8930AA SoC.
Change-Id: I7d2344c1903afb6830ef2362c200a91f72845d25
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the qpnp-pwm driver to support LPG/PWM devices in Qualcomm
plug-and-play (QPNP) PMIC chips. QPNP chips make use of
Qualcomm's SPMI register convention. LPG module provides a superset
of functionality provided by PWM device such as user defined pattern
generation, driving multiple PWM channels etc.
Change-Id: I29a22c6e655612d93cac10e6eea76383d37775e2
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
The kgsl driver needs to control certain clocks on the
3D graphics core and this core's IOMMU. Add these clocks
and device names to the lookup table.
Also add the dependency that allows the graphics AXI
clock to turn on whenever the graphics core clock
is turned on.
Change-Id: I02da539f43197f0b759c39db8650c9dd2f6d4d3a
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Add the missing msm_pil_unregister() call in the mba driver's
remove function.
Change-Id: Ib70f90449e5721ff20891ca299d883fae3e3b137
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
PM8038 MPP3 is not used for USB or HDMI control.
Therefore, remove the erroneous MPP initialization.
CRs-fixed: 376505
Change-Id: I9f3180cca989b1ae4b8065cc7fa62804603a2c99
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Add the device tree entry and the clock table entries for
the KGSL IOMMU device.
Change-Id: Ib79955ad32a0a3a5e32d8d89f5bb77e3628a955b
Signed-off-by: liu zhong <zhongl@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Update the clk_lookup device mappings so that the TSPP driver
can control TSIF clocks.
Change-Id: If5eb1768e3f922c4c50fc86f39bf5a55fd9ba5aa
Signed-off-by: Joel Nider <jnider@codeaurora.org>
clk_prepare and clk_unprepare are now required to be called before
clk_enable and after clk_disable. Do this for the dma driver.
Additionally, split the msm_dmov_clk_toggle function into two, since we
always know the value of the second argument at compile time.
CRs-Fixed: 366651
Change-Id: I0ed229187f49352cfe59cbbf211f5cdabfe06a9d
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
Since the context where unlink will be called is unaware of
validity of hci_conn pointer, fetch the valid hci_conn
before unlink.
CRs-fixed: 370274
Change-Id: I30a35acdf75c9b4787af6629c7b32d2d31b8ad80
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
TLMM v3 version has dedicated pads for only SDC1
and SDC2 among all SDC slots as opposed to v2 version.
Change-Id: I73c54f0a2799e6ffca74e5b846ac8339d0af3bb8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Finer granularity is needed when mapping into the IOMMU's for
rotator and mdp for secure playback. During secure playback
HLOS will only have access to map into one context bank. The
other context bank is secured and programmed by TrustZone.
Divide DISPLAY_DOMAIN into DISPLAY_WRITE_DOMAIN and
DISPLAY_READ_DOMAIN. Divide ROTATOR_DOMAIN into ROTATOR_SRC_DOMAIN
and ROTATOR_DST_DOMAIN.
Change-Id: I2d67525d6026b8a1fb2f2cb00e4bb118c8eb6f27
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
MVS driver to send correct frame type for EVRC codec.
Add comments in header file to improve readability.
Add new enumeration for g711 codec.
Change-Id: I359729126df29ece9ff3fc8414e73059da9d98e7
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
Since, IOMMU will be enabled by default, check the IOMMU support
from hardware and decide the code path.
Change-Id: I1cea3ff145add2c8ed9e99edecebfb80b1c78760
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
The sensor OV8825 supports internal actuator driver
for autofocus operation. Adding necessary board information
to enable the autofocus driver support
Change-Id: I8d9a19b31d9fec7dafc6e6b9aabb4c930d0b9ac0
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>