OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
7 years agoMerge "usb: pd: Support Android dual_role_usb sysfs class"
Linux Build Service Account [Sun, 27 Nov 2016 05:27:45 +0000 (21:27 -0800)]
Merge "usb: pd: Support Android dual_role_usb sysfs class"

7 years agoMerge "clk: qcom: Add support to convert the clock rate to KHz"
Linux Build Service Account [Sun, 27 Nov 2016 05:27:44 +0000 (21:27 -0800)]
Merge "clk: qcom: Add support to convert the clock rate to KHz"

7 years agoMerge "ARM: dts: msm: Specify the configuration for audio on msmfalcon interposer"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:51 +0000 (14:26 -0800)]
Merge "ARM: dts: msm: Specify the configuration for audio on msmfalcon interposer"

7 years agoMerge "ARM: dts: msm: Make required changes for msm8998-interposer"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:50 +0000 (14:26 -0800)]
Merge "ARM: dts: msm: Make required changes for msm8998-interposer"

7 years agoMerge "procfs: Update order of Ngid in /proc/PID/status"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:48 +0000 (14:26 -0800)]
Merge "procfs: Update order of Ngid in /proc/PID/status"

7 years agoMerge "ARM: dts: msm: add support of pm3falcon PMIC for msmfalcon"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:48 +0000 (14:26 -0800)]
Merge "ARM: dts: msm: add support of pm3falcon PMIC for msmfalcon"

7 years agoMerge "soc: qcom: Turn off MSM_PERFORMANCE_HOTPLUG_ON by default"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:47 +0000 (14:26 -0800)]
Merge "soc: qcom: Turn off MSM_PERFORMANCE_HOTPLUG_ON by default"

7 years agoMerge "usb: pd: Fix VDM and misc timing issues"
Linux Build Service Account [Sat, 26 Nov 2016 22:26:44 +0000 (14:26 -0800)]
Merge "usb: pd: Fix VDM and misc timing issues"

7 years agoMerge "soc: qcom: msm_bus: Set current index to default value"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:08 +0000 (17:47 -0800)]
Merge "soc: qcom: msm_bus: Set current index to default value"

7 years agoMerge "ARM: dts: msm: Add thermal mitigation properties to msmfalcon"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:06 +0000 (17:47 -0800)]
Merge "ARM: dts: msm: Add thermal mitigation properties to msmfalcon"

7 years agoMerge "input: synaptics_dsx: add checks of user input data"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:05 +0000 (17:47 -0800)]
Merge "input: synaptics_dsx: add checks of user input data"

7 years agoMerge "ASoC: wcd9335: Add dapm ignore suspend for codec dai"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:04 +0000 (17:47 -0800)]
Merge "ASoC: wcd9335: Add dapm ignore suspend for codec dai"

7 years agoMerge "ASoc: msm: qdsp6v2: Add support for compress capture"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:03 +0000 (17:47 -0800)]
Merge "ASoc: msm: qdsp6v2: Add support for compress capture"

7 years agoMerge "include: clock: Add audio external clock of_index extries"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:02 +0000 (17:47 -0800)]
Merge "include: clock: Add audio external clock of_index extries"

7 years agoMerge "msm: mdss: fix to handle multi-rect configuration in error cases"
Linux Build Service Account [Sat, 26 Nov 2016 01:47:00 +0000 (17:47 -0800)]
Merge "msm: mdss: fix to handle multi-rect configuration in error cases"

7 years agoMerge "msm: crypto: fix issues on digest buf and copy_from_user in qcedev.c"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:58 +0000 (17:46 -0800)]
Merge "msm: crypto: fix issues on digest buf and copy_from_user in qcedev.c"

7 years agoMerge "Revert "msm: kgsl: Enable limits management on A540v2""
Linux Build Service Account [Sat, 26 Nov 2016 01:46:58 +0000 (17:46 -0800)]
Merge "Revert "msm: kgsl: Enable limits management on A540v2""

7 years agoMerge "smb-lib: fix null ptr access while handling src change interrupt"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:56 +0000 (17:46 -0800)]
Merge "smb-lib: fix null ptr access while handling src change interrupt"

7 years agoMerge "msm: mdss: refine the calculation of tmds clock rate"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:55 +0000 (17:46 -0800)]
Merge "msm: mdss: refine the calculation of tmds clock rate"

7 years agoMerge "msm: camera: Enable secure camera feature"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:53 +0000 (17:46 -0800)]
Merge "msm: camera: Enable secure camera feature"

7 years agoMerge "soc: qcom: socinfo: Change offset of image OEM attribute"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:52 +0000 (17:46 -0800)]
Merge "soc: qcom: socinfo: Change offset of image OEM attribute"

7 years agoMerge "qpnp-smb2: force UFP mode before shutdown"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:51 +0000 (17:46 -0800)]
Merge "qpnp-smb2: force UFP mode before shutdown"

7 years agoMerge "qpnp-smb2: add support to configure auto recharge"
Linux Build Service Account [Sat, 26 Nov 2016 01:46:50 +0000 (17:46 -0800)]
Merge "qpnp-smb2: add support to configure auto recharge"

7 years agoMerge "qcom: scm: remove printing input arguments"
Linux Build Service Account [Fri, 25 Nov 2016 16:32:36 +0000 (08:32 -0800)]
Merge "qcom: scm: remove printing input arguments"

7 years agoMerge "audit: fix a double fetch in audit_log_single_execve_arg()"
Linux Build Service Account [Fri, 25 Nov 2016 16:32:35 +0000 (08:32 -0800)]
Merge "audit: fix a double fetch in audit_log_single_execve_arg()"

7 years agoqcom: scm: remove printing input arguments
Swetha Chikkaboraiah [Wed, 2 Nov 2016 11:19:41 +0000 (16:49 +0530)]
qcom: scm: remove printing input arguments

scm_call2 is printing the input arguments if TZ ret value is  < 0
leading to information leak. Remove printing input arguments.

Change-Id: I21dd6d83fa979aed2c79ebb2c9c8de63a247dded
CRs-Fixed: 1076407
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Signed-off-by: Paresh Purabhiya <ppurab@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
7 years agoMerge "soc: qcom: fix uninitialized references in gladiator_erp_v2"
Linux Build Service Account [Fri, 25 Nov 2016 08:10:26 +0000 (00:10 -0800)]
Merge "soc: qcom: fix uninitialized references in gladiator_erp_v2"

7 years agoMerge "ARM: dts: msm: Add support of IPA for falcon"
Linux Build Service Account [Fri, 25 Nov 2016 08:10:25 +0000 (00:10 -0800)]
Merge "ARM: dts: msm: Add support of IPA for falcon"

7 years agoprocfs: Update order of Ngid in /proc/PID/status
Neeraj Upadhyay [Tue, 14 Jun 2016 14:12:59 +0000 (07:12 -0700)]
procfs: Update order of Ngid in /proc/PID/status

Addition of Ngid breaks some third party applications, which
are dependent on a particular order of fields. This change
moves the field to the end, to fix this issue.

Change-Id: Ifdc781aca49dcb535d5fa5005b85dc87604560dc
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Make required changes for msm8998-interposer
Vijayavardhan Vennapusa [Fri, 25 Nov 2016 05:23:07 +0000 (10:53 +0530)]
ARM: dts: msm: Make required changes for msm8998-interposer

Add required changes for LDOs for msm8998-interposer-msmfalcon
for USB functionality to be working.

Change-Id: I121651a49ef27ba02f1960ed5c95baf93b00d1f5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
7 years agoARM: dts: msm: Add USBPD PHY device node for msmfalcon
Vijayavardhan Vennapusa [Thu, 17 Nov 2016 07:51:46 +0000 (13:21 +0530)]
ARM: dts: msm: Add USBPD PHY device node for msmfalcon

Add required USBPD PHY device node for msmfalcon for USB PD
functionality to be working.

Change-Id: I8cd2981f176e08c1ea4f8a9b7ff42887b590d941
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
7 years agosoc: qcom: Turn off MSM_PERFORMANCE_HOTPLUG_ON by default
Dilip Gudlur [Tue, 22 Nov 2016 18:10:21 +0000 (10:10 -0800)]
soc: qcom: Turn off MSM_PERFORMANCE_HOTPLUG_ON by default

Core-ctl module by default, manages cpus instead of msm_performance
module. Set this config to allow msm_performance manage(hot-plug) cores
in the absence of core-ctl.

Change-Id: I02a1007edfc63ad2c2dd99616cb1a64432b08d13
Signed-off-by: Dilip Gudlur <dgudlur@codeaurora.org>
7 years agoMerge "clk: qcom: Add snapshot of OSM CPU clock driver"
Linux Build Service Account [Thu, 24 Nov 2016 21:46:43 +0000 (13:46 -0800)]
Merge "clk: qcom: Add snapshot of OSM CPU clock driver"

7 years agoMerge "ARM: dts: msm: Add RTB support for msmtriton"
Linux Build Service Account [Thu, 24 Nov 2016 21:46:39 +0000 (13:46 -0800)]
Merge "ARM: dts: msm: Add RTB support for msmtriton"

7 years agoMerge "ARM: dts: msm: Add mpm2-sleep-counter device for msmtriton"
Linux Build Service Account [Thu, 24 Nov 2016 21:46:37 +0000 (13:46 -0800)]
Merge "ARM: dts: msm: Add mpm2-sleep-counter device for msmtriton"

7 years agoMerge "arm: qcom: correct description for MSMTRITON and MSMFALCON"
Linux Build Service Account [Thu, 24 Nov 2016 21:46:36 +0000 (13:46 -0800)]
Merge "arm: qcom: correct description for MSMTRITON and MSMFALCON"

7 years agoMerge "msm: vidc: parse 10-bit bus entries for msmfalcon"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:39 +0000 (06:13 -0800)]
Merge "msm: vidc: parse 10-bit bus entries for msmfalcon"

7 years agoMerge "ARM: dts: msm: Add venus device nodes for starlord"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:39 +0000 (06:13 -0800)]
Merge "ARM: dts: msm: Add venus device nodes for starlord"

7 years agoMerge "msm: vidc: Update mbs per second calculation"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:38 +0000 (06:13 -0800)]
Merge "msm: vidc: Update mbs per second calculation"

7 years agoMerge "msm: vidc: fix mutex lock issue"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:36 +0000 (06:13 -0800)]
Merge "msm: vidc: fix mutex lock issue"

7 years agoMerge "msm: vidc: fix the interrupt miss issue from video hardware"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:35 +0000 (06:13 -0800)]
Merge "msm: vidc: fix the interrupt miss issue from video hardware"

7 years agoMerge "msm: kgsl: Add support for A512 GPU"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:34 +0000 (06:13 -0800)]
Merge "msm: kgsl: Add support for A512 GPU"

7 years agoMerge "ASoC: msm: Update supported sample rates for USB Backend"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:33 +0000 (06:13 -0800)]
Merge "ASoC: msm: Update supported sample rates for USB Backend"

7 years agoMerge "netfilter: nfnetlink: correctly validate length of batch messages"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:32 +0000 (06:13 -0800)]
Merge "netfilter: nfnetlink: correctly validate length of batch messages"

7 years agoMerge "USB: gagget: f_fs: Return error if TX req is queued during device offline"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:31 +0000 (06:13 -0800)]
Merge "USB: gagget: f_fs: Return error if TX req is queued during device offline"

7 years agoMerge "clk: qcom: Add support for rf clk1 for msmfalcon"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:29 +0000 (06:13 -0800)]
Merge "clk: qcom: Add support for rf clk1 for msmfalcon"

7 years agoMerge "ARM: dts: msm: Update clock gfx node for MSMfalcon/Triton"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:28 +0000 (06:13 -0800)]
Merge "ARM: dts: msm: Update clock gfx node for MSMfalcon/Triton"

7 years agoMerge "clk: qcom: Add support for MMCC clock for MSMFalcon"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:26 +0000 (06:13 -0800)]
Merge "clk: qcom: Add support for MMCC clock for MSMFalcon"

7 years agoMerge "cgroup: prefer %pK to %p"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:25 +0000 (06:13 -0800)]
Merge "cgroup: prefer %pK to %p"

7 years agoMerge "HID: core: prevent out-of-bound readings"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:24 +0000 (06:13 -0800)]
Merge "HID: core: prevent out-of-bound readings"

7 years agoMerge "[media] xc2028: avoid use after free"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:23 +0000 (06:13 -0800)]
Merge "[media] xc2028: avoid use after free"

7 years agoMerge "tcp: fix use after free in tcp_xmit_retransmit_queue()"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:22 +0000 (06:13 -0800)]
Merge "tcp: fix use after free in tcp_xmit_retransmit_queue()"

7 years agoMerge "block: fix use-after-free in sys_ioprio_get()"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:21 +0000 (06:13 -0800)]
Merge "block: fix use-after-free in sys_ioprio_get()"

7 years agoMerge "cfg80211: validate beacon int as part of iface combinations"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:18 +0000 (06:13 -0800)]
Merge "cfg80211: validate beacon int as part of iface combinations"

7 years agoMerge "cfg80211: fix beacon interval in interface combination iteration"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:18 +0000 (06:13 -0800)]
Merge "cfg80211: fix beacon interval in interface combination iteration"

7 years agoMerge "cfg80211: identically validate beacon interval for AP/MESH/IBSS"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:17 +0000 (06:13 -0800)]
Merge "cfg80211: identically validate beacon interval for AP/MESH/IBSS"

7 years agoMerge "msm: sde: Correct max downscale factor for SDE rotator"
Linux Build Service Account [Thu, 24 Nov 2016 14:13:16 +0000 (06:13 -0800)]
Merge "msm: sde: Correct max downscale factor for SDE rotator"

7 years agoARM: dts: msm: Specify the configuration for audio on msmfalcon interposer
Laxminath Kasam [Thu, 15 Sep 2016 07:28:50 +0000 (12:58 +0530)]
ARM: dts: msm: Specify the configuration for audio on msmfalcon interposer

In msmfalcon interposer for CDP and MTP, add
audio related dtsi files to support external
codecs tasha and tavil.

CRs-Fixed: 1083537
Change-Id: I867e28101cfa37f9764d547f3b43871a430de6d7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
7 years agoARM: dts: msm: add support of pm3falcon PMIC for msmfalcon
Kiran Gunda [Tue, 15 Nov 2016 13:06:34 +0000 (18:36 +0530)]
ARM: dts: msm: add support of pm3falcon PMIC for msmfalcon

PM3FALCON inherits all it's peripheral nodes from PM2FALCON.
Disable WLED which is not supported on pm3falcon.

CRs-Fixed: 1093681
Change-Id: I1eb0583010712286659ec9b726f4ae7a9a2a84e6
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
7 years agousb: pd: Fix VDM and misc timing issues
Jack Pham [Thu, 17 Nov 2016 19:26:55 +0000 (11:26 -0800)]
usb: pd: Fix VDM and misc timing issues

Decrease the wait time from 5ms to 2ms when preparing a VDM
response to ensure that it gets sent out timely within
tSenderResponse (15ms). To avoid possible collision with an
incoming packet, check that there has not been any queued Rx
message just prior to sending a VDM. Also check the result of the
transmit and simply try again later if -EBUSY is returned.

While at it, fix a couple other miscellaneous timing issues.
Setting PD_ACTIVE=1 has considerable delay due to the charger's
voting mechanism, so move setting it to after starting the
SenderResponse timer when sending the Source Capabilities, and
similarly after sending a Request as a sink, in order to make
sure response timing is met. For source hard reset, increase the
tSrcRecover delay slightly from the spec minimum to account for
additional VBUS rise/fall delays before sending PS_RDY. Finally,
add a delay for VCONN_SWAP before sending PS_RDY for similar reason.

Change-Id: I5760fadb66cad6faf02e95a1e1bb975289ef8e9f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Avoid spurious state machine work on CC change
Jack Pham [Wed, 16 Nov 2016 22:28:10 +0000 (14:28 -0800)]
usb: pd: Avoid spurious state machine work on CC change

If an unexpected or delayed Type-C mode change notification
arrives from the charger driver, it could falsely kick the
state machine and could cause it to prematurely hard reset
since it preempted an expected message. This is particularly
true for the PR Swap operation in which the timing of PS_RDY
and resulting power negotiation is disrupted by the CC change
notification which is catching up. The previous way of handling
this by using the pd->in_pr_swap flag to mask the typec_mode
changes is quite fragile due to the uncertainty of when said
flag should be cleared.

Hence, demote the use of the in_pr_swap flag for only ignoring
the expected disconnect the happens in between the role change.
Then, for typec_mode changes, determine if current_pr is changed
or not to decide whether to kick the state machine. Finally,
since disconnect now is signaled by pd->current_pr==PR_NONE,
we'll need to keep track of whether VBUS had been enabled with
a separate flag rather than relying on pd->current_pr==PR_SRC.

Change-Id: I66be40091b75726d25c7be4478f1248a6af9ca3c
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Reset msgid counters properly
Jack Pham [Sat, 5 Nov 2016 17:55:38 +0000 (10:55 -0700)]
usb: pd: Reset msgid counters properly

Make sure to reset both Tx and Rx msgid counters when the
protocol layer needs to be reset. This occurs after hard/soft
reset as well as when starting up a new sink or source session.
Put this in a common function pd_reset_protocol().

Change-Id: I643a60a28e6498ca16b6f46293b8aa05eff40266
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Fix sink hard reset timing
Jack Pham [Wed, 16 Nov 2016 19:30:30 +0000 (11:30 -0800)]
usb: pd: Fix sink hard reset timing

The current hard reset handling (most recently fixed with
commit 172cec3a2c76 ("usb: pd: Improve sink hard reset handling"))
is based on a maximum timeout for the longest possible (according
to spec) duration that VBUS may turn off and back on again, just
under 2s, before re-starting the sink and waiting for capabilities
again. However, this method is prone to timing errors, particularly
tTypeCSinkWaitCap, which should be based on when VBUS turns on.

Fix this by making use of the VBUS presence notification from the
charger (PROP_PRESENT). Keep track of this in the psy_changed()
callback and use the falling notification to determine when to
transition out of PE_SNK_TRANSITION_TO_DEFAULT into PE_SNK_STARTUP.
Bring back PE_SNK_DISCOVERY which is now used as a waiting state
until the VBUS rising notification comes and transition to
PE_SNK_WAIT_FOR_CAPABILITIES. And move setting of PROP_VOLTAGE_MAX
to PE_SNK_STARTUP after VBUS has turned off to avoid tripping
the charger's overvoltage detection.

Also since aforementioned commit, the CC HW is now able to handle
VBUS going away and not treating it as a false disconnect, so we
can remove the workaround as a disconnect can now be treated as
a disconnect.

Change-Id: I885f3f4c219e102758fd09c8aae9257d093ebb72
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agoaudit: fix a double fetch in audit_log_single_execve_arg()
Paul Moore [Tue, 19 Jul 2016 21:42:57 +0000 (17:42 -0400)]
audit: fix a double fetch in audit_log_single_execve_arg()

There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1].  Of course this leaves a window of
opportunity for an unsavory application to munge with the data.

This patch reworks things by only fetching the argument data once[2]
into a buffer where it is scanned and logged into the audit
records(s).  In addition to fixing the double fetch, this patch
improves on the original code in a few other ways: better handling
of large arguments which require encoding, stricter record length
checking, and some performance improvements (completely unverified,
but we got rid of some strlen() calls, that's got to be a good
thing).

As part of the development of this patch, I've also created a basic
regression test for the audit-testsuite, the test can be tracked on
GitHub at the following link:

 * https://github.com/linux-audit/audit-testsuite/issues/25

[1] If you pay careful attention, there is actually a triple fetch
problem due to a strnlen_user() call at the top of the function.

[2] This is a tiny white lie, we do make a call to strnlen_user()
prior to fetching the argument data.  I don't like it, but due to the
way the audit record is structured we really have no choice unless we
copy the entire argument at once (which would require a rather
wasteful allocation).  The good news is that with this patch the
kernel no longer relies on this strnlen_user() value for anything
beyond recording it in the log, we also update it with a trustworthy
value whenever possible.

Reported-by: Pengfei Wang <wpengfeinudt@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Change-Id: Ie9848961d236739df5014474f2c2a781af9fb811
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: 43761473c254b45883a64441dd0bc85a42f3645c
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
7 years agoMerge rel/msm-4.4 on remote branch
Kyle Yan [Wed, 23 Nov 2016 18:54:11 +0000 (10:54 -0800)]
Merge rel/msm-4.4 on remote branch

Change-Id: Id919aee14aa3898b8168015a3ae310437d604812
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
7 years agousb: pd: Support Android dual_role_usb sysfs class
Jack Pham [Tue, 8 Nov 2016 19:07:31 +0000 (11:07 -0800)]
usb: pd: Support Android dual_role_usb sysfs class

Export an instance of the dual_role_usb class using the
provided helpers. This is an alternate set of sysfs nodes
that the Android framework uses to allow for user
interactive control of role switching.

Writing to the various properties achieves the following:
  - mode: toggles between UFP/Sink and DFP/Source via soft
        disconnect/reconnect without invoking PD.
  - power_role: toggles between Source and Sink modes via
        the PR_Swap operation
  - data_role: toggles between UFP (device) and DFP (host) via
        the DR_Swap operation

Android currently expects a single instance named "otg_default".

Change-Id: I7060b6f379bc8bed24b59d9df4ca2fb331437363
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agoARM: dts: msm: Add thermal mitigation properties to msmfalcon
Manaf Meethalavalappu Pallikunhi [Tue, 25 Oct 2016 14:28:16 +0000 (19:58 +0530)]
ARM: dts: msm: Add thermal mitigation properties to msmfalcon

Add thermal properties to enable kernel thermal monitoring and
mitigations like hotplug, thermal reset, vdd restriction, etc.
for msmfalcon. Add mitigation profiles for each physical CPU which
has information like sensor to monitor and various mitigation types
to enable for msmfalcon.

Change-Id: I36ca125143cf9929fb0bd781990bdd8ab1dbeebf
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
7 years agoARM: dts: msm: Add thermal sensor info for msmfalcon
Manaf Meethalavalappu Pallikunhi [Tue, 25 Oct 2016 14:16:39 +0000 (19:46 +0530)]
ARM: dts: msm: Add thermal sensor info for msmfalcon

Add thermal sensor related information, which provides information
such as alias, type and scaling factor to Kernel Thermal Monitor(KTM).
The KTM exposes these sensor information via sysfs to thermal-engine.

Change-Id: Ie564c181db61f6229479a49917cdb9e6c1887fc5
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
7 years agoinput: synaptics_dsx: add checks of user input data
Min Chong [Fri, 2 Sep 2016 18:36:37 +0000 (11:36 -0700)]
input: synaptics_dsx: add checks of user input data

Add checks of the user input count to avoid possible heap overflow

Signed-off-by: Min Chong <mchong@google.com>
Bug: 30937462
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: a6accafb252a76256f11c83e28c556c8ca4b8e1f
Change-Id: I6fc8323cbcf395a2c24e49e65cc7012709d031a2
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
7 years agoclk: qcom: Add support to convert the clock rate to KHz
Amit Nischal [Wed, 23 Nov 2016 08:28:00 +0000 (13:58 +0530)]
clk: qcom: Add support to convert the clock rate to KHz

Before sending the RPM clock rate request, rate should
be in KHz so fixing the same by converting the rate
to KHz and also fix some clock ids.

Change-Id: I3fb59f96b419bdb91f9a04cc47ab1c23d15dc74b
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
7 years agosoc: qcom: fix uninitialized references in gladiator_erp_v2
Neeraj Upadhyay [Tue, 22 Nov 2016 07:08:27 +0000 (12:38 +0530)]
soc: qcom: fix uninitialized references in gladiator_erp_v2

Fix uninitialized references in gladiator_erp_v2, reported
by static analysis tool. While at it, log all error registers
for Gladiator error.

Change-Id: If2b81e8b8fd446a07bc92ff23f74cdaa9ed11ff5
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoRevert "msm: kgsl: Enable limits management on A540v2"
Oleg Perelet [Mon, 21 Nov 2016 22:59:37 +0000 (14:59 -0800)]
Revert "msm: kgsl: Enable limits management on A540v2"

This reverts commit 691ddba4ee20 ("msm: kgsl: Enable limits
management on A540v2"). The GPU does not hit the voltage
limits at 670mhz so there isn't any need to enable
limit management.

CRs-Fixed: 1056661
Change-Id: If225dc4ec2c2e3eb8996f49f4fdf6acd31a50680
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
7 years agomsm: 8998: Replace cobalt with 8998
Runmin Wang [Thu, 6 Oct 2016 01:46:09 +0000 (18:46 -0700)]
msm: 8998: Replace cobalt with 8998

Update the code name from msmcobalt to msm8998. As a result, update
the filename containing "cobalt" and files content containing "cobalt".

CRs-Fixed: 1070840
Change-Id: I2c7b95e3e2a2fec7730724da9eeb86a39a77faf1
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
7 years agomsm: mdss: fix to handle multi-rect configuration in error cases
Ingrid Gallardo [Tue, 22 Nov 2016 20:25:33 +0000 (12:25 -0800)]
msm: mdss: fix to handle multi-rect configuration in error cases

In case of an error when configuring a pipe during kickoff,
driver unstages from HW the pipe that had the error, so it
makes sure this dirty pipe is not used by HW.
This is a problem if the pipe is configured in multi-rect
mode and we only fail one of the two multi-rect pipes since
in this case HW is expecting both multi-rect pipes that
represent the two HW rectangles and we are only configuring
one due the error that happened.
Fix this problem by making sure that if the configuration of
one multi-rect fail, we unstage both multi-rect pipes.

Change-Id: I09fbda8eb92c81acf24d0ff07ca9c040141680e1
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
7 years agoARM: dts: msm: Add support of IPA for falcon
Utkarsh Saxena [Thu, 25 Aug 2016 06:43:09 +0000 (12:13 +0530)]
ARM: dts: msm: Add support of IPA for falcon

Falcon uses IPA HW to shunt data between
different components like apps, modem and usb.

Add a support to enable IPA node for falcon.

Change-Id: If2b37804d82160d7965ea1d0f6eb69f96b3514f4
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
7 years agomsm: kgsl: Add support for A512 GPU
Rajesh Kemisetti [Thu, 10 Nov 2016 15:41:55 +0000 (21:11 +0530)]
msm: kgsl: Add support for A512 GPU

Add new GPU ID, corresponding VBIF and
initial settings for A512.

Change-Id: Id30415ce0ea73012125ced35771b9aae9f941c22
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
7 years agosoc: qcom: socinfo: Change offset of image OEM attribute
Imran Khan [Sun, 20 Nov 2016 18:25:44 +0000 (23:55 +0530)]
soc: qcom: socinfo: Change offset of image OEM attribute

There is a requirement, for diag command handler, that needs
the separator between image variant and image OEM to be shown
as part of OEM value in sysfs. So change the relevant offset
and size to include this information in image oem sysfs
attribute.

CRs-Fixed: 1086976
Change-Id: Iae12fa648df17dddd48f3a71e94d06c2c3b03277
Signed-off-by: Imran Khan <kimran@codeaurora.org>
7 years agoarm: qcom: correct description for MSMTRITON and MSMFALCON
Neeraj Upadhyay [Tue, 22 Nov 2016 06:41:28 +0000 (12:11 +0530)]
arm: qcom: correct description for MSMTRITON and MSMFALCON

Correct description for ARCH_MSMFALCON and ARCH_MSMTRITON,
to match the guidelines.

Change-Id: I2e657f3237c7ed38111b7bc6bddbf07ef4420924
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoqpnp-smb2: force UFP mode before shutdown
Nicholas Troast [Tue, 22 Nov 2016 00:36:05 +0000 (16:36 -0800)]
qpnp-smb2: force UFP mode before shutdown

If a legacy Type-A to Type-C cable is attached to the phone, but the
Type-A end is left disconnected, then the VBUS capacitor will be charged
when DRP toggles to DFP mode. Since VBUS is charged it will prevent the
device from staying in power off state when shutdown.

Fix this by forcing UFP mode before shutdown so the VBUS capacitor will be
discharged, and therefore it will not trigger PON to restart the device.

Change-Id: I53f89cf6b7c11f32c5e8e5a51a5986fa31424b92
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
7 years agoqpnp-smb2: add support to configure auto recharge
Subbaraman Narayanamurthy [Wed, 16 Nov 2016 03:39:08 +0000 (19:39 -0800)]
qpnp-smb2: add support to configure auto recharge

Currently, smb2 charger uses VBT_LT_CHG_RECHARGE_THRESH signal
from FG to enable auto recharge by default. Add support to
configure smb2 charger to use SOC_LT_CHG_RECHARGE_THRESH signal
from FG if needed.

This will enable charging to resume again when battery SOC drops
below the automatic recharge SOC threshold (configured in FG)
while charger is inserted and SOC goes down after the charge
termination had happened.

Change-Id: Ic68cd12cc861d04e107b70e2b96200483f13da26
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
7 years agomsm: vidc: fix the interrupt miss issue from video hardware
Karthikeyan Periasamy [Sat, 19 Nov 2016 01:30:16 +0000 (17:30 -0800)]
msm: vidc: fix the interrupt miss issue from video hardware

enable_irq() called before processing responses in work handler
which would lead to miss interrupt from video hardware sometimes.
An interrupt from video h/w will queue the work to work handler
but if work is already running the new work is not posted.
work handler has two parts, one, read all the messages from video h/w,
two, process the messages. queue work while processing messages
will miss reading the new messages from video h/w because
the queue work (as a result of interrupt from video h/w) will not
actually queue the work as work handler already running. Fix the
issue by enabling irq after processing all the responses to
makesure interrupt coming from video h/w after work handler
completed processing the messages.

CRs-Fixed: 1086284
Change-Id: Id158e5c6d89fc8b761d8cfe92afbf3592877c556
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
7 years agoMerge "msm: gsi: fix interrupt processing"
Linux Build Service Account [Mon, 21 Nov 2016 17:18:58 +0000 (09:18 -0800)]
Merge "msm: gsi: fix interrupt processing"

7 years agoMerge "clk: qcom: Add set_flags ops for the clk_gate2_ops"
Linux Build Service Account [Mon, 21 Nov 2016 17:18:57 +0000 (09:18 -0800)]
Merge "clk: qcom: Add set_flags ops for the clk_gate2_ops"

7 years agoMerge "ARM: dts: msm: Add DT for mediabox variant of apqcobalt"
Linux Build Service Account [Mon, 21 Nov 2016 17:18:57 +0000 (09:18 -0800)]
Merge "ARM: dts: msm: Add DT for mediabox variant of apqcobalt"

7 years agoMerge "msm: ipa: add api for getting IPA pdev"
Linux Build Service Account [Mon, 21 Nov 2016 17:18:56 +0000 (09:18 -0800)]
Merge "msm: ipa: add api for getting IPA pdev"

7 years agoclk: qcom: Add support for rf clk1 for msmfalcon
Taniya Das [Mon, 21 Nov 2016 09:25:00 +0000 (14:55 +0530)]
clk: qcom: Add support for rf clk1 for msmfalcon

RF clock 2 is not required on msmfalcon, so remove the clock instance and
add rf clk1 support instead.

Change-Id: I13258295e9ae9c8607586ed5686e97276823d08c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoARM: dts: msm: Update clock gfx node for MSMfalcon/Triton
Taniya Das [Thu, 17 Nov 2016 06:19:24 +0000 (11:49 +0530)]
ARM: dts: msm: Update clock gfx node for MSMfalcon/Triton

Modify the clock_gfx dummy clock to use the real clock controller for all
gpu clock controller clients.

Change-Id: If3c707877f2a0da04065b57a1c2fd44d256a5303
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agodefconfig: msm: Add support for GPUCC clocks
Taniya Das [Tue, 8 Nov 2016 14:01:35 +0000 (19:31 +0530)]
defconfig: msm: Add support for GPUCC clocks

GPU clock controller is required to be enabled for GPU clocks
supported by GPU clock controller.

Change-Id: Ica381b0b73bd59a10ac8fd876bda5c21678dfddb
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoclk: qcom: Add support for MMCC clock for MSMFalcon
Taniya Das [Sat, 24 Sep 2016 11:02:36 +0000 (16:32 +0530)]
clk: qcom: Add support for MMCC clock for MSMFalcon

Add support for the multimedia clock controller found on MSMFalcon
based devices. This should allow most clocks for multimedia peripherals
which includes display, video, camera etc.

Change-Id: If8aa0b094af5ff82fe66c95e3ef2f13632950d2e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agomsm: gsi: fix interrupt processing
Skylar Chang [Fri, 18 Nov 2016 18:56:51 +0000 (10:56 -0800)]
msm: gsi: fix interrupt processing

Fix GSI interrupt processing to make sure interrupt are
not missed. In order to achieve that interrupt should first be
cleared before processed.

Change-Id: I42978f2230e95456e4b4e932365e5b2c83445f56
CRs-Fixed: 1090894
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
7 years agoARM: dts: msm: Add RTB support for msmtriton
Neeraj Upadhyay [Wed, 16 Nov 2016 14:09:07 +0000 (19:39 +0530)]
ARM: dts: msm: Add RTB support for msmtriton

Add RTB (Register Trace Buffer) device tree entry for
msmtriton.

Change-Id: I6d55bf454cd629cd4894b60e40e9266d7e8b5bb9
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Add mpm2-sleep-counter device for msmtriton
Neeraj Upadhyay [Wed, 16 Nov 2016 14:07:49 +0000 (19:37 +0530)]
ARM: dts: msm: Add mpm2-sleep-counter device for msmtriton

Add mpm2-sleep-counter device node, which is used by the
boot_stats driver.

Change-Id: I2c8ffe10b650777f6c0b697c33e958300c9dbe66
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Add restart node and imem entries for msmtriton
Neeraj Upadhyay [Wed, 9 Nov 2016 12:58:07 +0000 (18:28 +0530)]
ARM: dts: msm: Add restart node and imem entries for msmtriton

Add restart node for msmtriton. Additionally, add IMEM
entries for restart-reason, dload_type, and boot_stats.

Change-Id: Ic72005ca76ceea377154e4b11dceccd7c8dc5ab5
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Add RTB support for msmfalcon
Neeraj Upadhyay [Wed, 16 Nov 2016 13:50:19 +0000 (19:20 +0530)]
ARM: dts: msm: Add RTB support for msmfalcon

Add RTB (Register Trace Buffer) device tree entry for
msmfalcon.

Change-Id: Ifd9f97f8595daac67c733e6120cdb3c89e5a02a4
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Add mpm2-sleep-counter device for msmfalcon
Neeraj Upadhyay [Wed, 16 Nov 2016 13:49:19 +0000 (19:19 +0530)]
ARM: dts: msm: Add mpm2-sleep-counter device for msmfalcon

Add mpm2-sleep-counter device node, which is used by the
boot_stats driver.

Change-Id: I32fb4c9a9be83a4448754bffde798432e417b17c
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: Add restart node and imem entries for msmfalcon
Neeraj Upadhyay [Wed, 9 Nov 2016 12:39:53 +0000 (18:09 +0530)]
ARM: dts: msm: Add restart node and imem entries for msmfalcon

Add restart node for msmfalcon. Additionally, add IMEM
entries for restart-reason, dload_type, and boot_stats.

Change-Id: I48e84889b0867d98d70056eecae07becebae4c00
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoARM: dts: msm: add perf-events support for msmfalcon and msmtriton
Neeraj Upadhyay [Wed, 9 Nov 2016 12:12:33 +0000 (17:42 +0530)]
ARM: dts: msm: add perf-events support for msmfalcon and msmtriton

Add device tree entry for performance monitor unit (pmu) on msmfalcon
and msmtriton.

Change-Id: I97a28cccc0494ea5ff45ccade9721da0c85edef7
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
7 years agoclk: qcom: Add set_flags ops for the clk_gate2_ops
Amit Nischal [Thu, 17 Nov 2016 09:47:05 +0000 (15:17 +0530)]
clk: qcom: Add set_flags ops for the clk_gate2_ops

Gate clocks would also require to set the flags using
clk_set_flags. Add the clk_ops for the same.

Change-Id: I9d180e4aedb17692eb2e48f98461239d29bbf975
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
7 years agoMerge "ARM: dts: msm: change UFS/SDHC2 power supply for msmcobalt interposer QRD"
Linux Build Service Account [Mon, 21 Nov 2016 01:44:55 +0000 (17:44 -0800)]
Merge "ARM: dts: msm: change UFS/SDHC2 power supply for msmcobalt interposer QRD"

7 years agoMerge "ARM: dts: msm: add charger/fg device nodes for PMFALCON"
Linux Build Service Account [Sat, 19 Nov 2016 15:36:59 +0000 (07:36 -0800)]
Merge "ARM: dts: msm: add charger/fg device nodes for PMFALCON"