Add APIs for checking whether the current CPU is Krait and
Krait Pass 2.
Change-Id: I5b28e8ae76b2df64675a6808092d792833931544
Signed-off-by: Jin Hong <jinh@codeaurora.org>
usb_wwan driver continues pushing rx data buffer to tty node
even if it is removed during device disconnect. This may cause
watchdog bark as driver unnecessarily loops through the list of
rx buffers and tries to push it to tty layer while holding
spin lock with interrupts disabled.
CRs-Fixed: 377066
Change-Id: I5569a4948aba89fd1d0d8ea5e8910ce2e0c8e917
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add support in the rpm-regulator-smd driver for the "bypa"
bypass mode disallow parameter. This parameter can be used to
instruct the RPM that a given LDO should never be put into
bypass mode because its load is sensitive to voltage supply
noise.
Change-Id: I34fdcdb88107f94b78f2ace4a0512fe4ca94779c
Signed-off-by: David Collins <collinsd@codeaurora.org>
Increase the regulator-max-microvolt values for pm8841_s2_corner
and pm8841_s2_corner_ao to match the updated super turbo corner
value.
Corner values have been remapped inside of the RPM. This has
resulted in the super turbo corner value changing from 6 to 7.
Therefore, set the value of regulator-max-microvolt to the new
super turbo corner value.
Change-Id: I951384c2549acdd15b1d84febf663f3d24dc27e1
Signed-off-by: David Collins <collinsd@codeaurora.org>
Update the voltage corner mapping used by the rpm-regulator-smd
driver to match what is being used inside of the RPM.
In particular, an explicit "none" corner value has been inserted
with value 0 which pushes all of the other corners up by 1.
Change-Id: I34b4285f88e7e9d23d7accf4ccbf9cebff591754
Signed-off-by: David Collins <collinsd@codeaurora.org>
Several flattened device tree functions are currently accessed in a
file that is compiled regardless of whether device tree is enabled
or not. Add stubs for these functions if device tree is not selected.
Change-Id: I0bea3325692fac46d3e5ef457aa30e083f71cd6d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Document the appropriate bindings so the register trace buffer (RTB)
can be used on targets that support device tree.
Change-Id: Iafd2cbca20489fb27ada0b982e012ee74f7b07c1
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
To get large contiguous memory allocations, a dedicated carved out
memory pool is created. The size of this pool is determined by the
sizes declared by devices. Add size bindings so drivers can increase
the size needed for reservations. Also add bindings to allow drivers
to reserve memory with memblock_reserve to reserve specific memory
regions.
Change-Id: Icc51aef5069a7964c03c5c52f24e40b96f4b2781
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Adds support for the new firmware version by incorporating
the interface changes between driver and video firmware.
These changes make the driver compatible to new firmware
version.
FW_VERSION: 100100
Change-Id: I04e9457ac8a85a070f2e4c738ad3e4fc9cbfbaeb
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
The power-on (PON) peripheral is connected via the SPMI
at the address 0x800 of PM8941. It supports the power-key
detection and other power-on features.
Change-Id: I1b4491198a2b3fd64c8a74d6fecf796c1416f0c6
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
The power-on module of the PMIC provides support for
power-key, reset and power on/off reasons and other
power-on related functionality.
The driver currently supports only the power-key detection.
Change-Id: If7d42ce38fba6e9a590d0953daadcd43ab746112
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Sometimes a stat interrupt arrives just before the next SOF,
such that the VFE bundles the two interrupts together into one.
In such a scenario, the frame id sent along with the stat interrupt
message will incorrectly carry the farme number for the next frame.
This change checks for such occurences and adjusts the frame
id accordingly.
Change-Id: I9914c428baf74cab81aade62843b9043f20108f9
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Add support for controlling pcm audio volume in DSP through
Multimedia5. Add TLV mixer control to set the pcm stream volume
Change-Id: Ie5f50c4f47ea57fe4be0aef1320c79a9d3fe7600
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
The LPASS CC has an additional PCM Out Enable clock
that needs to be controlled by the audio drivers. Add
support for this clock.
Change-Id: I23464a7c3c87546630abb0527b65d6f83db4efff
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Closing VCAP devices could be called without calling stream off:
This problem would make VCAP resources taken by devices no longer
running.
Using unsigned variable to store signed result: This problem would
allow stream on to continue even when function returned error.
Fix problem of reading VP irq status register too early: It was
possible for cadence detection bit to be propgated faster by only
a few clock cycles then the picture done bit. When the irq status
read was performed and by the time a write to the clear register
was performed the picture done bit would propgate. Since the irq
is rising edge triggered this would cause a problem and the irq
would not be triggered until VP was reset.
Remove unused code
Change-Id: Iba72354c06287efb27178edf64d8d3f459dbf954
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Currently, there is no support for histogram on MPQ 8064. Add
support for histogram ioctls to support histogram testing.
CRs-fixed: 375580
Change-Id: I24ccf73c6ea6d230da4624ea196cba2d8195f8b2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
When subsystem restart of the modem is triggered, the SSR handling function
disables the disconnect ack feature. Later, when the modem reboots, it
expects the disconnect ack feature to be enabled by default as it was when
the modem first booted. This causes a problem when the modem times out
waiting for the disconnect ack and asserts.
Fix the issue by changing the SSR code in bam_dmux to reenable the
disconnect ack feature instead of disabling it.
CRs-Fixed: 377493
Change-Id: Ibd6ee7770c3ad57fabcf239b0175f2002ca45268
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Audio is not routed to TV after deep sleep and resume.
Userspace is dependent on switch device to indentify audio
route. When HDMI is turned on, this switch needs to be turned
on as well.
CRs-Fixed: 377159
Change-Id: I7faaad5ff772ad2045876cc084aa71d120b77139
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
An ASYNC interrupt is an indication by hardware that some
activity has happended on USB lines in LPM (low power mode),
and USB software should now bring it out of LPM.
Ideally, hardware should give one more interrupt after coming
out of LPM so that USB driver can process that accordingly.
But, sometimes this interrupt is not generated from h/w for
remote wakeup event in host mode. Hence, resume root hub on
receiving the ASYNC interrupt from hardware in Host mode.
CRs-Fixed: 369298
CRs-Fixed: 368948
Change-Id: Ifb166c1f3c749ab8c615308ab52d85ccdc666733
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Core is returning improper header information for H264 128kbps,
level-1b and baseline profile settings. Forcing the setting to
constrained baseline profile for normal baseline profile as
per the updated interface specification resolves the issue.
Change-Id: Ib106b17be9453cfd80264cc2167dda919893b1e2
CRs-Fixed: 371606
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Running one program that continuously hotplugs and replugs a cpu
concurrently with another program that continuously writes to the
scaling_set_speed node eventually deadlocks with:
=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #37 Tainted: G W
---------------------------------------------
filemonkey/122 is trying to acquire lock:
(s_active#13){++++.+}, at: [<c01a3d28>] sysfs_remove_dir+0x9c/0xb4
but task is already holding lock:
(s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(s_active#13);
lock(s_active#13);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by filemonkey/122:
#0: (&buffer->mutex){+.+.+.}, at: [<c01a2230>] sysfs_write_file+0x28/0x140
#1: (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
stack backtrace:
[<c0014fcc>] (unwind_backtrace+0x0/0x120) from [<c00ca600>] (validate_chain+0x6f8/0x1054)
[<c00ca600>] (validate_chain+0x6f8/0x1054) from [<c00cb778>] (__lock_acquire+0x81c/0x8d8)
[<c00cb778>] (__lock_acquire+0x81c/0x8d8) from [<c00cb9c0>] (lock_acquire+0x18c/0x1e8)
[<c00cb9c0>] (lock_acquire+0x18c/0x1e8) from [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180)
[<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180) from [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4)
[<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4) from [<c02d0e5c>] (kobject_del+0x10/0x38)
[<c02d0e5c>] (kobject_del+0x10/0x38) from [<c02d0f74>] (kobject_release+0xf0/0x194)
[<c02d0f74>] (kobject_release+0xf0/0x194) from [<c0565a98>] (cpufreq_cpu_put+0xc/0x24)
[<c0565a98>] (cpufreq_cpu_put+0xc/0x24) from [<c05683f0>] (store+0x6c/0x74)
[<c05683f0>] (store+0x6c/0x74) from [<c01a2314>] (sysfs_write_file+0x10c/0x140)
[<c01a2314>] (sysfs_write_file+0x10c/0x140) from [<c014af44>] (vfs_write+0xb0/0x128)
[<c014af44>] (vfs_write+0xb0/0x128) from [<c014b06c>] (sys_write+0x3c/0x68)
[<c014b06c>] (sys_write+0x3c/0x68) from [<c000e0e0>] (ret_fast_syscall+0x0/0x3c)
This is because store() in cpufreq.c indirectly grabs a kobject
with kobject_get() and is the last one to call kobject_put()
indirectly via cpufreq_cpu_put().
Fix this deadlock by introducing two new functions,
cpufreq_cpu_get_sysfs() and cpufreq_cpu_put_sysfs() which do the
same thing as cpufreq_cpu_{get,put}() but don't grab the kobject.
CRs-fixed: 366560
Change-Id: I23ea50a01793b2b2af0972cde52dba7396925fe3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Adds support to set individual properties to Venus by
calling controls separately.
Change-Id: I4af3176ee009f202e62d566de3ce859b6a8d36c2
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
These configs are needed to support multicast on networks
with colliding subnet.
Change-Id: I395cb7527da1867d439f8e9e0a5d944acc55699e
Signed-off-by: Smita Ghosh <smitag@codeaurora.org>
Remove unneeded idle commands from the command stream when updating
pagetables and doing TLB flushes. Ths cuts down on the number of
commands in the ringbuffer during switches.
Change-Id: Ic0dedbad7a0d64c39518b2dd2bb6322f4ab74ba0
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Incorrect HMAC values are generated in following scenarios.
- In case of a single transfer with a packet shorter than the
block size, the HMAC generated is incorrect. This is due to
the "FIRST" bit in AUTH_CFG register not being set. When calling
HMAC_final for a transfer with a single packet (with no prior HMAC
updates), the "FIRST" and "LAST" bit in AUTH_CFG register needs to
be set. Currently FIRST bit is being cleared incorrectly for all
scenarios.
- In a scenario of a mac key input larger than block size, the key
needs to be hashed. The key hashing operation is crashing. This is
due to a NULL, unintialized pointer to the device handle. This is
fixed by intializing the pointer correctly. Further more, key size
is uninitialized, resulting in corruption of buffer.
Change-Id: Iec736f2130e509fcaf631a2c71c5483514666617
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Enable support for tricolor leds on 8x25 platform
Change-Id: If0a91962d286b054f88a36ebb672f0a2cdf39e71
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for red and green leds through tricolor
led driver
Change-Id: I337d5f220be326f4417d714fcfd7eeabca683854
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for tricolor leds on Qualcomm's MSM
boards.
Change-Id: Ib05d6129f98cf67e7d208465a13cc6b1300c6277
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Buffer holding video from demux goes to dvb/video which
accesses the data in SW without sending it to HW units,
the buffer can be allocated as cached to improve performance.
Change-Id: I7795f901057c219198d02f340f65e81a2839edfb
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
user-space programs using demux require to be notified
on several kinds of events such new PES event,
new section event, new recording-chunk event and
other error events. demux API was extended to meet
this requirement
Change-Id: I768b6acde346139e194a3e6637b6fc0fc9648446
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Data should be read from the buffer according to the size
requested from the user or the actual amount of data
available, whichever is smaller
Change-Id: I81e6a2c538644417caeba9c19060f58810c1fdc3
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
On 8x25 EVB, during stress testing of suspend/resume, sometimes the
backlight doesn't come up. Fine tune the delay values used to program
the backlight IC into 1-wire mode so that the IC enters 1-wire mode
properly everytime.
Change-Id: I073f0101ddc057a1f3f59028ae171976a6965d15
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
If the vote for pm runtime is done while codec shutdown, it is possible
that the runtime pm vote occurs even before the slimbus port for tx/rx
audio channel is disconnected. This can cause problem in audio playback/
record. Fix by moving the vote for runtime pm after slimbus port has
been disconnected
Change-Id: I959a83be7bc381e80dfc0176c50cb60e59ce227b
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Signed-off-by: Patrick Lai <plai@codeaurora.org>
The operating voltage range was 3.2V-4.2V which was not correct for
QRD Devices. Hence updating this range with correct values i.e
3.5V-4.2V. Accordingly the fail_safe voltage is also updated to
14% of this range.
CRs-Fixed: 377061
Change-Id: I72ab4388295437e728802e8db59d8b31feb65f9a
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
commit c9cb205f (USB: android: Add a new LUN as CD-ROM in mass-storage)
access platform data without checking for NULL. This causes a kernel
panic on targets which don't have platform data.
Change-Id: I4542b0dce81604706f90b7f6e851ed47c04a941c
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Packet size of callback data is currently checked against frame size
corresponding to 20msec data. There are instances where 200msec data
is sent to apps corresponding to total record buffer size. In such
cases, the added condition fails and no recording happens causing
voice memo recording to fail.
Modify condition to check against record buffer size instead of
frame size to avoid such failure cases.
CRs-Fixed: 377529
Change-Id: I77bab73a34d95e823f14f3750550a793540248d1
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Adds Support for Intra refresh by setting
default values and calling right set_property.
Change-Id: Ibc04ec195b5265a1db60befb8109693a41f8fe51
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Add runtime power management support in the driver which allows
putting the hardware in low power state, turning off LDOs
and releasing wakelock.
This LPM (aka low power state) support is currently added as part
of USB disconnect and wall-charger connect. LPM support would
later be extended to USB bus suspend as well. Also, support for PHY
retention mode and VDD minimization would be added later.
This commit also adds debugfs nodes that can used to simulate
cable connect and disconnects as A or B device. Following are
the nodes:
-->msm_dwc3/id : Boolean value
-->msm_dwc3/bsv : Boolean value
-->msm_dwc3/connect : can be set to enable/disable
User should first update id/bsv values before enabling 'connect'.
dwc3-msm device is parent of dwc3-core and its runtime PM is managed
by dwc3_otg driver which is responsible for the state transitions
based on notifications from DWC3 h/w or ext_xceiver (using PMIC) for
cable connect and disconnect. This change also allows dwc3 gadget and
host to acquire PM count for the case when dwc3-otg is not present -
e.g. host and device only configurations.
Change-Id: Idd9a59c1ffd46bd98228c9fd4441f668b763534d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
The regulators required by the HDMI PLL are now controlled within
the clock driver. Remove the explicit control from mdp.c.
Change-Id: Ia2975a5a83b77cd9e21fc43cabea754b7b040dd5
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Rather than requiring the display driver to enable these regulators
before enabling the clocks which use the HDMI PLL, enable these
regulators in the clock driver. The HDMI PLL is powered by the same
rail as the SR2 PLLs, so re-use that vdd_class.
Change-Id: Ieed938fc06cbd4ec7b6317b956b10d8ee7b4c578
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This allows for a vdd_class, which reference clk->rate, to be used
with the HDMI PLL. It also removes the need to have a .get_rate
op implemented.
Change-Id: I1fd7eba16fa1e1af56513d400e58fdfdaff931e4
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Add a sysfs attribute to configure the runtime PM idle timer value
In some cases (eg. audio playback) the power consumption drops if
runtime idle PM timeout is set to 10sec. So this sysfs attribute
should be used to configure the idle timeout for SDCC per target.
The value must be greater than 5secs or else will have a major
performance hit.
Change-Id: Ia5a9a81ce46e9c66a325fd1ec1ccd2e0f89a981f
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Proprietary chargers pull D+/- to specific voltages between 2.0-3.3V
(VLGC) for identification. The DM voltage may not exceed VLGC due
to pull-down resistor. Hence a proprietary charger is detected as
a Standard downstream port (SDP). Gadget speed is used to differentiate
between SDP and proprietary charger.
In charger detection work, if the connected charger is not SDP (or) CDP
then re-schedule the work again and if it returns invalid charger, mark
it as proprietary charger.
CRs-Fixed: 377915
Change-Id: I4223c0724c00aea7e755cd07b349c9e597d7960d
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Enable generic HID to support USB keyboard and mouse.
Change-Id: Ie889819d51357f9c9b76bfcedd0a5135bb9e079b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The Q6 MSS PIL driver is not compatible with RUMI. Linux
crashes if this driver is probed on a RUMI device. Therefore,
configure the Q6 MSS PIL device node so that it is disabled for
RUMI.
Change-Id: Icf7284a7d13774a8b72deb31c178217c20c737a8
Signed-off-by: David Collins <collinsd@codeaurora.org>
A 32 bit RTC is housed inside PMIC. The RTC driver
uses SPMI interface to communicate with the RTC module.
RTC device is divided into two sub-peripherals:
1. RTC read-write peripheral having basic RTC registers.
2. Alarm peripheral for controlling alarm.
RTC peripherals are children of SPMI device and driver
receives it's configuration parameters (such as alarm
powerup feature to powerup phone using alarm interrupt)
from device tree.
Change-Id: I46a2ffc0f6c9c5ee174cf803de19e656da7ce088
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Doing this avoids having to allocate work structs at runtime. We
also don't have to pass information about which device is calling
subsystem_restart because we have the struct in hand with
container_of.
Unfortunately, wakelocks don't have the ability to reference
count, so we must track if the wakelock has been activated or not
and avoid locking it again. When we move to wakeup sources we can
call pm_stay_awake() unconditionally and pm_relax() if the
workqueue scheduling call indicates the item is already
scheduled.
Change-Id: Ie5cf89aa2ea258a1d521e82b397f05ae1c53ad72
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This isn't any more useful than just testing for the
restart_level directly.
Change-Id: Ic38473be5134f9e0f652b58994d3364f80bde014
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
The main restart function loops over the restart list many times
and repeats the same looping logic each time. Extract that loop
into a function and call it with a function reflecting what each
loop is doing: shutdown, ramdump, powerup, and all the notifiers
before and after.
Change-Id: Ic448367f708e9ddee151511df2be3773e9d4f63f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>