]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
7 years agoRevert "WIP: drm: msm: add proper hdmi codec driver."
Srinivas Kandagatla [Thu, 9 Jun 2016 15:37:26 +0000 (16:37 +0100)]
Revert "WIP: drm: msm: add proper hdmi codec driver."

This reverts commit 41a0cf65aab96d0d57c2ce84bf522ffde8cfa15d.

7 years agodefconfig: include mainline audio codec in defconfig
Srinivas Kandagatla [Thu, 9 Jun 2016 15:32:37 +0000 (16:32 +0100)]
defconfig: include mainline audio codec in defconfig

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoarm64: dts: sync up with new wcd codec bindings.
Srinivas Kandagatla [Thu, 9 Jun 2016 15:21:06 +0000 (16:21 +0100)]
arm64: dts: sync up with new wcd codec bindings.

This patch sync's up audio dt entries with latest wcd codec bindings.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoASoC: msm8916: Add msm8916-wcd codec driver
Srinivas Kandagatla [Wed, 25 May 2016 22:17:04 +0000 (23:17 +0100)]
ASoC: msm8916: Add msm8916-wcd codec driver

This patch adds support to msm8916-wcd codec.

msm8916-wcd codec is found in Qualcomm msm8916 and apq8016 processors.
This codec IP is split in to two parts(Digital & Analog), Analog part
is integrated in to PMIC PM8916 and the digital part is integrated into
Application processor. Register access to the analog part is done via
SPMI interface to PMIC, and registers on the Application processor are
memory mapped. Data transfer between Analog and Digital Die is done via
a internal bus called PDM.

This codec support includes:
 - 3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary Mic.
 - 2 Digital Microphones.
 - 2 Mic Bias Circuits.
 - Earpiece
 - Headset
 - Loud Speaker.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoASoC: Introduce SOC_SINGLE_S8_TLV() macro
Srinivas Kandagatla [Wed, 25 May 2016 21:57:54 +0000 (22:57 +0100)]
ASoC: Introduce SOC_SINGLE_S8_TLV() macro

This patch introduces SOC_SINGLE_S8_TLV() macro for volume control
on chips which supports both negative and positive gains with sign
bit on a 8 bit register, Gain ranges from -128 to +127 with a
predefined step size.
Currently we only have support to DOUBLE_S8_TLV() which does not fit
for cases where we just have separate gain control register for each
channel.

One of the Qualcomm SOC msm8916 has such gain control register whose gain
range is from -38.4dB to +38.4dB with step size of 0.3dB.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoASoC: msm8916: Add codec Device Tree bindings.
Srinivas Kandagatla [Tue, 16 Feb 2016 17:32:30 +0000 (17:32 +0000)]
ASoC: msm8916: Add codec Device Tree bindings.

This patch adds DT bindings required for msm8916 codec which is
integrated in msm8916 and apq8016 SOCs.

Codec IP is divided into two parts, first analog which is integrated
in pmic pm8916 and secondly digital part which is integrated into
application processor. Codec register controls are also split across
pmic an lpass. Analog part is controlled via spmi bus to pmic, registers
on the Application processor are memory mapped.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoRevert "sound: codec: Add support to msm8x16_wcd codec."
Srinivas Kandagatla [Wed, 8 Jun 2016 16:52:14 +0000 (17:52 +0100)]
Revert "sound: codec: Add support to msm8x16_wcd codec."

This reverts commit d2a8ba448f618be05cd7a05927322df38fed4faa.

7 years agoRevert "Add capture support to msm8x16-wcd codec"
Srinivas Kandagatla [Wed, 8 Jun 2016 16:52:08 +0000 (17:52 +0100)]
Revert "Add capture support to msm8x16-wcd codec"

This reverts commit 822b0d84b73e1913a63ceeeefdede4f661815fef.

7 years agoRevert "ASoC: codec: msm8x16: check return value of msm8x16_wcd_codec_parse_dt"
Srinivas Kandagatla [Wed, 8 Jun 2016 16:52:02 +0000 (17:52 +0100)]
Revert "ASoC: codec: msm8x16: check return value of msm8x16_wcd_codec_parse_dt"

This reverts commit 79ef143c925e5151433fd6dbba7c8d7300e6a511.

7 years agoRevert "ASoC: codec: msm8x16: enable regulators before accessing registers"
Srinivas Kandagatla [Wed, 8 Jun 2016 16:51:52 +0000 (17:51 +0100)]
Revert "ASoC: codec: msm8x16: enable regulators before accessing registers"

This reverts commit 7088059db53c99f5ca57469eb347c78f9f7e8b62.

7 years ago.gitignore: ignore artifacts from make deb-pkg
Nicolas Dechesne [Thu, 23 Jun 2016 15:25:02 +0000 (17:25 +0200)]
.gitignore: ignore artifacts from make deb-pkg

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoMerge branch 'srini/qcomlt-4.4-wcnss-q6v5-sync' into release/qcomlt-4.4
Nicolas Dechesne [Thu, 23 Jun 2016 13:39:23 +0000 (15:39 +0200)]
Merge branch 'srini/qcomlt-4.4-wcnss-q6v5-sync' into release/qcomlt-4.4

7 years agoarm64: dts: fixup SMD RPM CLK names
Nicolas Dechesne [Thu, 23 Jun 2016 13:23:37 +0000 (15:23 +0200)]
arm64: dts: fixup SMD RPM CLK names

SMD RPM CLK names were changed in 564b5c9fdcf3e7752d66a2aba0f813b9ca013262,
compared to the previous version of the patch that we had.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoRevert "tty: serial: msm: Don't reconfigure same baud rate"
Nicolas Dechesne [Thu, 23 Jun 2016 10:30:20 +0000 (12:30 +0200)]
Revert "tty: serial: msm: Don't reconfigure same baud rate"

This reverts commit 3acdf16463fed848d4f87fb827043b27adc79c25.

As it breaks serial console on SD 600 eval and IFC6410.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoARM: dts: sd-600eval: Add regulators for q6 pil
Srinivas Kandagatla [Wed, 22 Jun 2016 13:56:33 +0000 (14:56 +0100)]
ARM: dts: sd-600eval: Add regulators for q6 pil

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoarm64: dts: qcom: msm8916: Use fixed factor xo clock
Georgi Djakov [Thu, 14 Apr 2016 14:34:49 +0000 (17:34 +0300)]
arm64: dts: qcom: msm8916: Use fixed factor xo clock

The rpmcc driver is providing the XO clock, which is the parent of almost
all clocks. But during boot, this driver may probe later and leave most of
the clocks without parent. The common clock framework currently reports
invalid rate for orphan clocks and this may confuse drivers.

To resolve this, use fixed clocks registration until we have some support
to deal with the this issue. Removing the generic rpmcc compatible is
enough to switch back to fixed factor XO clock.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoclk: qcom: Add support for RPM Clocks
Georgi Djakov [Thu, 14 Apr 2016 14:34:48 +0000 (17:34 +0300)]
clk: qcom: Add support for RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_rpm driver to communicate with RPM.
Such platforms are apq8064 and msm8960.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoclk: qcom: Add support for SMD-RPM Clocks
Georgi Djakov [Thu, 14 Apr 2016 14:34:47 +0000 (17:34 +0300)]
clk: qcom: Add support for SMD-RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_smd_rpm driver to communicate with RPM.
Such platforms are msm8916, apq8084 and msm8974.

The RPM is a dedicated hardware engine for managing the shared
SoC resources in order to keep the lowest power profile. It
communicates with other hardware subsystems via shared memory
and accepts clock requests, aggregates the requests and turns
the clocks on/off or scales them on demand.

This driver is based on the codeaurora.org driver:
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-rpm.c

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoRevert "clk: qcom: Add support for SMD-RPM Clocks"
Srinivas Kandagatla [Wed, 22 Jun 2016 13:46:30 +0000 (14:46 +0100)]
Revert "clk: qcom: Add support for SMD-RPM Clocks"

This reverts commit 8f369b2a856d1d26b9bc59c907c992d36f29e0ae.

7 years agoRevert "clk: qcom: Add support for RPM Clocks"
Srinivas Kandagatla [Wed, 22 Jun 2016 13:46:21 +0000 (14:46 +0100)]
Revert "clk: qcom: Add support for RPM Clocks"

This reverts commit 8fd9b240a66f2489d2cbb4e4d9e2a6a13a3726d9.

7 years agoRevert "clk: qcom: Add support for msm8974 RPM-SMD clocks"
Srinivas Kandagatla [Wed, 22 Jun 2016 13:44:39 +0000 (14:44 +0100)]
Revert "clk: qcom: Add support for msm8974 RPM-SMD clocks"

This reverts commit 7d74cab904d0bd65eccbfd4871b4c3b08c91e2c7.

7 years agoRevert "clk: qcom: Add support for apq8084 RPM-SMD clocks"
Srinivas Kandagatla [Wed, 22 Jun 2016 13:44:33 +0000 (14:44 +0100)]
Revert "clk: qcom: Add support for apq8084 RPM-SMD clocks"

This reverts commit 7d8517906b7667e54708b40d1a6483b5bd12313c.

7 years agodrivers: bluetooth: fix btqcomsmd driver compatible name
Nicolas Dechesne [Wed, 22 Jun 2016 16:12:44 +0000 (18:12 +0200)]
drivers: bluetooth: fix btqcomsmd driver compatible name

The binding merged upstream specifies that the compatible should be
qcom,wcnss-bt, so update wherever it's needed.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoARM: dts: sd-600eval: enable mdp
Srinivas Kandagatla [Wed, 22 Jun 2016 11:29:52 +0000 (12:29 +0100)]
ARM: dts: sd-600eval: enable mdp

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoARM: dts: ifc6410: enable q6 dsp node
Srinivas Kandagatla [Wed, 22 Jun 2016 11:29:51 +0000 (12:29 +0100)]
ARM: dts: ifc6410: enable q6 dsp node

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoARM: dts: qcom: rename wcn remoteproc node
Nicolas Dechesne [Wed, 22 Jun 2016 07:47:06 +0000 (09:47 +0200)]
ARM: dts: qcom: rename wcn remoteproc node

Use wcnss@ instead, since this is the name name we use on other boards using WCN
, such as DragonBoard 410c.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoarm: configs: enable BT QCOM SMD
Nicolas Dechesne [Wed, 22 Jun 2016 07:06:40 +0000 (09:06 +0200)]
arm: configs: enable BT QCOM SMD

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoarm: configs: enable WCN36xx driver in qcom_defconfig
Nicolas Dechesne [Tue, 21 Jun 2016 09:36:08 +0000 (11:36 +0200)]
arm: configs: enable WCN36xx driver in qcom_defconfig

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoarm: configs: enable QCOM drivers in qcom_defconfig
Nicolas Dechesne [Tue, 21 Jun 2016 08:50:58 +0000 (11:50 +0300)]
arm: configs: enable QCOM drivers in qcom_defconfig

* all remoteproc drivers
* mainline implementation for SMS and SMP2P

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoremoteproc: set MBA_FIRMWARE_NAME to mba.mbn
Nicolas Dechesne [Thu, 9 Jun 2016 08:57:09 +0000 (10:57 +0200)]
remoteproc: set MBA_FIRMWARE_NAME to mba.mbn

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoremoteproc: qcom: Merge cleanup and fixup from the future
Bjorn Andersson [Fri, 17 Jun 2016 04:08:17 +0000 (21:08 -0700)]
remoteproc: qcom: Merge cleanup and fixup from the future

This incorporates cleanups done in preparation for mainline submission;
halt regs comes from the tcsr syscon, the mdt loader uses
rproc_da_to_va() to simplify the api, supplies are handled, requesting
stop is implemented and a few minor cleanups of the DT binding.

Also included is a fix for an issue triggered by the latest DB410c
firmware, where using the mpss_region for verification of the mdt header
results in a timeout on verifying the rest of the modem firmware.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agogpio: Drop smp2p and smsm implementations
Bjorn Andersson [Thu, 9 Jun 2016 05:51:04 +0000 (22:51 -0700)]
gpio: Drop smp2p and smsm implementations

The smem state implementations where rejected by the GPIO maintainer and
has been superseeded. Remove these old and rejected implementations.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoRevert "soc: qcom: Stub IPCRTR client driver"
Bjorn Andersson [Tue, 7 Jun 2016 00:01:02 +0000 (17:01 -0700)]
Revert "soc: qcom: Stub IPCRTR client driver"

This reverts commit 38f515b2f0ee21b27bed1fd36f6710c1ef907765.

QRTR has been backported, so we don't need to keep this stub driver.

7 years agoARM64: dts: qcom: msm8916: Drop depricated smem state nodes
Bjorn Andersson [Thu, 9 Jun 2016 05:48:39 +0000 (22:48 -0700)]
ARM64: dts: qcom: msm8916: Drop depricated smem state nodes

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM64: dts: qcom: msm8916: Update wcnss nodes
Bjorn Andersson [Thu, 9 Jun 2016 05:47:52 +0000 (22:47 -0700)]
ARM64: dts: qcom: msm8916: Update wcnss nodes

The WCNSS remoteproc and hw blocks have updated bindings, so update the
dts.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM64: dts: qcom: msm8916: Clean up Hexagon PIL node
Bjorn Andersson [Thu, 9 Jun 2016 05:47:12 +0000 (22:47 -0700)]
ARM64: dts: qcom: msm8916: Clean up Hexagon PIL node

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM64: dts: msm8916: Add smsm and smp2p nodes
Bjorn Andersson [Wed, 24 Feb 2016 23:12:06 +0000 (15:12 -0800)]
ARM64: dts: msm8916: Add smsm and smp2p nodes

This patch adds the smsm and smp2p nodes for the hexagon and wcnss
cores.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: qcom: apq8064: Update to match latest bindings
Bjorn Andersson [Tue, 7 Jun 2016 16:29:29 +0000 (09:29 -0700)]
ARM: dts: qcom: apq8064: Update to match latest bindings

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: qcom: db600c: Enable wcnss
Bjorn Andersson [Tue, 7 Jun 2016 16:29:03 +0000 (09:29 -0700)]
ARM: dts: qcom: db600c: Enable wcnss

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: qcom: db600c: Enable wcnss
Bjorn Andersson [Tue, 7 Jun 2016 04:56:48 +0000 (21:56 -0700)]
ARM: dts: qcom: db600c: Enable wcnss

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: apq8064: Add wcnss wifi and bt nodes
Bjorn Andersson [Mon, 29 Feb 2016 19:40:52 +0000 (11:40 -0800)]
ARM: dts: apq8064: Add wcnss wifi and bt nodes

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: apq8064: Add wcnss memory and remoteproc nodes
Bjorn Andersson [Mon, 29 Feb 2016 19:38:49 +0000 (11:38 -0800)]
ARM: dts: apq8064: Add wcnss memory and remoteproc nodes

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM: dts: qcom: apq8064: Add smd node and all edges
Bjorn Andersson [Tue, 29 Mar 2016 03:37:04 +0000 (20:37 -0700)]
ARM: dts: qcom: apq8064: Add smd node and all edges

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
(cherry picked from commit 2afc5287c50e013c46e07413c066920dc7f55a91)

7 years agoARM: dts: qcom: apq8064: Add complete smsm node
Bjorn Andersson [Tue, 29 Mar 2016 03:37:03 +0000 (20:37 -0700)]
ARM: dts: qcom: apq8064: Add complete smsm node

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
(cherry picked from commit b4d4582fa6959ee494b2146522f1edd72ba6218d)

7 years agoARM: dts: qcom: apq8064: Add syscon for sic-non-secure
Bjorn Andersson [Tue, 29 Mar 2016 03:37:02 +0000 (20:37 -0700)]
ARM: dts: qcom: apq8064: Add syscon for sic-non-secure

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
(cherry picked from commit b9e4c5e6ee26a906fa8514467b5abb9655c3ffdc)

7 years agoremoteproc: qcom: Driver for the self-authenticating Hexagon v5
Bjorn Andersson [Mon, 5 Jan 2015 18:10:08 +0000 (10:10 -0800)]
remoteproc: qcom: Driver for the self-authenticating Hexagon v5

This initial hack powers the q6v5, boots and authenticate the mba and
use that to load the mdt and subsequent bXX files.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agofirmware: qcom-scm: Expose mss_restart through a reset-controller
Bjorn Andersson [Thu, 9 Jun 2016 05:24:16 +0000 (22:24 -0700)]
firmware: qcom-scm: Expose mss_restart through a reset-controller

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agomac80211: Make addr const in SET_IEEE80211_PERM_ADDR()
Bjorn Andersson [Thu, 24 Dec 2015 08:33:26 +0000 (00:33 -0800)]
mac80211: Make addr const in SET_IEEE80211_PERM_ADDR()

Make the addr parameter const in SET_IEEE80211_PERM_ADDR() to save
clients from having to cast away a const qualifier.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agowcn36xx: Disable power save
Bjorn Andersson [Mon, 11 Jan 2016 18:33:27 +0000 (10:33 -0800)]
wcn36xx: Disable power save

Enabling power save results in extremely long ping times and stalling
transfers. So disable it for not until we can figure out how to work
around this.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agowcn36xx: Replace with latest development version
Bjorn Andersson [Tue, 7 Jun 2016 04:59:29 +0000 (21:59 -0700)]
wcn36xx: Replace with latest development version

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components
Bjorn Andersson [Thu, 25 Feb 2016 16:09:15 +0000 (08:09 -0800)]
soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components

We need the signal from wcnss_ctrl indicating that the firmware is up
and running before we can communicate with the other components of the
chip. So make these other components children of the wcnss_ctrl device,
so they can be probed in order.

The process seems to take between 1/2-5 seconds, so this is done in a
worker, instead of holding up the probe.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoqrtr: smd: Return to new SMD api
Bjorn Andersson [Tue, 7 Jun 2016 04:52:46 +0000 (21:52 -0700)]
qrtr: smd: Return to new SMD api

Fixes: d9552842afd7 ("net: Add Qualcomm IPC router")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosound: qcom: qdsp6: apr: Clean up SMD integration
Bjorn Andersson [Tue, 7 Jun 2016 04:50:54 +0000 (21:50 -0700)]
sound: qcom: qdsp6: apr: Clean up SMD integration

When the SMD driver probes the channel is up, so we don't need to query
the internals of the qcom_smd_channel for this information.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoBluetooth: Introduce Qualcomm WCNSS SMD based HCI driver
Bjorn Andersson [Wed, 30 Sep 2015 22:31:13 +0000 (15:31 -0700)]
Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver

The Qualcomm WCNSS chip provides two SMD channels to the BT core; one
for command and one for event packets. This driver exposes the two
channels as a hci device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: smd: Squash away the last differences from v4.7-rc1
Bjorn Andersson [Tue, 7 Jun 2016 03:52:09 +0000 (20:52 -0700)]
soc: qcom: smd: Squash away the last differences from v4.7-rc1

This merges awy the last differences between the 4.4 release branch and
v4.7-rc1.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: smd: Make callback pass channel reference
Bjorn Andersson [Tue, 29 Mar 2016 04:35:22 +0000 (21:35 -0700)]
soc: qcom: smd: Make callback pass channel reference

By passing the smd channel reference to the callback, rather than the
smd device, we can open additional smd channels from sub-devices of smd
devices.

Also updates the two smd clients today found in mainline.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
(cherry picked from commit b853cb9628bfbcc4017da46d5f5b46e3eba9d8c6)

7 years agoarm64: configs: switch to mainline implementation of QCOM SMSM and SMP2P
Nicolas Dechesne [Fri, 22 Apr 2016 08:34:20 +0000 (10:34 +0200)]
arm64: configs: switch to mainline implementation of QCOM SMSM and SMP2P

The current release branch include both the old and the upstream implementation
of these drivers, let's switch to mainline.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoarm64: configs: enable QCOM_WCNSS PIL and CRTL
Nicolas Dechesne [Fri, 22 Apr 2016 07:51:51 +0000 (09:51 +0200)]
arm64: configs: enable QCOM_WCNSS PIL and CRTL

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agowcn36xx: Clean up platform integration
Bjorn Andersson [Wed, 20 Apr 2016 03:54:42 +0000 (20:54 -0700)]
wcn36xx: Clean up platform integration

With the introduction of the upstream wcnss remoteproc driver we do iris
xo calibration before we boot the wcnss - as it should have been done
from the beginning.

This patch cleans out the iris xo calibration code and simplifies the
platform integration implementation.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: wcnss_ctrl: Expose the cbc status to others
Bjorn Andersson [Wed, 20 Apr 2016 04:04:15 +0000 (21:04 -0700)]
soc: qcom: wcnss_ctrl: Expose the cbc status to others

The prima driver needs a way to wait for the wcnss firmware to become
available, it does this by repeatedly querying the wcnss control driver
if we've reached cbc (cold boot completed).

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoARM64: dts: qcom: Update wcnss nodes
Bjorn Andersson [Wed, 20 Apr 2016 03:51:52 +0000 (20:51 -0700)]
ARM64: dts: qcom: Update wcnss nodes

Update the wcnss nodes to match the new bindings.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoremoteproc: qcom-tz: Use new PAS api
Bjorn Andersson [Wed, 20 Apr 2016 01:44:11 +0000 (18:44 -0700)]
remoteproc: qcom-tz: Use new PAS api

The PAS api should not carry the clients device handle, as the metadata
allocated should be tied to the scm platform_device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoqcom-scm: Align PAS api with "upstream" implementation
Bjorn Andersson [Wed, 20 Apr 2016 01:42:10 +0000 (18:42 -0700)]
qcom-scm: Align PAS api with "upstream" implementation

This aligns the PAS implementation with the patches heading upstream,
in particular tying the dma allocation in pas_init_image to the scm
platform_device rather then the caller.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components
Bjorn Andersson [Thu, 25 Feb 2016 16:09:15 +0000 (08:09 -0800)]
soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components

This is a hacked up version of the patch sent to LKML, as I don't want
to change the smd API in the release branch.

We need the signal from wcnss_ctrl indicating that the firmware is up
and running before we can communicate with the other components of the
chip. So make these other components children of the wcnss_ctrl device,
so they can be probed in order.

The process seems to take between 1/2-5 seconds, so this is done in a
worker, instead of holding up the probe.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agosoc: qcom: smem: Use write-combine remap for SMEM
Bjorn Andersson [Wed, 9 Mar 2016 11:23:23 +0000 (18:23 +0700)]
soc: qcom: smem: Use write-combine remap for SMEM

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoremoteproc: qcom: Introduce WCNSS peripheral image loader
Bjorn Andersson [Sun, 13 Sep 2015 00:31:17 +0000 (17:31 -0700)]
remoteproc: qcom: Introduce WCNSS peripheral image loader

This introduces the peripheral image loader, for loading WCNSS firmware
and boot the core on e.g. MSM8974. The firmware is verified and booted
with the help of the Peripheral Authentication System (PAS) in
TrustZone.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoremoteproc: debugfs: Add ability to boot remote processor using debugfs
Lee Jones [Tue, 12 Jan 2016 12:46:17 +0000 (12:46 +0000)]
remoteproc: debugfs: Add ability to boot remote processor using debugfs

This functionality is especially useful during the testing phase.  When
used in conjunction with Mailbox's Test Framework we can trivially conduct
end-to-end testing i.e. boot co-processor, send and receive messages to
the co-processor, then shut it down again (repeat as required).

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoMerge branch 'sdcard-4.4' into release/qcomlt-4.4
Nicolas Dechesne [Fri, 17 Jun 2016 10:11:44 +0000 (13:11 +0300)]
Merge branch 'sdcard-4.4' into release/qcomlt-4.4

7 years agotty: serial: msm: Don't reconfigure same baud rate
Bjorn Andersson [Thu, 16 Jun 2016 18:24:35 +0000 (11:24 -0700)]
tty: serial: msm: Don't reconfigure same baud rate

msm_set_termios() is called whenever the tty is opened. Setting the baud
rate requires a full reset of the msm serial block, even when the rate
is unchanged. In the case when the same uart is used as console this
reset will discard any console output data still being clocked out of
the TX fifo.

By skipping the rate-change in the case where the baud rate is unchanged
since last request we can avoid the reset and the discarding of the
data.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoregulator: qcom_smd: add regulator ops for pm8941 lnldo
Srinivas Kandagatla [Fri, 3 Jun 2016 11:23:09 +0000 (12:23 +0100)]
regulator: qcom_smd: add regulator ops for pm8941 lnldo

After "regulator: qcom_smd: add list_voltage callback" patch adding
pm8941 lnldo regulators would bug on list_voltages as it is a fixed
regulator without any linear range.
This patch fixes that issue by adding dedicated ops for pm8941 lnldo
without list_voltages callback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoregulator: qcom_smd: add list_voltage callback
Srinivas Kandagatla [Thu, 2 Jun 2016 10:23:15 +0000 (11:23 +0100)]
regulator: qcom_smd: add list_voltage callback

This patch adds support to list_voltage callback, so that consumers
like mmc core, can get information of supported voltage range.

Without this patch there is no way for mmc core to know this voltage range.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agommc: sdhci-msm: Add support for UHS cards
Georgi Djakov [Fri, 10 Jun 2016 12:00:50 +0000 (15:00 +0300)]
mmc: sdhci-msm: Add support for UHS cards

Enabling support for ultra high speed mode cards requires some
voltage switching and interaction with the PMIC via a special
power IRQ. Add support for this.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agommc: sdhci-msm: use sdhci_pltfm_init for private allocation
Jisheng Zhang [Tue, 16 Feb 2016 13:08:22 +0000 (21:08 +0800)]
mmc: sdhci-msm: use sdhci_pltfm_init for private allocation

Commit 0e748234293f ("mmc: sdhci: Add size for caller in init+register")
allows users of sdhci_pltfm to allocate private space in calls to
sdhci_pltfm_init+sdhci_pltfm_register. This patch migrates sdhci-msm
to this allocation.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agommc: sdhci-msm: factorise sdhci_msm_pdata outisde of sdhci_msm_host
Jisheng Zhang [Tue, 16 Feb 2016 13:08:21 +0000 (21:08 +0800)]
mmc: sdhci-msm: factorise sdhci_msm_pdata outisde of sdhci_msm_host

There's no need to allocate one sdhci_msm_pdata for each sdhci_msm_host.
This patch removes the sdhci_msm_pdata member from sdhci_msm_host and
uses one static global sdhci_msm_pdata for all sdhci msm hosts. It also
marks sdhci_msm_ops as const.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
7 years agoARM: dts: sd_600eval: Fix eMMC lockup issue
Parth Pancholi [Fri, 10 Jun 2016 18:19:55 +0000 (19:19 +0100)]
ARM: dts: sd_600eval: Fix eMMC lockup issue

This board locks up if we stress test the eMMC, as the regulator s4 is
unable to supply enough current for all the peripherials attached to it.
As this supply is wired up to most of the peripherials including DDR,
it resulted in such lockup.

This patch fixes this issue by setting s4 regulator correctly with
Auto power mode.

Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
[Srinivas Kandagatla: rewrote the change log]
Tested-by: Girish Sharma <girish.sharma@einfochips.com>
Signed-off-by: Parth Pancholi <parth.pancholi@einfochips.com>
7 years agoARM: dts: apq8064: rename db600c to SD_600eval
Srinivas Kandagatla [Fri, 10 Jun 2016 18:19:54 +0000 (19:19 +0100)]
ARM: dts: apq8064: rename db600c to SD_600eval

This board has been renamed recently and announced at
https://eragon.einfochips.com/products/sd-600eval.html

So rename this board files so that it reflects actual product in market.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
7 years agoarm64: configs: enable QCOM GPS PROXY
Nicolas Dechesne [Fri, 3 Jun 2016 09:46:57 +0000 (11:46 +0200)]
arm64: configs: enable QCOM GPS PROXY

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoARM64: dts: qcom: Introduce rmtfs memory region
Bjorn Andersson [Wed, 20 Apr 2016 03:58:26 +0000 (20:58 -0700)]
ARM64: dts: qcom: Introduce rmtfs memory region

The rmtfs memory region is used as shared memory for exchanging blocks
of data read and written to persistent flash storage by the modem.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agoAdd GPS Proxy Driver
Anna Hanna Sedlak Grinbaum [Sun, 10 Apr 2016 06:28:15 +0000 (09:28 +0300)]
Add GPS Proxy Driver

The GPS Proxy Driver is a layer connecting between user space application and
GPSD service.

Change-Id: I8e4dd855839a1d9bc0b8f7431063fc200f8c2ebb
Signed-off-by: Anna Hanna Sedlak Grinbaum <asedla@codeaurora.org>
7 years agoarm64: configs: enable QCOM QRTR
Nicolas Dechesne [Wed, 1 Jun 2016 16:52:56 +0000 (18:52 +0200)]
arm64: configs: enable QCOM QRTR

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agonet: qrtr: fix build problems
Arnd Bergmann [Fri, 13 May 2016 13:09:58 +0000 (15:09 +0200)]
net: qrtr: fix build problems

Having multiple loadable modules with the same name cannot work
with modprobe, and having both net/qrtr/smd.ko and drivers/soc/qcom/smd.ko
results in a (somewhat cryptic) build error:

ERROR: "qcom_smd_driver_unregister" [net/qrtr/smd.ko] undefined!
ERROR: "qcom_smd_driver_register" [net/qrtr/smd.ko] undefined!
ERROR: "qcom_smd_set_drvdata" [net/qrtr/smd.ko] undefined!
ERROR: "qcom_smd_send" [net/qrtr/smd.ko] undefined!
ERROR: "qcom_smd_get_drvdata" [net/qrtr/smd.ko] undefined!
ERROR: "qcom_smd_driver_unregister" [drivers/soc/qcom/wcnss_ctrl.ko] undefined!
ERROR: "qcom_smd_driver_register" [drivers/soc/qcom/wcnss_ctrl.ko] undefined!
ERROR: "qcom_smd_set_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined!
ERROR: "qcom_smd_send" [drivers/soc/qcom/wcnss_ctrl.ko] undefined!
ERROR: "qcom_smd_get_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined!

Also, the qrtr driver uses the SMD interface and has a Kconfig dependency,
but also allows for compile-testing when SMD is disabled. However, if
with QCOM_SMD=m and COMPILE_TEST=y we can end up with QRTR_SMD=y and
that fails with a related link error.

The changes the dependency so we can still compile-test the driver but
not have it built-in if SMD is a module, to avoid running in the broken
configuration, and changes the Makefile to provide the driver under
a different module name.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: bdabad3e363d ("net: Add Qualcomm IPC router")
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agonet: Add Qualcomm IPC router
Courtney Cavin [Fri, 6 May 2016 14:09:08 +0000 (07:09 -0700)]
net: Add Qualcomm IPC router

Add an implementation of Qualcomm's IPC router protocol, used to
communicate with service providing remote processors.

Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[bjorn: Cope with 0 being a valid node id and implement RTM_NEWADDR]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agokcm: Kernel Connection Multiplexor module
Tom Herbert [Mon, 7 Mar 2016 22:11:06 +0000 (14:11 -0800)]
kcm: Kernel Connection Multiplexor module

This module implements the Kernel Connection Multiplexor.

Kernel Connection Multiplexor (KCM) is a facility that provides a
message based interface over TCP for generic application protocols.
With KCM an application can efficiently send and receive application
protocol messages over TCP using datagram sockets.

For more information see the included Documentation/networking/kcm.txt

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7 years agotty: serial: msm: Don't read off end of tx fifo
Bjorn Andersson [Fri, 3 Jun 2016 00:48:28 +0000 (17:48 -0700)]
tty: serial: msm: Don't read off end of tx fifo

For dm uarts in pio mode tx data is transferred to the fifo register 4
bytes at a time, but care is not taken when these 4 bytes spans the end
of the xmit buffer so the loop might read up to 3 bytes past the buffer
and then skip the actual data at the beginning of the buffer.

Fix this by, analogous to the DMA case, make sure the chunk doesn't
wrap the xmit buffer.

Fixes: 3a878c430fd6 ("tty: serial: msm: Add TX DMA support")
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Ivan Ivanov <iivanov.xz@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: stable@vger.kernel.org
Reported-by: Frank Rowand <frowand.list@gmail.com>
Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
7 years agodrm/msm/mdp: Add support for more RGBX formats
Rob Herring [Mon, 11 Apr 2016 23:23:51 +0000 (18:23 -0500)]
drm/msm/mdp: Add support for more RGBX formats

Android needs XBGR8888 format. Add all the missing 32-bpp formats
without alpha for completeness.

Cc: Archit Taneja <architt@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agoARM: dts: apq8064: Remove duplicate thermal-zones
Georgi Djakov [Thu, 5 May 2016 11:15:36 +0000 (14:15 +0300)]
ARM: dts: apq8064: Remove duplicate thermal-zones

Remove the duplicate thermal-zones.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
7 years agoarm: configs: remove USB_GADGET_DEBUG
Nicolas Dechesne [Fri, 27 May 2016 14:51:16 +0000 (16:51 +0200)]
arm: configs: remove USB_GADGET_DEBUG

In the previous commit we moved DEBUG options into a specific debug config file,
this is a left over.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agoconfigs: move DEBUG configs in their own config file
Nicolas Dechesne [Fri, 27 May 2016 13:52:25 +0000 (15:52 +0200)]
configs: move DEBUG configs in their own config file

* remove DEBUG options from distro.config and defconfig since some of them had
  some drastic impact on system performance
* add debug.config which can be convenient to build a debug flavor of the
  kernel:
  make defconfig distro.config debug.config

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
7 years agospi: qup: Fix DMA mode to work correctly
Andy Gross [Tue, 2 Feb 2016 23:00:53 +0000 (17:00 -0600)]
spi: qup: Fix DMA mode to work correctly

This patch fixes a few issues with the DMA mode.  The QUP needs to be
placed in the run mode before the DMA transactions are executed.  The
conditions for being able to DMA vary between revisions of the QUP.
This is due to v1.1.1 using ADM DMA and later revisions using BAM.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
7 years agospi: qup: Fix transaction done signaling
Andy Gross [Sat, 30 Jan 2016 04:06:50 +0000 (22:06 -0600)]
spi: qup: Fix transaction done signaling

Wait to signal done until we get all of the interrupts we are expecting
to get for a transaction.  If we don't wait for the input done flag, we
can be inbetween transactions when the done flag comes in and this can
mess up the next transaction.

CC: Grant Grundler <grundler@chromium.org>
CC: Sarthak Kukreti <skukreti@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
7 years agoMerge tag 'v4.4.9' into release/qcomlt-4.4
Nicolas Dechesne [Tue, 17 May 2016 12:47:16 +0000 (14:47 +0200)]
Merge tag 'v4.4.9' into release/qcomlt-4.4

This is the 4.4.9 stable release

7 years agoLinux 4.4.9
Greg Kroah-Hartman [Wed, 4 May 2016 21:50:15 +0000 (14:50 -0700)]
Linux 4.4.9

7 years agoextcon: max77843: Use correct size for reading the interrupt register
Dan Carpenter [Thu, 4 Feb 2016 11:36:09 +0000 (14:36 +0300)]
extcon: max77843: Use correct size for reading the interrupt register

commit c4924e92442d7218bd725e47fa3988c73aae84c9 upstream.

The info->status[] array has 3 elements.  We are using size
MAX77843_MUIC_IRQ_NUM (16) instead of MAX77843_MUIC_STATUS_NUM (3) as
intended.

Fixes: 135d9f7d135a ('extcon: max77843: Clear IRQ bits state before request IRQ')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
[cw00.choi: Modify the patch title]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostm class: Select CONFIG_SRCU
Arnd Bergmann [Tue, 22 Dec 2015 15:25:17 +0000 (17:25 +0200)]
stm class: Select CONFIG_SRCU

commit 042d4460b5b4379a12f375045ff9065cf6758735 upstream.

The newly added STM code uses SRCU, but does not ensure that
this code is part of the kernel:

drivers/built-in.o: In function `stm_source_link_show':
include/linux/srcu.h:221: undefined reference to `__srcu_read_lock'
include/linux/srcu.h:238: undefined reference to `__srcu_read_unlock'
drivers/built-in.o: In function `stm_source_link_drop':
include/linux/srcu.h:221: undefined reference to `__srcu_read_lock'
include/linux/srcu.h:238: undefined reference to `__srcu_read_unlock'

This adds a Kconfig 'select' statement like all the other SRCU using
drivers have.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices")
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agomegaraid_sas: add missing curly braces in ioctl handler
Arnd Bergmann [Mon, 14 Mar 2016 14:29:45 +0000 (15:29 +0100)]
megaraid_sas: add missing curly braces in ioctl handler

commit 3deb9438d34a09f6796639b652a01d110aca9f75 upstream.

gcc-6 found a dubious indentation in the megasas_mgmt_fw_ioctl
function:

drivers/scsi/megaraid/megaraid_sas_base.c: In function 'megasas_mgmt_fw_ioctl':
drivers/scsi/megaraid/megaraid_sas_base.c:6658:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
    kbuff_arr[i] = NULL;
    ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:6653:3: note: ...this 'if' clause, but it is not
   if (kbuff_arr[i])
   ^~

The code is actually correct, as there is no downside in clearing a NULL
pointer again.

This clarifies the code and avoids the warning by adding extra curly
braces.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 90dc9d98f01b ("megaraid_sas : MFI MPT linked list corruption fix")
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agosunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race
NeilBrown [Fri, 4 Mar 2016 06:20:13 +0000 (17:20 +1100)]
sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race

commit a6ab1e8126d205238defbb55d23661a3a5c6a0d8 upstream.

sunrpc_cache_pipe_upcall() can detect a race if CACHE_PENDING is no longer
set.  In this case it aborts the queuing of the upcall.
However it has already taken a new counted reference on "h" and
doesn't "put" it, even though it frees the data structure holding the reference.

So let's delay the "cache_get" until we know we need it.

Fixes: f9e1aedc6c79 ("sunrpc/cache: remove races with queuing an upcall.")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agothermal: rockchip: fix a impossible condition caused by the warning
Caesar Wang [Mon, 15 Feb 2016 07:33:28 +0000 (15:33 +0800)]
thermal: rockchip: fix a impossible condition caused by the warning

commit 43b4eb9fe719b107c8e5d49d1edbff0c135a42cb upstream.

As the Dan report the smatch check the thermal driver warning:
drivers/thermal/rockchip_thermal.c:551 rockchip_configure_from_dt()
warn: impossible condition '(thermal->tshut_temp > ((~0 >> 1))) =>
(s32min-s32max > s32max)'

Although The shut_temp read from DT is u32,the temperature is currently
represented as int not long in the thermal driver.
Let's change to make shut_temp instead of the thermal->tshut_temp for
the condition.

Fixes: commit 437df2172e8d
("thermal: rockchip: consistently use int for temperatures")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agounbreak allmodconfig KCONFIG_ALLCONFIG=...
Al Viro [Thu, 14 Jan 2016 18:13:49 +0000 (18:13 +0000)]
unbreak allmodconfig KCONFIG_ALLCONFIG=...

commit 6b87b70c5339f30e3c5b32085e69625906513dc2 upstream.

Prior to 3.13 make allmodconfig KCONFIG_ALLCONFIG=/dev/null used
to be equivalent to make allmodconfig; these days it hardwires MODULES to n.
In fact, any KCONFIG_ALLCONFIG that doesn't set MODULES explicitly is
treated as if it set it to n.

Regression had been introduced by commit cfa98f ("kconfig: do not
override symbols already set"); what happens is that conf_read_simple()
does sym_calc_value(modules_sym) on exit, which leaves SYMBOL_VALID set and
has conf_set_all_new_symbols() skip modules_sym.

It's pretty easy to fix - simply move that call of sym_calc_value()
into the callers, except for the ones in KCONFIG_ALLCONFIG handling.
Objections?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Fixes: cfa98f2e0ae9 ("kconfig: do not override symbols already set")
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agojme: Fix device PM wakeup API usage
Guo-Fu Tseng [Sat, 5 Mar 2016 00:11:56 +0000 (08:11 +0800)]
jme: Fix device PM wakeup API usage

commit 81422e672f8181d7ad1ee6c60c723aac649f538f upstream.

According to Documentation/power/devices.txt

The driver should not use device_set_wakeup_enable() which is the policy
for user to decide.

Using device_init_wakeup() to initialize dev->power.should_wakeup and
dev->power.can_wakeup on driver initialization.

And use device_may_wakeup() on suspend to decide if WoL function should
be enabled on NIC.

Reported-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agojme: Do not enable NIC WoL functions on S0
Guo-Fu Tseng [Sat, 5 Mar 2016 00:11:55 +0000 (08:11 +0800)]
jme: Do not enable NIC WoL functions on S0

commit 0772a99b818079e628a1da122ac7ee023faed83e upstream.

Otherwise it might be back on resume right after going to suspend in
some hardware.

Reported-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>