tlmm:
Add a function to dump the active wakelocks
Change-Id: I05f4d477ff9e096efe8e0fcdb3a8d5d76c7028ac
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1453711
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509728
Reviewed-by: Wang Wang <wangwang1@mt.com>
Add system node /sys/private/tlmm_before_sleep etc.
Used to check and change the gpio before suspend.
This won't save and change gpio's config only after a read of the node.
Use tlmm_tz to skip those gpios locked by TZ such as 111, 126.
Change-Id: I99810d8659ab8ea4a59029a9cea326f93becefd2
Signed-off-by: yangjq <yangjq@mt.com>
Reviewed-on: https://gerrit.mot.com/960741
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1172239
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1340934
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1362061
Reviewed-on: https://gerrit.mot.com/1453714
Reviewed-on: https://gerrit.mot.com/1509727
Reviewed-by: Wang Wang <wangwang1@mt.com>
Cherry pick this commit from Defto print "PM: suspend" with
wall time when enter and exit suspend.
Change-Id: I92f252414c013b018b9a392eae1ee039aa0e89dc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: yangjq <yangjq@mt.com>
Reviewed-on: https://gerrit.mot.com/1477734
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509726
Reviewed-by: Wang Wang <wangwang1@mt.com>
From (CR)
This app manages secure state as set by bootloader. Reloading would
clear the state. This solution is limted by some alternate
way to force unloading our prov TA and then restarting it
outside bootloader.
Change-Id: Idcfc520f457ac081fd63e76a821d047ee9a78d09
Reviewed-on: https://gerrit.mot.com/1284363
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Joel Voss <jvoss@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1349396
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1471673
Reviewed-by: Yang Xiao <xiaoy3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509724
add two debug interfaces:
1.when set cmdline "sys_restart_mode=warm", the kernel will reset with
WARM way.
2.when set cmdline "sys_restart_mode=panic", the kernel will enter into
ramdump when it normal reset.
Change-Id: Id70063bac7d0951622c6e074c2ba2ec024374022
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1117501
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1345290
Reviewed-on: https://gerrit.mot.com/1406867
Reviewed-on: https://gerrit.mot.com/1463612
Reviewed-on: https://gerrit.mot.com/1509723
Print system timestamp on Power key press and release events.
This would make debugGing easy
Ported from: https://gerrit.mot.com/#/c/1320467/
Change-Id: I2c810e4b59c2d3bd8a705d407a339d9efe6fad3d
Reviewed-on: https://gerrit.mot.com/1320467
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1456668
Reviewed-on: https://gerrit.mot.com/1509721
Reviewed-by: Wang Wang <wangwang1@mt.com>
Do not dump GPIOS that are not allocated by HLOS. This is a temporary
change to avoid TZ exceptions.
Change-Id: I7b231457d186cbdc0a900b153bc8b09e9ccffddd
Signed-off-by: Dmitry Ornatsky <cdo021c@motorola.com>
Reviewed-on: http://gerrit.mot.com/808904
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1230533
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaopeng Li <lixp5@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1400180
Reviewed-on: https://gerrit.mot.com/1436604
Reviewed-on: https://gerrit.mot.com/1509717
Reviewed-by: Wang Wang <wangwang1@mt.com>
Add dynamic aspect to the status property. Conditional status
references another property and changes availability of the device
node based on the value of the referenced property. This allows
to manipulate the device tree at boot. For example, change availability
of certain devices based on a property set by the bootloader under
"/chosen" node. Syntax allows partial match of specified property
value by adding keyword "contains" in front of values list.
Propagation of (CR).
Change-Id: I3a69fe1b95c2e140feff54edb7048a5610a94d0c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1439246
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509716
Reviewed-by: Wang Wang <wangwang1@mt.com>
After cold reset is introduced, the phone is cold reset instead of
warm reset, such as panic. In this case, the power up reason saved
in shared memory will be lost. Consequently, the power up reason on
next boot up time will be normal boot instead of correct ones. To
resolve this issue, we can use the two spared pmic registers which
are power lost safe to save the restart reason for these cases.
Motorola definition of AP panic bit set in extra info pmic reg
conflicts with QC definition of Warm reboot bit set in extra info reg
move Mot bit to available position to avoid conflict
Force a cold reboot for the command "adb reboot bootloader"
to avoid the warm boot when user tries to continue boot from boot menu.
For early kernel panic before PMIC is initialized, the function
qpnp_pon_store_extra_reset_info will fail. Need to set IMEM flag
for fail safe in this case.
For post-panic, post-wdt, post-pmicwdt reboot, we do cold reset.
And set the PMIC register accordingly, to nofity BL the special
reboot behavior.
Configure panic as warm restart, so that we have chance to get panic logs.
According to SR 01277290, 0x88D and 0x88E are spare registers for PMIC
where we could store oem specific reset information
Ported from: https://gerrit.mot.com/1446282
Change-Id: I6704c801435c6586dbe64259c214dcdc926b07cf
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499584
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Export some pmic-voter interfaces for dlkm usage as well
as create access functions that are exported for dlkm to
manipulate the struct.
ported from https://gerrit.mot.com/1200744
Change-Id: I073a4e976f8cd184fa20b262eba9bc962a4a1bb2
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499583
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Moto kernel config does not really take effect during
building MSI.
Set to PRODUCT_SPECIFIC_DEFCONFIGS to KERNEL_DEFCONFIG,
So that MSI build can commonize.
It's for build failure
+++
FAILED: ninja:
'kernel/msm-4.19/arch/arm64/configs/vendor/ext_config/moto-kona.config',
needed by
'out/target/product/msi/obj/kernel/msm-4.19/mapphone_defconfig', missing
and no known rule to make it
ninja failed with: exit status 1
+++
Change-Id: I59710763d8a88a89e6e592dcfde53c7e5486d195
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Add ext_config feature to extend qcom's defconfig
There make files can compose some kconfig files into one
Change-Id: Ic1444100f61300e7ee16a81c73afde3dac81da0a
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499581
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Introduce a new configuration MMI_DEVICE_DTBS that will allow the
target to only build Motorola devices.
Ported from: https://gerrit.mot.com/#/c/1066190
Change-Id: I3e787432777c282b63cb3619d47f78a5b93964a5
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499580
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Performance counter values need not be retained across contexts unless
specifically requested for debug. Zap the counters by initialising
perfcounter SRAM with 0's using GPU_RBBM_PERFCTR_SRAM_INIT_CMD.
Add pm4 packets during context switches and add a KMD postamble packet to
clear the counters during preemption. Do not enable perfcounter save and
restore unless requested.
Change-Id: I371779ce659c07a1cc664327f5ecdcf0374201d8
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
Currently performance counters are global and can be read by anyone. Change
the behaviour to disable reading global counters as default and add a sysfs
node to enable/disable reads.
Change-Id: Ic3785acd9bd7425c2a844ed103d7b870d9f80adf
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
Add SOC ID to support socinfo for KhajeP and KhajeQ platform.
Change-Id: I42767dae086754adbd306d96c479e9c67f04712c
Signed-off-by: Ashish Bhimanpalliwar <quic_abhiman@quicinc.com>
This change is to keep the device to autosuspend only if runtime PM
status is not suspended. SPI driver resumes only if runtime PM is
active, if framework calls unprepare_message/unprepare_hardware and
if we try to keep driver to autosuspend, it may result into negative
usage count.
Also ensure for the PM calls, runtime is always enabled and if not, do
not call PM.
Change-Id: I701cbfbefb3a05ecbb99bf490e2b41b73fbaa897
Signed-off-by: Anil Veshala Veshala <quic_aveshala@quicinc.com>
WLFW qmi server arrive event posted and comes server exit event
as there is a shutdown triggered due to reboot. Hence do not process
WLFW qmi server arrive event.
Change-Id: Ic5d75cc245f6b4caf7987031bfe117236e93f54e
Signed-off-by: Nirav Shah <quic_nnshah@quicinc.com>
Add a new feature flag that drivers can use to advertize support for
Operating Channel Validation (OCV) when using driver's SME for RSNA
handshakes.
Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
Link: https://lore.kernel.org/r/20200720074225.8990-1-vjakkam@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-repo : git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Git-commit: fd17dba1c860d39f655a3a08387c21e3ceca8c55
CRs-Fixed: 3126204
Change-Id: I6329b0ccc85a7bc83ded040673a24506e96ae459
Signed-off-by: Narasimha Rao PVS <quic_npvs@quicinc.com>
This change ensures the no value in the DT gets validated correctly
and works well with default data.
Change-Id: I45fcf3b06c17adbe4b81523de3c55c5014aa8b9c
Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
There is a chance that userspace cooling device cur_state or
min_state sysfs node can request any random value. It may be
a value greater than max supported state. In that case if
cooling device is not bailing out, cooling device stats module
may behave unexpectedly.
Validate whether cur_state or min_state request is within the
range of max supported state or not for each cooling device.
If it is greater than max_state, bail out for that request for
different cooling devices.
Change-Id: If6422327b2bf4235617203588a5fe5805bf918f2
Signed-off-by: Gopala Krishna Nuthaki <quic_gnuthaki@quicinc.com>
F_FS function driver allocated ffs_eps and updates ffs_ep->ep
to corresponding usb_ep during func->bind and never clears it.
On bind it also saves ffs_ep context in epfile->ep.
During func->disable, it clears only ffs_ep context in epfile->ep
and on func->unbind it frees ffs_eps memory.
ffs_epfile_io routine currently relies on ffs_ep->ep (which is
never cleared and ffs_ep could be freed on unbind) to detect any
disconnect during active IO. This can result in various issues e.g.
use after free use of ffs_ep if unbind finished before epfile_io
could resume or "stop adbd" trying to dequeue a freed USB request
when epfile_io could execute only after F_FS got disabled as
'if (ep->ep)' check would be TRUE.
Fix this by checking stored ffs_ep context against latest epfile->ep
to figure out if endpoint got disabled or changed before acquiring
spin_lock.
Change-Id: I6bdcdf0dff0813ed7b2af8c24f544a22796b0369
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Ensure dci client's tag used is a valid one by validating against
its status before sending the dci packet to client.
Change-Id: Ia673e8b548e441eb907820dc395c22b7f1b75d10
Signed-off-by: Manoj Prabhu B <quic_bmanoj@quicinc.com>
Initialize fsa4480 blocking notifier chain head as per the
lockdep annotation to fix the warnings with LOCKDEP enabled.
Change-Id: I771b0d9e1a9c1d28cd9b5bee2d7695ff95178db9
Signed-off-by: Puneeth Prabhu <quic_pprabh@quicinc.com>