OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
7 years agoRevert "soc: qcom: Listen to SUBSYS_AFTER_SHUTDOWN notification"
Puja Gupta [Mon, 17 Oct 2016 18:50:47 +0000 (11:50 -0700)]
Revert "soc: qcom: Listen to SUBSYS_AFTER_SHUTDOWN notification"

Revert commit 238f87868dc7 ("soc: qcom: Listen to
SUBSYS_AFTER_SHUTDOWN notification").

SUBSYS_AFTER_SHUTDOWN notification is late for subsystem as they
are not able to communicate with firmware.

CRs-Fixed: 1078743
Change-Id: I61b308dce7e92b0e28033750885eac4a003dc01a
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
7 years agoMerge "clk: qcom: clk-voter: Add support for voter clocks"
Linux Build Service Account [Sun, 16 Oct 2016 06:19:41 +0000 (23:19 -0700)]
Merge "clk: qcom: clk-voter: Add support for voter clocks"

7 years agoMerge "input: misc: pat9125: add gpio configuration and pinctrl support"
Linux Build Service Account [Sat, 15 Oct 2016 14:37:46 +0000 (07:37 -0700)]
Merge "input: misc: pat9125: add gpio configuration and pinctrl support"

7 years agoMerge "usb: pd: Use new power_supply PD_IN_HARD_RESET property"
Linux Build Service Account [Sat, 15 Oct 2016 08:20:00 +0000 (01:20 -0700)]
Merge "usb: pd: Use new power_supply PD_IN_HARD_RESET property"

7 years agoMerge "power_supply: Add additional USB PD properties"
Linux Build Service Account [Sat, 15 Oct 2016 08:19:58 +0000 (01:19 -0700)]
Merge "power_supply: Add additional USB PD properties"

7 years agoMerge "drivers: soc: add size checks and update log messages"
Linux Build Service Account [Sat, 15 Oct 2016 08:19:57 +0000 (01:19 -0700)]
Merge "drivers: soc: add size checks and update log messages"

7 years agoMerge "soc: qcom: core_hang: Separate sysfs entry for silver and gold cluster"
Linux Build Service Account [Sat, 15 Oct 2016 08:19:56 +0000 (01:19 -0700)]
Merge "soc: qcom: core_hang: Separate sysfs entry for silver and gold cluster"

7 years agoMerge "leds: qpnp-flash-v2: Fix possible NULL pointer dereference"
Linux Build Service Account [Sat, 15 Oct 2016 08:19:51 +0000 (01:19 -0700)]
Merge "leds: qpnp-flash-v2: Fix possible NULL pointer dereference"

7 years agoMerge "leds: qpnp-flash-v2: Add support for preemptive charger mitigation"
Linux Build Service Account [Sat, 15 Oct 2016 08:19:51 +0000 (01:19 -0700)]
Merge "leds: qpnp-flash-v2: Add support for preemptive charger mitigation"

7 years agoMerge "ASoc: wcd9335: Ignore mbhc get impedance error"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:29 +0000 (17:58 -0700)]
Merge "ASoc: wcd9335: Ignore mbhc get impedance error"

7 years agoMerge "scsi: ufs: gate ref_clk during aggressive clk gating"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:28 +0000 (17:58 -0700)]
Merge "scsi: ufs: gate ref_clk during aggressive clk gating"

7 years agoMerge "scsi: ufs: reduce auto hibern8 timeout to save power"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:27 +0000 (17:58 -0700)]
Merge "scsi: ufs: reduce auto hibern8 timeout to save power"

7 years agoMerge "soc: qcom: msm_smem: Pass device structure to ramdump driver"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:26 +0000 (17:58 -0700)]
Merge "soc: qcom: msm_smem: Pass device structure to ramdump driver"

7 years agoMerge "ASoC: wcd934x: Update DSD register sequence for v1.1"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:25 +0000 (17:58 -0700)]
Merge "ASoC: wcd934x: Update DSD register sequence for v1.1"

7 years agoMerge "ASoC: wcd934x: update keeper enable for soundwire functionality"
Linux Build Service Account [Sat, 15 Oct 2016 00:58:24 +0000 (17:58 -0700)]
Merge "ASoC: wcd934x: update keeper enable for soundwire functionality"

7 years agousb: pd: Use new power_supply PD_IN_HARD_RESET property
Jack Pham [Sat, 1 Oct 2016 00:33:04 +0000 (17:33 -0700)]
usb: pd: Use new power_supply PD_IN_HARD_RESET property

Set the POWER_SUPPLY_PROP_PD_IN_HARD_RESET when hard reset
has been issued and clear it when completed. This replaces
the previous use of PD_ACTIVE which is now used to indicate
assertively whether the port partner is PD capable or not.
As such, since charger driver now definitively knows, it is
also not necessary to explicitly change PROP_TYPE to USB_PD.

Change-Id: I4d8c9fcdf553d1cf1ae79c66932773834804d1a9
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agopower_supply: Add additional USB PD properties
Jack Pham [Sat, 1 Oct 2016 00:32:01 +0000 (17:32 -0700)]
power_supply: Add additional USB PD properties

Add additional properties for USB PD usage:
- POWER_SUPPLY_PROP_PD_IN_HARD_RESET is set when PD is
  undergoing a hard reset
- POWER_SUPPLY_PROP_PD_CURRENT_MAX used to indicate the
  current limit as negotiated over PD
- POWER_SUPPLY_PROP_PD_USB_SUSPEND_SUPPORTED is set when
  USB suspend current limit must be honored when USB bus
  is suspended

Also add enums to distinguish PD activity state: inactive, active.

Change-Id: I0a3d98ac1e1202e5b655b2e3a8102691b61359c8
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Support VCONN Swap
Jack Pham [Fri, 30 Sep 2016 06:50:40 +0000 (23:50 -0700)]
usb: pd: Support VCONN Swap

Support incoming VCONN Swap requests by accepting and turning
off/on VCONN.

Due to HW board limitations, if VCONN is being sourced from the
VBUS input we cannot support enabling VCONN while as a sink and
greater than 5V has been negotiated on VBUS. In that case, reject
the request. Add a device tree property that indicates whether
the board is configured for separate VCONN supply.

Change-Id: If3a9aa316ae08a80468631f3d536a1b345e21b18
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Prevent sleep when state machine in progress
Jack Pham [Wed, 21 Sep 2016 19:03:29 +0000 (12:03 -0700)]
usb: pd: Prevent sleep when state machine in progress

With PM autosleep enabled, the system may aggressively enter
and re-enter suspend in between calls to queue_work() and
when the state machine function gets executed, which may
at best result in numerous suspend/resume cycles and at
worse starve the PD state machine from even executing.

Fix this by calling pm_stay_awake() whenever the work is
queued and relinquish with pm_relax() when no further work
is to be done.

Change-Id: I71d8ea0c69a7b174c2280f92d1f5342e5e50d9b0
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Simplify VDM tx handling
Jack Pham [Thu, 29 Sep 2016 01:40:36 +0000 (18:40 -0700)]
usb: pd: Simplify VDM tx handling

VDMs, especially structured ones, are almost always handled
as requests and responses. Hence it does not make sense to
allow more than one outgoing VDM at a time, so get rid of the
vdm_tx_queue list and simplify it to a single-issued packet.

Because port partners can only have one VDM request/response in
flight, also handle the case when a new structured request is
received before the previous response has been sent. In that
case we simply discard the queued message as it's now invalid.

Change-Id: I144f8158dbf8be0babf5516b01d084fd053413c3
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Correctly handle invalid Structured VDMs
Jack Pham [Thu, 29 Sep 2016 01:40:32 +0000 (18:40 -0700)]
usb: pd: Correctly handle invalid Structured VDMs

As UFP since the policy engine only responds to the Discover
Identity command, all other commands are unrecognized and
therefore should be NAKed. Fix the handling as follows:

 - Ensure the standard Discover Identity was sent using
   SID of 0xFF00, otherwise it is invalid
 - Don't NAK incoming Attention messages
 - When sending a NAK, respond with the same SVID of the
   initiating command, whether it was correct or not
 - Enter Mode is not supported in general, but the NAK
   should also be sent back with the same mode index
 - Re-issue Discover SVIDs when more than 12 SVIDs are returned
 - Clean up macro name prefixes from 'VDM' to 'SVDM' to
   emphasize they are accessing structured VDM specific bits

Change-Id: Id2590065a01e46f8da70733d55f3bfabff5b532d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Miscellaneous compliance fixes
Jack Pham [Thu, 29 Sep 2016 01:40:25 +0000 (18:40 -0700)]
usb: pd: Miscellaneous compliance fixes

Fix several issues which help address PD compliance testing:
- Soft reset should be issued instead of hard reset in cases
  where an unexpected message is received.
- In source mode, send a Reject if the Request PDO object also
  exceeds the advertised current capability. Fix the incorrect
  bitmask in the PD_RDO_FIXED_CURR macro.
- Handle possibility of quick back-to-back RX messages by
  flushing the sm worker to ensure the last message was fully
  processed before overwriting the buffer.
- Discard PING messages as they are not applicable to Type-C.
- Respond to GET_SINK_CAP while in source mode, and vice
  versa, respond to GET_SOURCE_CAP when in sink mode.
- Move pd->hard_reset=false to PE_SRC/SNK_TRANSITION_TO_DEFAULT
  for consistency.
- Change default sink capabilities to advertise only 5V @ 900mA
  since the policy engine will not automatically request higher
  voltages. If userspace wants to request greater than 5V it should
  also update the sink capabilities.
- Reset the protocol counters at the beginning of PE_SNK_STARTUP.

Change-Id: I44598eb0b49efd763f86f303c70e8b018fca994b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agoASoc: wcd9335: Ignore mbhc get impedance error
Phani Kumar Uppalapati [Wed, 14 Sep 2016 17:55:02 +0000 (10:55 -0700)]
ASoc: wcd9335: Ignore mbhc get impedance error

Avoid DAPM failure by ignoring the mbhc get impedance
errors as this is not a fatal and audio can still work
even if the class-H settings are not updated based on
impedance values.

Change-Id: Icd6846d157af5a96d5ae49261e109cbd5ab8c266
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
7 years agosoc: qcom: msm_smem: Pass device structure to ramdump driver
Chris Lew [Wed, 12 Oct 2016 21:13:52 +0000 (14:13 -0700)]
soc: qcom: msm_smem: Pass device structure to ramdump driver

The ramdump driver uses the device pointer during ramdump read.
This change passes in the device pointer for smem during
ramdump create and moves the call to the probe function.

CRs-Fixed: 1075262
Change-Id: I6234e35d76440beb53c139ad0b02ec8b49c2a196
Signed-off-by: Chris Lew <clew@codeaurora.org>
7 years agoMerge "leds: qpnp-flash-v2: Add support for configuring hardware mitigation"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:39 +0000 (03:40 -0700)]
Merge "leds: qpnp-flash-v2: Add support for configuring hardware mitigation"

7 years agoMerge "usb: gadget: f_midi: Use 1024 bytes as MIDI buffer size"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:38 +0000 (03:40 -0700)]
Merge "usb: gadget: f_midi: Use 1024 bytes as MIDI buffer size"

7 years agoMerge "ASoC: msm: lock read/write when add/free audio ion memory"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:32 +0000 (03:40 -0700)]
Merge "ASoC: msm: lock read/write when add/free audio ion memory"

7 years agoMerge "input: pat9125: add support of sending rotating switch events"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:31 +0000 (03:40 -0700)]
Merge "input: pat9125: add support of sending rotating switch events"

7 years agoMerge "soc: qcom: glink: Fix ctx initialization with magic number"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:31 +0000 (03:40 -0700)]
Merge "soc: qcom: glink: Fix ctx initialization with magic number"

7 years agoMerge "fbdev: use unsigned integers to prevent overflow"
Linux Build Service Account [Fri, 14 Oct 2016 10:40:30 +0000 (03:40 -0700)]
Merge "fbdev: use unsigned integers to prevent overflow"

7 years agoinput: misc: pat9125: add gpio configuration and pinctrl support
Vevek Venkatesan [Fri, 30 Sep 2016 15:59:22 +0000 (21:29 +0530)]
input: misc: pat9125: add gpio configuration and pinctrl support

Pat9125 is a gpio driven i2c slave. This change adds the gpio
configuration and pinctrl support for pat9125 driver.

Change-Id: I2a9b379715622b5f010a5780ca481da7f9619400
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
7 years agoclk: qcom: clk-voter: Add support for voter clocks
Taniya Das [Fri, 19 Aug 2016 04:38:28 +0000 (10:08 +0530)]
clk: qcom: clk-voter: Add support for voter clocks

Voter clocks nodes would require aggregation of all child node rates.
Certain clocks that are not rate-settable can still take
advantage of voter clock functionality.

Change-Id: Ibab7a5aa6aa89236974fcd0d65ffe0bd1a7acb12
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoMerge "ARM: dts: msm: Fix clock for 720p@240fps usecase"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:39 +0000 (19:11 -0700)]
Merge "ARM: dts: msm: Fix clock for 720p@240fps usecase"

7 years agoMerge "msm: vidc: Update plane count in get-format"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:38 +0000 (19:11 -0700)]
Merge "msm: vidc: Update plane count in get-format"

7 years agoMerge "defconfig: Enable USB MIDI Function driver for msmcobalt"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:37 +0000 (19:11 -0700)]
Merge "defconfig: Enable USB MIDI Function driver for msmcobalt"

7 years agoMerge "soc: qcom: smem: Update CDSP processor ID"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:37 +0000 (19:11 -0700)]
Merge "soc: qcom: smem: Update CDSP processor ID"

7 years agoMerge "msm: ipa3: fix benign prints on ipa3_usb_init"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:36 +0000 (19:11 -0700)]
Merge "msm: ipa3: fix benign prints on ipa3_usb_init"

7 years agoMerge "ARM: dts: msm: Add support for Lpass PIL on msmfalcon"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:35 +0000 (19:11 -0700)]
Merge "ARM: dts: msm: Add support for Lpass PIL on msmfalcon"

7 years agoMerge "usb: pd: Fix PR_SWAP handling"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:33 +0000 (19:11 -0700)]
Merge "usb: pd: Fix PR_SWAP handling"

7 years agoMerge "qpnp-fg-gen3: add support to configure ki coefficients during discharge"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:32 +0000 (19:11 -0700)]
Merge "qpnp-fg-gen3: add support to configure ki coefficients during discharge"

7 years agoMerge "qpnp-fg-gen3: Add support to hold soc at 100 when charge is full"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:32 +0000 (19:11 -0700)]
Merge "qpnp-fg-gen3: Add support to hold soc at 100 when charge is full"

7 years agoMerge "ASoC: wcd934x-dsp-cntl: Make sure memories can enter deep sleep"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:31 +0000 (19:11 -0700)]
Merge "ASoC: wcd934x-dsp-cntl: Make sure memories can enter deep sleep"

7 years agoMerge "ASoC: wcd934x-dsp-cntl: add support for codec restart"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:30 +0000 (19:11 -0700)]
Merge "ASoC: wcd934x-dsp-cntl: add support for codec restart"

7 years agoMerge "icnss: Remove msm_bus bandwidth vote"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:29 +0000 (19:11 -0700)]
Merge "icnss: Remove msm_bus bandwidth vote"

7 years agoMerge "iommu/io-pgtable-arm: Use outer shareable for all configurations"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:28 +0000 (19:11 -0700)]
Merge "iommu/io-pgtable-arm: Use outer shareable for all configurations"

7 years agoMerge "ASoC: codecs: Add teardown() call in shutdown"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:27 +0000 (19:11 -0700)]
Merge "ASoC: codecs: Add teardown() call in shutdown"

7 years agoMerge "msm: ipa: update wan pool size on napi enable"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:27 +0000 (19:11 -0700)]
Merge "msm: ipa: update wan pool size on napi enable"

7 years agoMerge "sched/cgroup: Fix/cleanup cgroup teardown/init"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:25 +0000 (19:11 -0700)]
Merge "sched/cgroup: Fix/cleanup cgroup teardown/init"

7 years agoMerge "soc: qcom: glink: Fix uninitialzed return value"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:23 +0000 (19:11 -0700)]
Merge "soc: qcom: glink: Fix uninitialzed return value"

7 years agoMerge "soc: qcom: qsee_ipc_irq_bridge: Fix null pointer dereferences"
Linux Build Service Account [Fri, 14 Oct 2016 02:11:23 +0000 (19:11 -0700)]
Merge "soc: qcom: qsee_ipc_irq_bridge: Fix null pointer dereferences"

7 years agodrivers: soc: add size checks and update log messages
Siena Richard [Tue, 4 Oct 2016 19:24:28 +0000 (12:24 -0700)]
drivers: soc: add size checks and update log messages

Add size checks to validate minimum size is met. Update log messages
to include only relevant information to ensure logs are accurate and
useful.

Change-Id: Idf76a7d964ec6989a0474d49895e54103f17938b
CRs-fixed: 1073129
Signed-off-by: Siena Richard <sienar@codeaurora.org>
7 years agousb: gadget: f_midi: Use 1024 bytes as MIDI buffer size
Hemant Kumar [Fri, 14 Oct 2016 00:05:40 +0000 (17:05 -0700)]
usb: gadget: f_midi: Use 1024 bytes as MIDI buffer size

Some UDC driver doesn't allow or throw errors when USB request buffer
queued is unaligned i.e. buffer size is not equal to wMaxPacketSize or
multiple of wMaxPacketSize. Fix this issue by using 1024 bytes as MIDI
buffer size instead of 256 bytes.

Change-Id: I71d520a5a800a3e612dc4d57e7baffa93fad61b3
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
7 years agosoc: qcom: core_hang: Separate sysfs entry for silver and gold cluster
Runmin Wang [Tue, 3 May 2016 20:13:26 +0000 (13:13 -0700)]
soc: qcom: core_hang: Separate sysfs entry for silver and gold cluster

Silver and gold cluster use different PMU_EVENT and may need to have
different threshold values.

This patch creates different sysfs entries for silver and gold cluster.

CRs-Fixed: 1004392
Change-Id: I88cdf5110cadb44a81c0c700d5188bf639bb2129
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
7 years agoARM: dts: msm: Add support for Lpass PIL on msmfalcon
Gaurav Kohli [Fri, 2 Sep 2016 07:10:40 +0000 (12:40 +0530)]
ARM: dts: msm: Add support for Lpass PIL on msmfalcon

Add support for Lpass PIL which facilitates the loading of Lpass
firmware, authentication and bringing it out of reset.

Change-Id: I587b39bc302449591cc0c71ff15b740374a8af4d
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
7 years agoMerge "misc: qcom: qdsp6v2: Add missing initialization"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:08 +0000 (12:29 -0700)]
Merge "misc: qcom: qdsp6v2: Add missing initialization"

7 years agoMerge "clk: qcom: Add support for the turing vote clocks"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:07 +0000 (12:29 -0700)]
Merge "clk: qcom: Add support for the turing vote clocks"

7 years agoMerge "ARM: dts: msm: Add support for GDSCs for MSMFalcon/MSMtriton"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:06 +0000 (12:29 -0700)]
Merge "ARM: dts: msm: Add support for GDSCs for MSMFalcon/MSMtriton"

7 years agoMerge "ASoC: wcd9xxx: Disable external clock buffer when mclk is not in use"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:06 +0000 (12:29 -0700)]
Merge "ASoC: wcd9xxx: Disable external clock buffer when mclk is not in use"

7 years agoMerge "ASoC: wcd-spi: Initialize local variables before usage"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:05 +0000 (12:29 -0700)]
Merge "ASoC: wcd-spi: Initialize local variables before usage"

7 years agoMerge "sched: bucketize CPU c-state levels"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:04 +0000 (12:29 -0700)]
Merge "sched: bucketize CPU c-state levels"

7 years agoMerge "sched: use wakeup latency as c-state determinant"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:04 +0000 (12:29 -0700)]
Merge "sched: use wakeup latency as c-state determinant"

7 years agoMerge "net: core: Remove warning for cloned packets in ingress path"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:03 +0000 (12:29 -0700)]
Merge "net: core: Remove warning for cloned packets in ingress path"

7 years agoMerge "defconfig: msm: Turn on scheduler tuning configs"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:02 +0000 (12:29 -0700)]
Merge "defconfig: msm: Turn on scheduler tuning configs"

7 years agoMerge "sched/tune: Remove redundant checks for NULL css"
Linux Build Service Account [Thu, 13 Oct 2016 19:29:02 +0000 (12:29 -0700)]
Merge "sched/tune: Remove redundant checks for NULL css"

7 years agousb: pd: Fix PR_SWAP handling
Jack Pham [Thu, 29 Sep 2016 01:40:28 +0000 (18:40 -0700)]
usb: pd: Fix PR_SWAP handling

Fix several issues found with PR Swap robustness.
- Change Rd->Rp as part of PE_PRS_SNK_SRC_TRANSITION_TO_OFF
  instead of PE_PRS_SNK_SRC_SOURCE_ON since the latter state
  is entered once the connection is re-established post-swap.
  Make sure to also notify the charger to stop drawing power.
- Properly handle/ignore CC disconnect in psy_changed() which
  happens during the swap operation. Similarly, don't queue the
  state worker when detecting CC re-connect after becoming sink
  as the transition is already handled via PD message exchange.
- Restore DRP toggling as soon as the operation is completed
  in order to cycle properly after the next disconnection.
- Add tSwapSourceStart delay after becoming new source and
  before sending the source capabilities messages.
- Add extra time (< tNewSrc) after enabling VBUS to allow it
  to fully ramp up after becoming the new source.
- Unconditionally disable Vconn regulator during disconnect,
  since it's now possible to have it on even in sink mode.

Change-Id: I9ee694d56dac11c315b45c8fc1e8be9426d06719
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agousb: pd: Improve sink hard reset handling
Jack Pham [Thu, 29 Sep 2016 01:40:20 +0000 (18:40 -0700)]
usb: pd: Improve sink hard reset handling

During hard reset in sink mode, move the wait for VBUS to
reconnect to the PE_SNK_TRANSITION_TO_DEFAULT state. Use
the hrtimer to wait up to the maximum expected time for
VBUS to come back, which is triggered by the CC notification
from psy_changed(). This simplifies PE_SNK_STARTUP to only be
invoked when VBUS is already present and eliminates the
PE_SNK_DISCOVERY state.

When a non-PD source is connected, as the engine attempts to
wait for source capabilities this will result in hard reset
getting attempted 3 times with the hrtimer reaching full
timeout each time (for a total of ~6s) before settling.

Change-Id: Iee74c206b28fea9b75df2d234609a7939bc3d93c
Signed-off-by: Jack Pham <jackp@codeaurora.org>
7 years agosoc: qcom: smem: Update CDSP processor ID
Dhoat Harpal [Thu, 13 Oct 2016 06:45:16 +0000 (12:15 +0530)]
soc: qcom: smem: Update CDSP processor ID

The local table of processor IDs maintained by SMEM must match the table
of processor IDs maintained by SMEM on remote processors, because the
IDs are global.

Update the local table of processor IDs to match the table on remote
processors.

CRs-Fixed: 1077384
Change-Id: I24d3809450bf63cbc6b930575c310cee116910f7
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
7 years agomsm: vidc: Update plane count in get-format
Saurabh Kothawade [Wed, 5 Oct 2016 23:20:09 +0000 (16:20 -0700)]
msm: vidc: Update plane count in get-format

Currently, driver updates plane count only when client
requests buffer requirements. If it queries buffer
format before requesting buffer requirement, driver
returns incorrect plane count. With this change,
driver updates plane count in get-format as well.

CRs-Fixed: 1021026
Change-Id: Id829f07123963584f6c7fe0174e34006d2697aa9
Signed-off-by: Saurabh Kothawade <skothawa@codeaurora.org>
7 years agoclk: qcom: Add support for the turing vote clocks
Taniya Das [Tue, 4 Oct 2016 05:03:29 +0000 (10:33 +0530)]
clk: qcom: Add support for the turing vote clocks

The turing hlos1 and hlos2 vote clocks is required to be enabled before
accessing the turing SMMUs, so add support for the same.

Change-Id: I9e4b0d7cc5f164b207a1a0e2c1ae24bdfd8fa063
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoARM: dts: msm: Add support for GDSCs for MSMFalcon/MSMtriton
Taniya Das [Tue, 4 Oct 2016 05:01:52 +0000 (10:31 +0530)]
ARM: dts: msm: Add support for GDSCs for MSMFalcon/MSMtriton

Support for the GDSCs which are required to be enabled/disabled by clients
on msmfalcon and msmtriton.

Change-Id: I0bad9d7bbee060ef70f3e8e6274fccc86fe9df6e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
7 years agoleds: qpnp-flash-v2: Fix possible NULL pointer dereference
Devesh Jhunjhunwala [Mon, 29 Aug 2016 21:00:12 +0000 (14:00 -0700)]
leds: qpnp-flash-v2: Fix possible NULL pointer dereference

Update the flash_led_brightness_set callback to gracefully handle
invalid led_class device, and being called before driver probe is
complete.

CRs-Fixed: 1060705
Change-Id: Ice714c1fad1d202d05de6ecaf6d1d1ec17a04c15
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
7 years agoASoC: wcd934x: Update DSD register sequence for v1.1
Phani Kumar Uppalapati [Thu, 29 Sep 2016 21:13:52 +0000 (14:13 -0700)]
ASoC: wcd934x: Update DSD register sequence for v1.1

Update DSD playback register sequence for wcd934x
codec version 1.1.

Change-Id: I993273bcf26f8f53f6d9c8cccec5c4b17c8a0e95
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
7 years agoleds: qpnp-flash-v2: Add support for preemptive charger mitigation
Devesh Jhunjhunwala [Wed, 31 Aug 2016 21:53:56 +0000 (14:53 -0700)]
leds: qpnp-flash-v2: Add support for preemptive charger mitigation

Add support to configure and trigger preemptive charger
mitigation in flash driver.

Change-Id: Iec92d2037fcc60446760182c9eda53918e6e094c
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
7 years agoleds: qpnp-flash-v2: Add support for configuring hardware mitigation
Devesh Jhunjhunwala [Wed, 31 Aug 2016 21:16:45 +0000 (14:16 -0700)]
leds: qpnp-flash-v2: Add support for configuring hardware mitigation

Add support to program the ILED_GRT_THRESHOLD register, which
controls the led current threshold beyond which HW automatically
triggers preemptive mitigation.

Change-Id: I3ea14c8c76c4496eeeb11caf63c3ee62f031b157
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
7 years agoASoC: wcd9xxx: Disable external clock buffer when mclk is not in use
Sudheer Papothi [Tue, 11 Oct 2016 19:30:45 +0000 (01:00 +0530)]
ASoC: wcd9xxx: Disable external clock buffer when mclk is not in use

External clock buffer being turned on even when mclk is gated results
in power leakage. Disable external clock buffer when mclk
is not in use.

Change-Id: Iea45a4e8ab4560a093c44800ddd7b1311471c646
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
7 years agomsm: ipa3: fix benign prints on ipa3_usb_init
Skylar Chang [Wed, 28 Sep 2016 22:24:36 +0000 (15:24 -0700)]
msm: ipa3: fix benign prints on ipa3_usb_init

On device bootup, ipa3_usb_init tried to access
IPA3's ipc_logbuf which is not initialized yet.
Therefore seeing those benign prints as "IPA HW
is not supported on this target". The fix is to
not access IPA3's ipc_logbuf on bootup and also
add debug print on ipa_api.c to see which entity
calling IPA3's API before ipa3-driver is probed.

Change-Id: I7aa23eabdf963146ae628eb159eee13a3e2bb935
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
7 years agoASoC: wcd-spi: Initialize local variables before usage
Bhalchandra Gajare [Wed, 12 Oct 2016 22:37:52 +0000 (15:37 -0700)]
ASoC: wcd-spi: Initialize local variables before usage

Initliaze the local variables that are used in functions to return
success or error codes. This fixes possible cases where undefined
error codes are returned.

CRs-Fixed: 1070186
Change-Id: I74bed6cfd9753765b15d17d69ba30f61875e87c8
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
7 years agomisc: qcom: qdsp6v2: Add missing initialization
Haynes Mathew George [Wed, 3 Aug 2016 18:55:07 +0000 (11:55 -0700)]
misc: qcom: qdsp6v2: Add missing initialization

Use vars in driver context after proper initialization

Change-Id: I3e59e27534b8e1088d74b42c72e0075d2fe910e6
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 10495211049615

7 years agoASoC: wcd934x-dsp-cntl: add support for codec restart
Bhalchandra Gajare [Thu, 6 Oct 2016 19:13:57 +0000 (12:13 -0700)]
ASoC: wcd934x-dsp-cntl: add support for codec restart

During subsystem restart, the codec hardware goes through reset. Add
support in the wcd934x dsp controller driver to handle codec reset
and perform necessary reset of the codec dsp.

Change-Id: I9916354c04e24708aced5fc63bc12ddfe87b49f2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
7 years agoqpnp-fg-gen3: add support to configure ki coefficients during discharge
Subbaraman Narayanamurthy [Thu, 6 Oct 2016 02:58:58 +0000 (19:58 -0700)]
qpnp-fg-gen3: add support to configure ki coefficients during discharge

During medium and high discharging scenario, voltage mode
correction needs to be applied so that the battery SOC can
follow closely with the battery voltage. Add support for this
by configuring the ki coefficients for medium and high discharge
current during discharging.

Change-Id: I0a76e9e2f74c40b55e01f9dc106d31a148edefdf
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
7 years agoqpnp-fg-gen3: Add support to hold soc at 100 when charge is full
Subbaraman Narayanamurthy [Mon, 26 Sep 2016 18:12:47 +0000 (11:12 -0700)]
qpnp-fg-gen3: Add support to hold soc at 100 when charge is full

There is a requirement to show battery SOC at 100 when charging
status reaches full as long as the charger is connected and SOC
doesn't drop below automatic recharge threshold. Add support for
this through a device tree property "qcom,hold-soc-while-full".

Also, when charging status reaches full, recharge SOC threshold
need to be adjusted depending on the SOC where termination
happens. This will be more prominent in jeita conditions. Add
support for it.

Change-Id: Icc9536f17eedc3559c9f70dc2a8b73127c78c98a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
7 years agosched: bucketize CPU c-state levels
Joonwoo Park [Fri, 23 Sep 2016 22:49:32 +0000 (15:49 -0700)]
sched: bucketize CPU c-state levels

C-state aware scheduler takes note of wakeup latency of each c-state
level to determine whether to pack or wake up LPM CPU.  But it doesn't
distinguish small and large delta as it's inefficient for scheduler to
do so on its critical path.

Disregard wakeup latencies less than 64 us between different c-state
levels.  This reduces unnecessary task packing.

CRs-fixed: 1074879
Change-Id: Ib0cadbd390d1a0b6da3e39c98010cedb43e5bf60
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
7 years agosched: use wakeup latency as c-state determinant
Joonwoo Park [Fri, 23 Sep 2016 19:55:54 +0000 (12:55 -0700)]
sched: use wakeup latency as c-state determinant

C-state aware scheduler at present, uses a raw c-state index number as
its determinant and avoids task placement on deeper c-state CPUs at
cost of latency.  However there are CPUs offering comparable wake-up
latency at different c-state levels and the wake-up latency at each
c-state levels are already have being fed to scheduler.

Hence use the wakeup_latency as c-state determinant instead of raw
c-state index to avoid unnecessary task packing where it's doable.

CRs-fixed: 1074879
Change-Id: If927f84f6c8ba719716d99669e5d1f1b19aaacbe
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
7 years agodefconfig: msm: Turn on scheduler tuning configs
Syed Rameez Mustafa [Wed, 31 Aug 2016 23:52:29 +0000 (16:52 -0700)]
defconfig: msm: Turn on scheduler tuning configs

These configs are required to enable new tunable functionality in
the scheduler.

Change-Id: I94ef9c913e1d5be2801d553fdc859b80b62e8aa5
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
7 years agosched/tune: Remove redundant checks for NULL css
Syed Rameez Mustafa [Wed, 12 Oct 2016 01:24:43 +0000 (18:24 -0700)]
sched/tune: Remove redundant checks for NULL css

The check for NULL css is redundant as upper layers are already
making sure that css cannot be NULL. Remove this check. It helps
to silence static analysis errors as well.

Change-Id: I64585ff8cceb307904e20ff788e52eb05c000e1f
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
7 years agoiommu/io-pgtable-arm: Use outer shareable for all configurations
Liam Mark [Tue, 4 Oct 2016 20:40:53 +0000 (13:40 -0700)]
iommu/io-pgtable-arm: Use outer shareable for all configurations

Change over to using outer shareable for both coherent and
non-coherent page tables and for both coherent and non-coherent
data buffers.
This is done to be more in line with the ARM spec.

Change-Id: Icebf88641a5ebb82bb4b7577d1ab402580b1460c
Signed-off-by: Liam Mark <lmark@codeaurora.org>
7 years agonet: core: Remove warning for cloned packets in ingress path
Subash Abhinov Kasiviswanathan [Wed, 12 Oct 2016 18:52:59 +0000 (12:52 -0600)]
net: core: Remove warning for cloned packets in ingress path

This reverts commit b97da4469bcf76f ("net: Warn for cloned packets in
ingress path on SMP systems only") and commit e1f88edd76e19ee ("net:
Warn for cloned packets in ingress path"). The path for GRO is well
tested now and cannot receive cloned packets. Loopback packets are
triggering this warning leading to a false positive.

CRs-Fixed: 1077079
Change-Id: I8f36906f508998c6369f30e0eadc1703c70533b9
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
7 years agoASoC: wcd934x: update keeper enable for soundwire functionality
Phani Kumar Uppalapati [Fri, 7 Oct 2016 00:32:22 +0000 (17:32 -0700)]
ASoC: wcd934x: update keeper enable for soundwire functionality

Keeper enable bit is used to reduce the current leakage
from soundwire master. Enable this bit before starting
audio use-case through soundwire and disable once
use-case is completed.

Change-Id: If2dc9e7fd9a2710391d02c0e52a291b3cffc63b6
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
7 years agoicnss: Remove msm_bus bandwidth vote
Yuanyuan Liu [Wed, 12 Oct 2016 00:35:24 +0000 (17:35 -0700)]
icnss: Remove msm_bus bandwidth vote

Remove msm_bus bandwidth vote as WLAN FW will take care of it.

CRs-Fixed: 1075319
Change-Id: I618cc3603df6af18409613209e0373d7e36202fd
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
7 years agoMerge "ARM: dts: msm: Enable System sleep stats for MSM8998"
Linux Build Service Account [Wed, 12 Oct 2016 14:02:02 +0000 (07:02 -0700)]
Merge "ARM: dts: msm: Enable System sleep stats for MSM8998"

7 years agoMerge "ASoC: wcd-dsp-mgr: handle codec down and up events"
Linux Build Service Account [Wed, 12 Oct 2016 14:02:01 +0000 (07:02 -0700)]
Merge "ASoC: wcd-dsp-mgr: handle codec down and up events"

7 years agoMerge "ASoC: wcd-spi: Move one time initializations to component bind"
Linux Build Service Account [Wed, 12 Oct 2016 14:02:00 +0000 (07:02 -0700)]
Merge "ASoC: wcd-spi: Move one time initializations to component bind"

7 years agoMerge "input: misc: add Kconfig and Makefile for pat9125"
Linux Build Service Account [Wed, 12 Oct 2016 14:02:00 +0000 (07:02 -0700)]
Merge "input: misc: add Kconfig and Makefile for pat9125"

7 years agoMerge "diag: Add MSG SSID for DPM"
Linux Build Service Account [Wed, 12 Oct 2016 14:01:59 +0000 (07:01 -0700)]
Merge "diag: Add MSG SSID for DPM"

7 years agoMerge "qpnp-smb2: smb-lib: update reading charge_done property"
Linux Build Service Account [Wed, 12 Oct 2016 14:01:58 +0000 (07:01 -0700)]
Merge "qpnp-smb2: smb-lib: update reading charge_done property"

7 years agoMerge "rpm-smd: Fix memory leak when rpm create request fails"
Linux Build Service Account [Wed, 12 Oct 2016 14:01:57 +0000 (07:01 -0700)]
Merge "rpm-smd: Fix memory leak when rpm create request fails"

7 years agoinput: pat9125: add support of sending rotating switch events
Vevek Venkatesan [Fri, 30 Sep 2016 13:41:54 +0000 (19:11 +0530)]
input: pat9125: add support of sending rotating switch events

Add support of reading the status of the device, parsing it and
sending it to the Input framework using the input APIs.

Change-Id: Iebc3767e9dbcf10a541b8b02f8696da84312447a
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
7 years agoinput: misc: add Kconfig and Makefile for pat9125
Vevek Venkatesan [Wed, 21 Sep 2016 07:02:19 +0000 (12:32 +0530)]
input: misc: add Kconfig and Makefile for pat9125

Add Makefile and Kconfig to build Pixart PAT9125
rotating switch driver.

Change-Id: I5e7bc2ed8dce0b1dde4931e653db4233e90ed1cd
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
7 years agoMerge "msm: vidc: Don't print message queues in error cases"
Linux Build Service Account [Wed, 12 Oct 2016 05:33:05 +0000 (22:33 -0700)]
Merge "msm: vidc: Don't print message queues in error cases"

7 years agoMerge "msm: vidc: Fix the condition to check dcvs support"
Linux Build Service Account [Wed, 12 Oct 2016 05:33:03 +0000 (22:33 -0700)]
Merge "msm: vidc: Fix the condition to check dcvs support"