The platform device for the data peripheral between the apq
and the external modem should be removed before asserting
the reset line that will power down the modem. This was
causing a crash when the phone was powered down normally.
Also, put back the delay during which we check for the
mdm2ap_status gpio going low before asserting the reset line.
Change-Id: Ic32425ab84f944f51b4cc906ff4f242899859b31
Signed-off-by: Joel King <joelking@codeaurora.org>
Add per instance lock to serialize stream operation.
Protect unpredicted crash on video recording by serializing ops.
Instead of only using the vid_lock to protect the video node,
we need inst lock to serialize the stream operation, too.
This commit increases the stability during recording.
Change-Id: I4f6dcb6637eb700df04f30a102aada4fdec9f2d1
CRs-Fixed: 363221
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
Enable CONFIG_MMC_CLKGATE for runtime SDCC clock gating.
The clocks will be turned off after 200msecs of inactivity.
Change-Id: I15e77bbece399dc86b9071cad9fd4789bb2fe2b5
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Currently, all footswitches supported by footswitch-pcom are enabled
and set to "manual" mode during a subsys_initcall, regardless of
whether or not the footswitch's device will ever probe or even exist
in hardware.
Because calls to enable footswitches also implicitly enable clocks (on
the modem side), this behaviour results in clocks being turned on
unnecessarily. The clock driver's "auto-off" feature later disables
them, but it's best not to rely on that happening (especially since
auto-off may soon be removed).
Change-Id: Ie3f59ddcba44a126cf74dd64e5e50848ca61e364
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Add support for enabling HDMI PLL regulator along with footswitch
enable/disable to avoid PLL lock detection failures during
suspend/resume
Change-Id: I9b161cab50d2b6c39de39b588e326f5ff97cbc65
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
There is a possibility of HSIC phy getting locked up if RUN/STOP
bit is set before finishing the resume signaling. Hence do not
set the RUN/STOP bit before setting PORT_RESUME bit. Since
PORT_RESUME bit gets cleared automatically by HSIC HW after bus
resume is completed, need to set RUN/STOP bit right after that.
CRs-Fixed: 372145
Change-Id: Icb9effefe14c10f13cfbb3d8f1840c8bdd96aea4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
The disconnect ack feature is normally turned on by a handshaking
mechanism between bam_dmux and A2, but on some 9615 variants that
mechanism will not exist. A2 will still expect the disconnect ack to
be active and might crash if it encounters that it is not active.
Enable the disconnect ack feature by default to prevent this.
CRs-Fixed: 372958
Change-Id: I2222b4651e14c2154f51a8c38852a855cdd93c4e
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Initial commit for Camera Post Processor Driver.
The driver contains frame queuing and process logic
using v4l2 framework.
Change-Id: I283c11c3de3bd121b9c3ea5af1446c13e188d329
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
The L2CC PMU's can filter traffic at the L2 slave port.
This patch allows the user to count non-CPU master events.
Change-Id: I42283a0902b8e746cb86440d423136ae394e7cd6
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
When there is a failure while opening q6asm capturing stream,
it releases the q6asm data structure which is accessed by
stream closing function and lead to a crash. Resolving the
issue by freeing the data structure in closing function
instead of during opening failure.
Change-Id: Ie45335a98be21d3b6035115241f657185a918be0
CRs-Fixed: 373438
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
Currently when ever hw_params is called on a codec dai the sample
rate is set of all Interpolators(RX) and decimators(TX) which are
not active. This causes issues when one TX codec dai active with one
sample rate and a side tone is enabled from one active RX path to
another TX path with different sample rate. When First TX DAI is
enabled all the non-active decimators sample rate are set to its DAI
rate. When a RX Dai is enabled and the mixer commands are given for side
tone path to complete, it will cause the other TX path to be enabled
with sample rate of first TX DAI. So when second TX DAI hw_params is
called, since the decimator is already active its sample rate will not
be set. So only set sample rates of decimators and interpolators a DAI
is going to use.
CRs-Fixed: 370230
Change-Id: Ic916fc7680b51345cfcc83011a6df30c4b3320c8
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
To account for corner cases during system suspend, the
subsystem restart API needs to be invoked directly
from within the context of the watchdog interrupt
handler. Call subsystem_restart from within the gss
watchdog bite handler instead of scheduling a work
item to do the same.
Change-Id: I52b5eb0f899b82df1be6207e9256a5aa739ecbc3
CRs-Fixed: 367957
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
The GDSC state-machine will temporarily disable clocks to a power
domain while the core reset sequence is performed. After power is
enabled, the clocks will take 4 cycles to re-enable.
This scenario only occurs if gdsc_enable() is called while clocks are
enabled. While this is not the recommended order for device drivers
to perform these steps, the 1us delay is added here just in case
the recommendation is not followed.
Change-Id: Ieff39755561b6f82731747cf0984d8d401001060
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
There was a corner case where the open slot count was going -ve
indicating that there are no slots left for messaging. The current
check to ensure non-zero messaging slots does not take that into
account. This commit fixes that check.
CRs-fixed: 370229
Change-Id: I832ce0a26f1919d3d03b4ef0311603a5a778685e
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
If infinite mode is not supported, chip select goes
high after every 4k bytes. Make sure the same behavior
does not happen on targets that support infinite mode.
CRs-Fixed: 361961
Change-Id: I5cfea96202718214a8edd060e06fbb7fb2fa90a2
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Diag Restart commands are handled via the diag driver
and no longer require gss-8064 to handle them
Change-Id: Ia5449004ef5d1256bf2ee15a692bd0d5b1a5a09d
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
enable_irq and disable_irq[_nosync] are 'nested', i.e. for
an interrupt line to be truly enabled or disabled, the number
of enables/disables must match. Fix the code to correctly
match the disables with the enables.
Change-Id: I0478823f3fa2f7bf54f1a6f83157d1ce7d6a486d
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Deprecate PMEM and start using ION for existing converted
drivers
Change-Id: I0ef4c66ce7c32eb886795d1c0829948c3e24c379
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
UIM (User Identity Module) driver makes use of existing MSM serial
driver. It configures UIM clock during startup and shutdown of
UART device.
Change-Id: If1b249639e9969273882ad000ef9b1495b8c7013
Acked-by: Ho Lee <holee@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Peripheral Image Loader change 6e6b8cd216e99f855fd95f8776613b84b94cc3e4
updated the string pil_get() uses to "adsp". Update the SMD platform
data definition to match.
Change-Id: Ic7495612aa8d99ef09d777e846dad61b216f8d43
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Having "branch_clk" in the names of these functions in inappropriate
since they operate on branches, regardless of whether they are part
of a branch_clk, rcg_clk, cdiv_clk, etc.
Change-Id: Id06d31034405f98352d519d500e22f05cb78e267
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
The scope property indicates the operating mode of the system. This
property could be used to switch to and from usb host mode.
Add a helper api to update this property.
CRs-Fixed: 373365
Change-Id: I5fb57f7b1075276ba90b0f7e0a44626e07ee196f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Remove dead code that fails to compile. It refers to some
sysfs entry that never appeared to be written.
Change-Id: If2b4e3ad3077fba039569fe131c614b4220d7140
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Name variables of similar types that are used for similar purposes
with a consistent naming scheme. This makes the code easier to read
by eliminating confusion caused by variables with names like 'clk'
being used for 'struct clk' types in some functions, 'struct rcg_clk'
in others, 'struct branch_clk' in others, and so on.
Change-Id: Id53acda2a3872b640999126809ba1f76aaee85db
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Remove the unused include to avoid compilation
error.
Change-Id: I8829cc8debe5184951066f23342b3ade2e16777a
Signed-off-by: Kalyani Oruganti <kalyanio@codeaurora.org>
From v3.4 onwards PMU's can be accessed using names
listed under /sys/bus/event_source/devices/
This patch sets up format attributes per PMU to describe how to
construct events for each PMU.
Change-Id: I2dd1293e0a906c3075c02a125ccceefeb33a80e3
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Stub out get_console_state if the console feature is turned
off to prevent a compilation warning in debug code.
Change-Id: Iad3d9303850bedd56db0ffc6f08dc5e8c9442373
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This patch trivially changes variable names in a function
that is shared between 8960 and 8660 perf code.
Change-Id: Id59b9beef2cc83a3c4bf5671419dcd0effb5c190
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Ensure platform data is only accessed in the probe function to help
with code maintainance.
Change-Id: I5f085fa1b472364fad53d0681f79069cd046793f
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Populate device tree matching code for the qdss drivers.
Change-Id: Ic0af621e2d1c0dd9dc81df3482c63b071c1db741
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Remove local definition of 'enum usb_vdd_value' which is now
defined in msm_hsusb.h
Change-Id: I75735f9421703f0c4466d3058b9f64cfd3e79746
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
- Implement APIs used to support wifi display (WFD) based on ioctls and
functions declared in linux/msm_mdp.h.
- Restructure writeback interface file to support custom output formats
and take buffers from WFD APIs.
Change-Id: I3e6b75bd8b7d73eb20c97899de1891bbd85e9fa4
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
With CP-2.0 feature, mm_fw heap converted to hole of size
128 KB which lead to fail loading normal playback firmware.
So, increase the heap size to accommodate normal playback
firmware. Hole is now just a void space which won't be
visible to kernel. So, by this change, mm_fw heap is
overlapping with the secure firmware loading region.
Change-Id: I605fc748ea05602011de4f4592ca432bf627f531
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
In case of a watchdog bark time out, dump
the cpu alive mask and last pet time, to determine cpu
hangs or deadlock scenarios as cause of the timeout.
In case of a kernel panic, adjust bark and bite
timeouts based on panic timeout, to allow for completion
of panic handling prior to watchdog bark or bite.
Change-Id: I4401db681cbad54abb0f14ae84550fc63663fb04
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
The test scheduler allows testing a block device by dispatching
specific requests according to the test case and declare PASS/FAIL
according to the requests completion error code
Change-Id: Ief91f9fed6e3c3c75627d27264d5252ea14f10ad
Signed-off-by: Maya Erez <merez@codeaurora.org>
- Add Mixer controls for Reference Rx device to be
used as a endpoint2 in adm open for echo cancellation.
- Add logic to support echo cancellation for audio
recording with fluence topology.
Change-Id: I7b83c3fc1a19fef7826bc8c3671e2565e393566a
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
The 8038 has a ccadc (coulumb counter analog to digital converter) which
is used by the BMS for state of charge (SOC) reporting and is also used by
software to get instantaneous battery current. Without this cell the ccadc
is never probed and current readings and SOC are inaccurate.
CRs-Fixed: 372679
Change-Id: If323a35dda650067219f35e68395f9fd23f4d69b
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Turn on the feature which allows SLUMBER in place of SLEEP for targets
with low latency GPU power rail bring-up.
CRs-Fixed: 369927
Change-Id: I2c2bf2049a6b7670da7c2e5ec4cde3cf66642c9b
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Add Master/slave data for copper to define the topology for
bus scaling driver
Change-Id: I2c7912f82aabdc1971126bf55cfa642b0c43b597
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
This provides support for pm8x41 GPIOs and MPPs.
Change-Id: Ic76123dc64ef0183b081c9b2ae9a47f4f8027d45
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Add MPP devices for pm8841 and pm8941 PMICs. There are 4 MPPs on
the pm8841 and 8 on the pm8941.
The 'odd' numbered MPPs have no current sink. The 'even' numbered
MPPs have no analog output buffer support.
The qpnp-pin driver automatically detects the
type and limits the capapabilities of these devices, so no
special Device Tree bindings to capture this information
are necessary.
Change-Id: Ia4d4a5f6ecd2a763112153f35c3e173b0a812022
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Add mpp support to the qpnp-pin driver. MPP support allows for
additional devices to be specified in the Device Tree topology.
This support is implemented in the same driver as the GPIO
support since the address map is very close between them.
The addition of this support does not change the existing gpio
support.
Default MPP configuration can be specified in the Device Tree
using the three new bindings for mpp. Any attribute not specified
in the Device Tree will assume its default configuration.
It's also possible to configure an MPP at runtime using the
existing qpnp_pin_config() API. If a given configuration feature
is not supported by the underlying hardware pin, then that
particular request is silently dropped with no error. This allows
for gpio users to continue specifying only a subset of the full
qpnp_pin_cfg structure.
Change-Id: I2b72768647de2a371edfa05c52fc1ed776c215c0
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
There are two types of failures given a config parameter and a
requested value. The first type occurs due to a requested
configuration not being supported by the harware. The second case
happens when there is ample hardware support, but the
configuration value requested is out of spec.
Change the behavior so that a failure due to a lack of hardware
support does *not* trigger an error in either the probe of
default pin configuration, or the qpnp_pin_config() API.
The main motivation here is so that the pin configuration can be
extended to support mpp in addition to gpio. Users should be able
to only specify parameters for configuration items they care
about. For example, it would not be reasonable for a gpio pin to
receive configuration specification for mpp parameters. Given
that there's only one data structure in this scenario, this
cannot allow the config request to fail.
This change also has the added benefit of restructuring the code
so that there is no duplicated checks for the same error
conditions in the driver.
Change-Id: I88776b304b25cf4bb0a49ff305b398209aaade2a
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
qpnp-gpio manages gpio_chip queries based on the slave
ID. This has a limitation in that it restricts the number of
gpio_chips per slave ID to one. However, some PMICs have both MPP
and GPIO on the same slave, and thus the slave ID is not a
meaningful unit to search for.
Instead, make use of the 'label' binding to give the
primary dev-container node a name. This name will serve as the
gpio_chip label, which can be used in lookups.
Change-Id: Ic20caeb4622d73449a983992275446c733ddd89a
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
The devnode array is currently being used for non
spmi-dev-container devices as a special case where the number of
devnodes is 1. This obfuscates the code and also removes the
ability to store the dev-container's device resource information,
since in that special case the devnode array is dedicated for the
child devices.
Add a new spmi_resource entry used for typical spmi_devices, and
treat the devnode array as the special case for
spmi-dev-container.
Also add a new API spmi_get_primary_dev_name() to return the name
of the device assigned with the 'label' binding if it exists.
Change-Id: Ibe7b12285e37bb0529024558550a96d71393bc10
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Since QPNP PMICs also include support for MPP, and since we
intend to support MPPs in the same code base, it's not
appropriate to limit this the scope of this driver to 'gpio'.
Change the driver name to 'pin' since it more accurately
describes the potential for this driver.
Also update the Device Tree include files for the name changes.
Remove a superflous 'gpio-pin' definition in the msmcopper
specific include file, since such configuration shall never
change. This binding should be defined in the PMIC specific
include only.
Change-Id: Id1d6407039908e3cf44dfc19af71f0cdc7aff8e6
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Since we support multiple device_nodes per spmi_device when used
with the spmi-dev-container flag, it's often unclear how a driver
should make reference to a particular device. Therefore,
introduce the spmi specific binding spmi-dev-name that specifies
the device name for the device_node.
Also introduce an API that can be used from
the driver to lookup the specific device node associated with a
particular device name.
Note that it may seem at first glance that the binding 'label' is
redundant with device_node->name. However, per the ePAPR,
device_node->name is intended to be as generic as possible,
representing the function of the device and not the precise
programming model. 'label' is used to give a platform
specific name that can be queried from device drivers.
Change-Id: I28eca35d0b625372c26a6d8ad81e7679f200d14b
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>