qpnp-misc driver supports some miscellaneous stuff which is
needed on certain PMICs. Change it to a platform driver similar
to other PMIC peripheral drivers.
Change-Id: I3f60bbe88616db82b568cc528f076368afd105ca
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When usb composition switch happens upon cable disconnect and
function bind fails, function's config pointer is set to NULL.
This is resulting in to NULL ptr dereference when config is
accessed from APIs which are called asynchronously and out
side of the usb core driver(i.e. dwc3) context. Fix the
issue by directly accessing gadget pointer from gsi driver
context in those APIs.
Change-Id: I1006881ae1838e8ddc8fa5e9ef501f4c658b54e7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add sub-device node to allow mba to be able to load in carveout memory
region for MSM8998.
CRs-Fixed: 2006100
Change-Id: Iff3a83afad159f475d23a579c72d0c7c41c622c8
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
When framework reboot happens, HPD node is toggled
by the display framework. Make sure to send cable
disconnect event to framework when HPD is set to
'low' state.
CRs-Fixed: 1116934
Change-Id: If59ec7c81264ff76b661cdfd8e6b70356a6e1544
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Add support for suspend and resume events that are
triggered by the run time system. In particular, transition
the clock (link and core) and regulators state depending
on whether the suspend or resume is being processed.
CRs-Fixed: 1103664
Change-Id: I4e3de9b32963c71dfded0f695dc7734b8121e19a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Fix the link training routine by removing the updates to
the state control register and the corresponding memory
barrier to complete the register write. This changes fixes
the link training failures seen with VGA monitors over the
Type-C/VGA dongle interface.
CRs-Fixed: 2008753
Change-Id: I501833e02d24d6aa12351eb0bd067a08ad597ed0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Disable the DP audio engine on receiving the teardown_done
callback from the audio codec. This ensures that the DP
engine is in the disabled (MUTE) state in preparation for
the next audio session.
CRs-Fixed: 2006127
Change-Id: I7c984531d308501690ede36ea959391ebef7599f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Update the interlaced field for the 1920x1080i60
resolution to show that the mode is in fact interlaced.
This will provide external display clients with the
correct information regarding this resolution.
CRs-Fixed: 2006873
Change-Id: I30f5da1e49e35a81f65508f2766118a58d12ceb4
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Separate the audio and video notifications while processing
the display hotplug events to ensure that the audio subsystem
is notified only when the display is in the correct state. In
particular, the audio subsystem should only be notified once the
mainlink is ready and the DP controller is in SEND_VIDEO state.
This will ensure that the DP audio engine is able to acknowledge
the audio unmute request, which will result in the AFE port being
configured correctly.
CRs-Fixed: 2007534
Change-Id: I702c1de6d4eb10e001d97e1d7e7c545ff481a401
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Set the link parameters that correspond to the failsafe resolution
if there is a failure in reading or parsing the EDID data. This
will allow the display to be configured with the failsafe
resolution and prevent the driver from going into a bad state.
CRs-Fixed: 2002794
Change-Id: I5882e66eee6073da6484903956abdcb3db05a5ea
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Do not check flags for connection requests as it may result
in not processing any subsequent requests that have new
flags added incrementally from the previous connection.
CRs-Fixed: 2007353
Change-Id: Ie867d13d25267962315444797cf21bf57850f088
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
While releasing the device, check if the file session context is NULL
to make sure we are not dereferencing it during file free.
Change-Id: I310271189cf710b81c5182b936189fd57ddedd7b
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
At the end of ffs_epfiles_create() a message is logged with
the name of the epfile, however this epfile pointer is only
valid in the body of the preceding for-loop. After the loop
exits, it is now pointing one past the allocated array and
results in an out-of-bounds memory access when formatting
the string.
Since there could be multiple ep's created, the name may not
be important to log. Replace it with the count instead. Also
while ffs_epfiles_destroy() doesn't have the same problem,
do the same there anyway for symmetry.
Change-Id: I10551f9c1e056f215ec59335cbf1cde2bad6cc04
Signed-off-by: Jack Pham <jackp@codeaurora.org>
To enable gro_flush_timeout, a driver has to use
napi_complete_done() instead of napi_complete().
Change-Id: I2ea853bb57e15021c001d16d7d1fe7e7ae0c58e7
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Enable the msm-imem-kaslr_offset node for sdm630
which preserve the randomized kernel offset.
Change-Id: Icb4b6a94a702f07b99513ebd16ebc949b49d919c
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Disable Auto-resonance if calibrated LRA frequency deviates more
than +/- 25% of initial LRA frequency and change error polling
frequency to 20ms.
While at it, fix the calculation of deviation error percent for
LRA rate code.
CRs-Fixed: 1099718
Change-Id: I329415992d3932e389e95995c1503c15ba282b19
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
bus_ops->suspend may fail due to some reason
(for e.g. due to flush timeout). In such cases,
if we return error to PM framework from here without
calling pm_generic_resume then mmc request may get stuck
since PM framework will assume that mmc bus not suspended
(because of error) and it won't call resume again.
Thus fix this by calling pm_generic_resume in case of error
from bus_ops->suspend in mmc_bus_suspend.
Change-Id: Iaef485d0b47b005aa88e61cd77a2b7b65931def1
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Siba Prasad <sibap@codeaurora.org>
Currently in case if suspend is failed due to some
reason then the error case is not handled properly :-
1. w.r.t. suspend_clk_scaling claim_host counters are going bad.
2. In case of any error after halting and disabling cmdq -
the error is returned to the PM framework and it assumes that
card is not suspended, whereas CQ remains disabled. This causes
I/O requests hangs since no request can be processed any further.
Fix this by handling error cases properly.
Change-Id: I8691eebcb0e2d089720505475aa0297efce5cca5
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: Siba Prasad <sibap@codeaurora.org>
Add device node for SSC sensor device for QRD SDM630.
It allows userspace client to read sensor related
information.
Change-Id: I9913274b778cdc4b148cfff2388da0642094b2b0
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
rm67195 fhd command panel will be used for SDM660
PM660A QRD, so enable display panel for that.
Change-Id: I10ba8a01eef0fa61d7ee9c583225ea73deda8a2b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
There is leakage of ~300-400uA current in Bluetooth page scan scenarios
when L6/L9/L19 follow HW_EN1.
CRs-Fixed: 2011978
Change-Id: I1940c6c4638ae588b1b8126967d252d7cad06a51
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
As per pm660 gpio spec, the default state of gpio3
should be 10uA pulldown.
Modify the device node accordingly.
CRs-Fixed: 2015641
Change-Id: I6a5596453c75fbc86dac3830da52c2876b7e7d42
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Add new host op for clearing ice configuration.
This config_end host op need to invoked for clearing ice configuration,
once mmc request processing is completed.
Change-Id: Ifc5569ae88748599b75ef5b3e625249ecd667762
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
The SC interrupt handles the SC events and disables the module
if it persists.
CRs-Fixed: 1083319
Change-Id: I18e37440159089103c5ba89a9a2d793d9aafe433
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Handle the SC event in normal and TTW mode. Check if the
SC event is valid and re-enable the module to check
if it goes away. Disable the module altogether if the
SC event persists.
CRs-Fixed: 1083319
Change-Id: I20bd3ca0bd3cf273a2607656e3f51bde1eaf2dc6
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
When __qseecom_check_app_exsits() and __qseecom_load_fw() get app_id
from TZ, they save it to function's return value then return back.
But "app_id" is of type uint32, "ret" is int32, this will return
incorrect app_id to the caller if app_id is larger than 0x7FFFFFFF.
Thus make change to return app_id correctly.
Change-Id: I2ef98d64490c480d5416ee24ec6ca9aca9c8ca8a
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
For QMI timeout issues ICNSS_ASSERT macro invokes WARN_ON but
there can be cases of multiple QMI timeouts and those may cause
to spit out lot of WARN_ON message to kernel log. Because of
this, kernel log buffer may overlap and miss logs which may be of
use for debugging the QMI timeout issue. Remove WARN_ON by making
ICNSS_ASSERT as a dummy macro.
Change-Id: I0d5d76a2385f40f64ec5d811f7bcde82f1c44877
CRs-fixed: 2016253
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
Add MBA carveout to make HLOS carveouts in sync
with version 7.1 of the memory map.
Change-Id: I34d531dc7e01e66305d155d44fb0850a699f6d5b
Signed-off-by: Liam Mark <lmark@codeaurora.org>
The ioctl array is sparsely populated but the compiler will make sure
that it is sufficiently sized for all the values that we have so we
can safely use ARRAY_SIZE() instead of having a constantly changing
#define in the uapi header.
Change-Id: Ic0dedbad39f30abb8ce340289089d2f3a5f6fe36
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
To avoid conflicting with upstream changes when upgrading the kernel
version, move QTI specific ioctls to start at command number 0x40.
This provides plenty of space for the upstream ioctl list to grown
before there are conflicts.
Change-Id: Ic0dedbadad9d3a24467f3d5992104754e31cd769
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
App type is required to send the calibration
for the modules in a topology that would
be selected for ULLPP. For this, expose
a mixer control. App type will be sent
if the ULLPP is used for NOIRQ.
CRs-Fixed: 2009687
Change-Id: I7c8349d5827dffe32c0db35262d54cb7c1dba1a9
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
The initialization code in battery.c creates important votables like
FCC, FV which every many other charging drivers are dependent on.
The dependent charging drivers keep probe deferring until the votables
are created.
Ensure that battery.c's initialization code is invoked before other
drivers get added.
Change-Id: I52990baef7f7c4095e635728511e120c1dbe5e9d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
During device open create a debugfs file with name as the current
process name.
Change-Id: I7cb1c4a950b2498932f930eb79cb936952c0781d
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Remove the orig_addr_limit check against KERNEL_DS in
do_page_fault handler for permissions faults. This
check is part of UAO and PAN features and these features
are disabled by default.
Change-Id: I5de760b983edcf14d1c0bee2a53dc091ceca31da
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
In case of USBIN-USBIN based parallel charging configuration
hardware based INOV is disabled and adapter output voltage of
QC3.0 adapter is controlled by userspace daemon. But in case
of QC 2.0 based adapter there is no such daemon to control
adapter output voltage, thus force 9V adapter output when a
QC 2.0 adapter is detected.
While at it, cancel icl_change_work before scheduling it in
order to make sure work is scheduled for next interval.
CRs-Fixed: 2015927
Change-Id: I198f8299b5cd0a62c518815c33088bb5e38c8505
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
PM660 support configurable delay for softstart done with
minimum value of 3msec and thus OTG can be configured to
a minimum value till softstart completes. Add a PM660
specific workaround to set OTG current limit to 250mA before
enabling OTG mode and reconfigure the current back to desired
value once OTG softstart completes.
CRs-Fixed: 2016131
Change-Id: Iabb9e1c55cc59453825795e045d7fcc6caf8f33e
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>