On MSMCOBALT, the votable GDSCs might take longer to enable/disable
depending on a number of factors including if another entity outside
of HLOS tried disabling the GDSC at the same time that HLOS tried to
enable it. Add a higher polling timeout to accommodate this.
In addition, add flags to branch clocks which might be controlled via
the voting registers so that the driver does not print out a warning
if these clocks do not turn off even after removing the SW vote.
CRs-Fixed: 1027807
Change-Id: I044ca5209c364d4bfb4f3bd504cdcb87021fd010
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add codec reset gpio device tree node for msmcobalt target
specifying active and sleep pinctrl states.
CRs-fixed: 1028800
Change-Id: Id2625cd71b4c204ce10bc6dd007939834d2b9e10
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
If usb_ep_queue() fails on queueing zero-length packet, driver is not
decrementing dpkts_tolaptop_pending counter which may results into seeing
count mismatch. Hence decrement dpkts_tolaptop_pending if zero length
packet queueing fails.
CRs-Fixed: 1027031
Change-Id: Id3c7c2627bdf37524067512db51d3180c570106d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Currently driver is reading and logging usage count of gadget
device but it is required to use usage count of gadget's parent
device which is used to prevent USB controller's low power mode.
Hence fix reporting of USB devices' usage count.
Also mark sm_state to initialized and remove queueing of
ipa_usb_wq as ipa_work_handler() is running without USB gadget
is initialized i.e. gadget is NULL.
CRs-Fixed: 1021499
Change-Id: Ia64afa3adb769674f6a9a60fde2c7397b7e4fe49
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
When smd_trans is registered at bootup and the transport
field is null, glink_pkt gets a link up notification early.
Use the requested transport to register for the link up
notification of the edge.
CRs-Fixed: 1028203
Change-Id: I8f549a48efe19f66e3a336a21b75903f7800ed86
Signed-off-by: Chris Lew <clew@codeaurora.org>
Remove the no-map and shared-dma-pool properties for dynamic fps
memory node. The DSI PLL driver allocates virtual memory space to
ioremap the reserved memory pages to it. The DSI PLL codes are
then copied from this virtual memory.
Change-Id: If65b653137b5c0f69fb66d77389bd71e6c3a0259
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
DSI controller requests for PM_QOS while sending DCS commands, so
that CPU does not go to idle state until DCS command transfer is
finished. But this request can come independently from multiple
clients such as different DSI controllers. So this change adds
ref count based PM_QOS request to avoid warning for multiple QOS
add request and unwanted results, if one client removes the request
while the other clients still need it.
Change-Id: If3ca0161923fcd73fdde77984aa5d80bfaec79a1
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Camera daemon process is moving to mediaserver
process. MCT will send contol command
to indicate camera daemon is present or not.
For backward compatibility, add check
so kernel can support camera daemon present
and camera daemon not present.
Change-Id: Ia9e45f539bd5ec0d2edfe9bfb90942d88b6d30da
Signed-off-by: Jignesh Mehta <jigneshm@codeaurora.org>
Clearing Non uC interrupts before processing will
result in clearing interrupt data.
Change-Id: I47ea7c22250264da206e1fb8691e77224c825ab0
CRs-Fixed: 1008549
Signed-off-by: sunil paidimarri <hisunil@codeaurora.org>
We have scripts which write to certain fields on 3.18 kernels but
this seems to be failing on 4.4 kernels.
An entry which we write to here is xfrm_aevent_rseqth which is u32.
echo 4294967295 > /proc/sys/net/core/xfrm_aevent_rseqth
Commit 230633d109 ("kernel/sysctl.c:
detect overflows when converting to int") prevented writing to
sysctl entries when integer overflow occurs. However, this does not
apply to unsigned integers.
u32 should be able to hold 4294967295 here, however it fails due to
this check.
static int do_proc_dointvec_conv(bool *negp, unsigned long *lvalp,
if (*lvalp > (unsigned long) INT_MAX)
return -EINVAL;
Fix this for now by reverting this commit till a solution is
finalized upstream.
CRs-Fixed: 1026507
Change-Id: I4fae5f442e4cc2c2414a69e960d42c05c3062415
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
generalise ARCH_QCOM platform to support new 32-bit
qcom platforms.
Change-Id: I412a83a2f756b02d6b521983501de780835dc118
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
The boot/dts/Makefile and boot/dts/*/Makefile provide DTB_LIST which is
equal to dtb-y when CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y.
Include these Makefiles to build dtbs for dtb appended zImage.
Change-Id: Ib8218135dc923d1ba4098d74dbd7da159368a188
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[abhimany: resolve trivial merge conflict]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[sramana: Fixed merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Add the dts files to the compilation target when compiling
for arm.
Change-Id: I3146989f6e73bfe101ac9363428bd0beecd09c32
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
readb and writeb relaxed_no_log variants are required for upcoming
memcpy_to/from_io optimization for the arm32.
Change-Id: I80bac808f2916e49a77be24e7a39d0839165d306
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
This is a snapshot of the 64-bit IO accessor support as of msm-3.10
commit
'commit acdce027751d5a7 ("Merge defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")'
Change-Id: Idc857357a87ba91cdb7a69deeaf05aa8d5d13628
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[sramana: fixed merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Improve power performance by enabling L1 substates for
PCIe on msmcobalt.
Change-Id: I69b1839d1afe8f65235e5c47f0d55abe75acb6a8
Signed-off-by: Tony Truong <truong@codeaurora.org>
Add the device tree files necessary to support the APQCOBALT.
CRs-Fixed: 1026738
Change-Id: If440e1ef4bdbcc73ac7a0569a6bbf093db8aefef
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Add device tree file necessary to support msmcobalt qrd platform.
CRs-Fixed: 1026732
Change-Id: Ic234c29b9c86e7095ab39f633eda57560b271c1f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
This is a snapshot of logged IO accessor functions as the following
commit in the msm-3.10 tree:
'commit acdce027751d5a ("Merge defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")'
Change-Id: I4d52ad23cc40d03d2bae1d3942c8d35543a0d461
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[sramana: Fixied merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
This partially reverts 'commit 702b94bff3 ("ARM: dma-mapping:
remove dmac_clean_range and dmac_inv_range")'
Some MSM drivers still use the dmac_clean and dmac_inv_range APIs.
Bring back the defines and exports for v7 CPUs.
Change-Id: I69017d73da1065a5eeb9c87c899b6a51be5ebfe6
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[sramana: resolved minor merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Set the primary display interface as the DSI device. List the supported
panels and set the preferred primary panel to be nt35597 dual-DSI
(non-DSC) panel on msmcobalt MTP.
Change-Id: I117348084e2bec49d0fcd7eb0b0149fc00ae639d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Charger drivers can have different operating modes such as standlone, or
parallel slave.
Add a mode variable to support different operating modes.
Change-Id: I885289a1eec68335645912c3ecbbe91a85836647
CRs-Fixed: 1023141
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Votables that are NULL or have already been destroyed need not be
destroyed again. Return immediately when destorying NULL votables.
CRs-Fixed: 1023141
Change-Id: I8e367dbe7acf72471a5a474f0e2a00a4004fcbfb
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The parallel charger does not use voting, therefore register getter and
setter functions need to be created or exposed.
CRs-Fixed: 1023141
Change-Id: I96a4877196be78c0eeecc3fc08419e8990572aaa
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The I2C PMIC Controller is used by multi-function PMIC devices which
communicate over the I2C bus. The controller enumerates all child nodes
as platform devices, and instantiates a regmap interface for them to
communicate over the I2C bus.
The controller also controls interrupts for all of the children platform
devices. The controller handles the summary interrupt by deciphering which
peripheral triggered the interrupt, and which of the peripheral interrupts
were triggered. Finally, it calls the interrupt handlers for each of the
virtual interrupts that were registered.
CRs-Fixed: 975120
Change-Id: I5ebe6d0bcb7c097124ba9b35c56579815dda234f
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
When the MSM PCI-e driver isn't enabled, other code that might rely on
some of its exported interfaces will fail to build. Add some stubs for
this scenario to allow other drivers to build independently of
CONFIG_PCI_MSM.
Change-Id: Ib0f6d0ecfa992e2b8aaae9ab6cea3a2e441f65dd
Signed-off-by: Tony Truong <truong@codeaurora.org>
The ion API requires
" The implicit contract here is that memory coming from the heaps is
ready for dma, ie if it has a cached mapping that mapping has been
invalidated "
In v4.4, passsing device==NULL to any dma operation for arm64 results in
a no-op. Ensure that proper device pointers are used.
Change-Id: Id354f7cf6979aa58621408cfcfbd8ef62015fdbd
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Since the blocking chain notifiers can be called from process context,
the notification must not be sent from within a critical section.
Move the blocking notification outside the critical section.
Change-Id: Ia5679310fc59f25643e7c8d572cc230d262c5937
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
The number of ION buffer that can be locked per channel should be
at least the number of channels.
The Load App request, via the SKP channel, uses an ION
buffer that is locked for application swapping by the remote SPSS.
Change-Id: If6b4340b80b313fda87d648baaa1d78a588079ac
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Set latency values for PM QoS voting to 70us.
These values should be revisited in case LPM latencies change.
Change-Id: Ib37534eaf15ad76abb800fe3917f9c0a832bd30a
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Validate the existence of pm qos groups before accessing them,
to fix null pointer dereference.
Change-Id: Iddb96afac87cf3e7a1cc48f04b3c550e81bdae4b
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
In addition to patch 71fcbda0fcddd0 (mmc: sdhci: fix command response
CRC error handling), cmd INDEX and END bit error also needs
to handle the same way as in mentioned patch.
So adding cmd index and end bit error case to it.
Change-Id: I6671bb51259515acb0733ce65be8084716d3bfbf
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
When we get a response CRC error on a command, it means that the
response we received back from the card was not correct. It does not
mean that the card did not receive the command correctly. If the
command is one which initiates a data transfer, the card can enter the
data transfer state, and start sending data.
Moreover, if the request contained a data phase, we do not clean this
up, and this results in the driver triggering DMA API debug warnings,
and also creates a race condition in the driver, between running the
finish_tasklet and the data transfer interrupts, which can trigger a
"Got data interrupt" state dump.
Fix this by handing a response CRC error slightly differently: record
the failure of the data initiating command, but allow the remainder of
the request to be processed normally. This is safe as core MMC checks
the status of all commands and data transfer phases of the request.
If the card does not initiate a data transfer, then we should time out
according to the data transfer parameters.
Change-Id: I73ac950f096fa2e81f29ecb40bdd01153c05891f
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ Fix missing parenthesis around bitwise-AND expression, and tweak subject ]
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.5+
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Git-commit: 71fcbda0fcddd0896c4982a484f6c8aa802d28b1
Git-repo: git://git.linaro.org/people/ulf.hansson/mmc.git
[riteshh@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Defer the resume of the device until a request actually
arrives, thus mandating the use of the device.
CRs-fixed: 987918
Change-Id: I41cf8908dd0f129c54b941c318e938ad7e9d36c9
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Do not resume if deferred resume is enabled.
Only resume when a request is received.
Change-Id: I1eae7dffec97d34b066bb5738c84a7e5a82f68d7
Git-commit: ac9ac6f26904c94e8aec47cab6936dd241c2eb66
Git-repo: git://git-android.quicinc.com/kernel/msm-3.10
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
[asutoshd@codeaurora.org: merge conflicts resolved]
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
A card driver can now specify that the underlying bus should *not*
auto-resume with the rest of the system. This is useful for reducing resume
latency as well as saving power when the card driver is not using the
bus. In the future, we'll add support for manual suspend
Change-Id: I077d7dc9311ff12e6e16de631abeac965c8facd9
Signed-off-by: San Mehat <san@google.com>
Git-commit: b44e6c88fc57e08562ff6b4fd68ba89cc2aa21bc
Git-repo: git://git-android.quicinc.com/kernel/msm-3.10
[asutoshd@codeaurora.org: merge conflicts resolved and
similar changes were updated in a different file; due to
changes in kernel version]
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
The charger peripheral has a bit to control Qnovo pulse engine.
Enable it.
CRs-Fixed: 1018090
Change-Id: I2ddea8adf1aa9d999cc2fd3fd4f0e0f830147d4c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Qnovo device is a pulse engine which works with the smb2 charger device
to charge the battery using pulses. It also provides diagnostic voltage
and current measurements at various points in the pulse train.
CRs-Fixed: 1018090
Change-Id: Ie947cc2c74550c98f64dd028c728afa57723c70f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Qnovo hardware module controls battery charging pulses. Pulse
characteristics are programmed via sysfs files, this driver
translates those values to register values and writes to appropriate
registers.
CRs-Fixed: 1018090
Change-Id: I2573f719f4b2c2fa9a169659a65433fb834ea74e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Enable charging by default, but disable it for CDP, RUMI and SIM.
CRs-Fixed: 1024022
Change-Id: Ie713f020201cafe6d815c7da5e87ea1566ac36ad
Signed-off-by: Harry Yang <harryy@codeaurora.org>
When routing DMIC input to ANC block for handset ANC usecase,
codec driver enters an infinite loop attempting to determine
the stream sample rate. Additionally since the noise DMIC is
configured prior to the rest of the usecase, we cannot deterine
the stream sample rate to configure the ANC block for half-rate.
Therefore revert that logic and let ANC block be configured
according to the device tree.
CRs-fixed: 997662
Change-Id: I311ad8f158b0be6e9d6481512860f9fac10afc1f
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Add the DUMMY network interface and the crypto modules needed
for tunneling in advanced data call scenarios.
ECHAINIV is the default algorithm for CBC which is needed for
setting up a tunnel using XFRM state. Dummy network device is used
to route the IPv6 tunneled traffic when there is no IPv6 route
present on a wireless device. The default route in the dummy
interface routing table will route egress packets.
CRs-Fixed: 1024966
Change-Id: I4706b353e63b044368ea54a8ed74d61dc44dc95c
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Currently DMIC clock is set at 4.8MHz for all sampling rates. For
optimal power, sampling rates <=48KHz should be set to 2.4MHz.
CRs-fixed: 971183
Change-Id: If3076f017d476cfb57fa22b75cc74ed615c8882e
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
cmd_interrupt flag is set during first stream's stop in gapless playback
but it is not reset after receiving eos ack. This interrupts second
stream partial drain and eos is sent to client, which leads to session
close causing audio mute. Do not set cmd_interrupt during gapless
transition to fix the issue as no one is waiting for eos.
CRs-Fixed: 1012546
Change-Id: Ibcbdde0ea59ff80a798de0b894c2239899260860
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
Moisture detection is needed only for NO jack type.
So disable moisture detection feature for NC Jack.
CRs-Fixed: 1012001
Change-Id: I93f72f18145ddef6a0caf2c59a9af5f23e6e20a3
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Add statistics to know driver status which in turn helps in
debugging issues.
Change-Id: I68fa6f510d55822b01c2ea5062d4876c4420c5f7
CRs-fixed: 1026135
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
This patch fixes the possible race condition
because of the stray dci_mutex unlock statements.
CRs-Fixed: 1027461
Change-Id: I10f3c6d1e2d3c6e71be04e3206273aad7971a6b5
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>