media: ov10820: update MIPI Timing

Modify global MIPI timing register, 0x4837, to be
double of default values provided by OV. This will
ensure that we will meet mipi timing requirements.

Not all registers were changed as some were already
doubled when the modes where submitted.

Change-Id: I92b24606d7b85af8b1b91680ecdb954f55f83c3d
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533194
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: John Kramer <e51211@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
ASoC: msm: add support for external echo refernce

Added mi2s tx path to route nxp smartboost dsp output signal for
echo cancellation in speakerphone mode.

Change-Id: I549b2b0fb07ebfacd5feda9fed0ffbf6361cf851
Signed-off-by: prabhu annabathula <prabhu.annabathula@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/531431
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Joseph Dwyer <wljd08@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm: dts: add mi2s tx lines to mi2s be dai link

enable mi2s tx line for echo cancellation support in speaker phone mode.

Change-Id: Ica91e70d06dc63e33b2ce797dd4e26352b71d04f
Signed-off-by: prabhu annabathula <prabhu.annabathula@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/531894
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Joseph Dwyer <wljd08@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm: msm: remove i2s board file

Board file was also registering the i2s dai device along with
device tree triggering the probe() twice. Broard file no longer
needed.

Change-Id: I2c04d0fab8637fdb1359222398de200653b1d884
Signed-off-by: prabhu annabathula <prabhu.annabathula@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/531965
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Joseph Dwyer <wljd08@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
input: touch: Add extra 0.5 ms delay after detecting touch reset done.

Adding extra 0.5 ms delay after detecting reset done will fix failure of 1st
i2c bus accessing, and ensure it works immediately at resume.

Change-Id: Ic462dfc76bf05bad63655158d633c048d83a20f0
Signed-off-by: ShiYong Li <a22381@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/532134
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jun-Xiao Chang <w20081@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
power: bq5101xb: Add Separate HOT and COLD States

Found an issue in the BQ5101xb driver that does an incorrect
check for exiting the OUT OF TEMP State because Cold and Hot
were checked in the same conditional using an OR. This leads
to the exiting of the OUT OF TEMP state and back to the
Waiting State and through the RUNNING state when power comes
back from the pad.

The fix will separate the HOT and COLD OUT OF TEMP states
into one for each.

Change-Id: Iffb5f07219136bf2f0c9223a541a294ff4206cfe
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/532717
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Kenneth Kessler <w65789@motorola.com>
Reviewed-by: Srinivas Sripathi <a14759@motorola.com>
Reviewed-by: Jason Knopsnyder <w19069@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
power: bq5101xb: Move States to Wait after Exit

This change makes the Out of Temp and Charge Complete
State go to the Wait State upon exit.  The problem was
that going directly to the Running State was causing
momentary UI changes because the Charge Pad does not
deliver power immediatly after State exit so the State
Machine would only briefly sit in the Running State
causing a toggling of the interface to the UI.  By
going to the Wait State it is more comfortable starting
place.  Also it was made possible for the Wait State
to go directly to the Out of Temp States so there is
not a reverse UI blip.

Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>

Change-Id: I4723d6e4d0d99090f3c5f5277a37de8895f822e6
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533150
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jason Knopsnyder <w19069@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm: msm_bus: Fix the 64-bit division during interleaving

When interleaving flag is enabled, the bandwidth is divided
between ports. There was an error in the division as the
macro was not correctly updated with the right order of using
bandwidth and port number when 64-bit division function
was used by the bus driver.
Correcting this for fixing the token allocation issues
observed.

CRs-Fixed: 472791
Change-Id: Ie7c7f9557006cbb946eaa9eff4b50771cc60525e
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Reviewed-on: http://gerrit.pcs.mot.com/533516
Submit-Approved: Jira Key <jirakey@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Reviewed-by: Jeffrey Vanhoof <qjv001@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Igor Kovalenko <cik009@motorola.com>
arm: msm: Remove L12 Always On

Undoing the change to leave L12 on always for the
P2 power supply change for camera that was made in
(CR). The L12 is now being turned on based
on device tree.

Change-Id: I98a7392c852ffe9944391d75528320029dade143
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533271
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: John Kramer <e51211@motorola.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
arm: msm: Add flag for PK supply

Added flag to know when to turn on the PK supply for
the ASIC.

Change-Id: Icbc0c0d252233d3fbbcdb7885e597ee2b045a9ad
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533274
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
media: ov10820: Support new PK Supply turn on

With P2 units, the supply for the power keep (PK) supply
of the asic was supplied by S1, which was always on
per the board-8960-regulator.c file, but now has moved
to L12. L12 needs to be enabled once and kept on all the
time.

The power keep needs to stay on all the time to keep the
firmware loaded into the ASIC, otherwise, the firmware
needs to be re-written on every camera launch.

Change-Id: I7afa6a0ef90b44419f3c71ccbea0a29d52d70e61
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533278
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
dts: ov10820: Add l12 power flag

For p2 units, the PK on the ASIC has been changed from
S1 to L12 for possible current drain improvement.

Added in new regulator name and a flag in the ov10820
board config to indicate when to turn on this regulator.
The ov10820 driver controls the power up sequence of the
asic.

Change-Id: I8a608222fb1750b7d4d67f2d2353b9f9a3dc683c
Signed-off-by: Elena Satraitis <w04888@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533262
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: John Kramer <e51211@motorola.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
msm: camera: Remove infinite poll on config status.

Infinite polling on config status causes high CPU usage and
multiple zombie mediaserver proceses after a camera daemon crash.
Remove the infinite polling as this does more harm than good.

Change-Id: I060bf9e143c529d2427a78fade81b973a34469cf
Signed-off-by: Rob Kubicki <w17311@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533578
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Elena Satraitis <w04888@motorola.com>
Reviewed-by: Joshua Galicia <cjg040@motorola.com>
Reviewed-by: Kiran Kumar Krishna <a16651@motorola.com>
Reviewed-by: Dave Schmidt <d.schmidt@motorola.com>
Reviewed-by: Satya Prasad Kottisa <fvgm76@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
driver: misc: msp430 Fix MSP430 flashing errors

Prevent an attempted I2C operation to the MSP430 from causing
a firmware download in progress to fail. This is causing several
different use case failures.

Change-Id: Iad06fe8a7a9f8912f58b1a4d4c588e96ad47d10f
Signed-off-by: Robert Wiegand <qa2113@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533593
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Reviewed-by: Jagatkumar Shah <w18764@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
input: touch: Synaptics DSX test report access

Allow access to Synaptics DSX test reports without requiring
permissions for write access to sysfs. User needs to read
"user_get_report[1|2]" to trigger report collection and then
follow standard protocol to acquire the data.

Change-Id: Ifb5c968778a39d09da6112612d710b1a2aa4bfc5
Signed-off-by: Alexander Filonenko <vtp684@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/528509
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-by: Igor Kovalenko <cik009@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
f2fs: add Android sdcard emulation

This commit adds support for an extended inode attribute that
forces specific ACLs and allows case insensitivity for files and
directories.  Once the attribute is set on a directory, all files
and subdirectories created within it will inherit the attribute.
The desired ACLs are specified using the android_emu mount option.

Change-Id: I20c52822f7f7517520ad77e8511491ddd372e522
Signed-off-by: Russ Knize <Russ.Knize@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/530114
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
ASoC TPA6165: fix stereo headphone detection

certain stereo headphones acc types specially in aux lineouts
in cars like bmw5 series are not detected properly,need to
force the acc type for proper detection.

Change-Id: I100049f4844b4b6f5f1b11951739c801e1b7e439
Signed-off-by: prabhu annabathula <prabhu.annabathula@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533050
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
merge main-jb-qcpro-4.2-merge to main-jb-qcpro-4.2
reduce memory usage by input driver

input: evdev: daisy-chain header and client buffers

The evdev driver calculates memory required to hold
client data using power-of-2 math, and then adds header
size, which pushes the request over the power of 2 and
requires 2x larger allocation.

Change the logic to daisy-chain the header and client array.
That way instead of single order4 allocation, we will make
order0+order2.

Change-Id: Ibebfcce40b56a0b9b8c98b2700fa99e5f4976e2e
Signed-off-by: Igor Kovalenko <cik009@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533666
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
touch: Adjust hint_events_per_packet

The hint_events_per_packet=180 will lead input_event
driver try to alloc 64K(order=4) pages due to power-of-2
logic (180 will turn into 256, which will be multipled
by EVDEV_BUF_PACKETS (8) and then by size of input_event (16),
giving 32K, which then will get doubled just to accommodate
the 160 byte evdev_client header. Thus, each open()
will ask for 64K (order4), which creates severe memory
fragmentation when tools like getevent/sendevent are used
for automated testing.

The real need for this hint is (num_of_fingers * 6) + 2 = 62.
The next power of 2 is 64, which we can safely use.

This alone would get request size down to 16K (order2),
but combined with evdev driver optimization, we can get it
down to 4K+8K, so the largest request would be order1.

Change-Id: I13b32518a9b792bff8cf26cb0f748736f3690488
Signed-off-by: Igor Kovalenko <cik009@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/533674
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Christopher Fries <qcf001@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>