Commit graph

916,439 commits

Author SHA1 Message Date
mahj8
e6f4e4aa6f kernel: unit power off failed when removed charger
unit power off failed when removed charger in factory mode.
Because google android R define CONFIG_STATIC_USERMODEHELPER
and CONFIG_STATIC_USERMODEHELPER_PATH = "", so sub_info->path
is always empty.

Change-Id: If06b3a52e657e083ce89f2f75f717c753a57d685
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1899604
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
mahj8
48cc6284d8 Revert "(CR): arch/config: disable CONFIG_STATIC_USERMODEHELPER"
This change is not need. Because we have changed the code
to reach the goal at https://gerrit.mot.com/#/c/1899604/

Mot-CRs-fixed:(CR)

This reverts commit d80c7cd6d49b21e72e2b91e9e5c556dbeb5b5e85.

Change-Id: I3a58e7d0153f0751f2e8714669683a980b1bf736
Reviewed-on: https://gerrit.mot.com/1900615
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
quebs2
e81049289e Fix instability issue during tbase load in Kernel 5.4
Tbase load was failing intermittently during fc_init() operation
in __smc() with error:
Trustonic TEE: ERROR -14 __smc: fc_init failed (4dee8000)

The root cause has two components
1- qcom_scm_call() needs to be done atomically. Task reschedule was
   causing a failure. Thus changed to the atomic call qcom_scm_call_atomic().
2- Qcom scm_call requires cache maintenance. API attests that any buffers
   that are expected to be accessed by the secure world must be flushed before
   invoking qcom_scm_call and invalidated in the cache immediately after
   qcom_scm_call returns. Cache invalidation was missing, hence add it.

Change-Id: I83139fc5110eb3af536a30800c994c8e451df1fa
Signed-off-by: quebs2 <quebs2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1899491
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
louhs1
731c495e28 kernel/config: append extra config for project
if a prject need extra config, please add to the extra config
for example:
  moto-holi-ibiza-cmcc-extra.config
match TARGET_PRODUCT_TYPE:
  cmcc
  factory
  retail
  ...
Change-Id: I6157eee802bfe4cd11c5d6b76b518b04353c9c27
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898417
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
louhs1
aee7b39c18 arm64/config: add ibiza cmcc extra config
add the extra config for ibiza cmcc project
please add the different config here for cmcc unique request.

Change-Id: I98af3946c12ce4036072a691d11e82aa3c12750f
Signed-off-by: louhs1 <louhs1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1898418
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
linyx10
adc9d546d5 Add new smc invoke interface for Trustonic TEE driver.
In kernel 5.4, the old qcom interface scm_call2() has been abandoned, so
add new function trustonic_smc_fastcall() for Trustonic TEE driver module,
and it will send syscall to the secure world through new qcom scm interface.

Change-Id: Ib76c00e9910be6796fc71bdcfaf4352fd8f2806c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1836283
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
linyx10
07f8b5f50a Add the ABI required by mcDrvModule.ko to qcom gki whitelist.
These ABI are used in mcDrvModule.ko and they have been added to GKI whitelist,
so add them to qcom whitelist:
  d_path
  get_task_exe_file
  get_task_mm
  ktime_get_raw_ts64
  mmput
  release_pages

Change-Id: If1d64546756b658e4e726ee8abef452d79a9aa5c
Signed-off-by: linyx10 <linyx10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1892816
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Binsheng Que <quebs2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
Nick Desaulniers
3dc89329ea tracing: do not leak kernel addresses
This l(CR) breaks tracing tools l(CR) trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
MOT-CRs-fixed: (CR)

Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Reviewed-on: https://gerrit.mot.com/1887836
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1892775
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2024-04-18 14:45:02 +08:00
zhucc2
f559241762 mmc: use max discard ignoring max_busy_timeout parameter.
On kernel 4.14, no matter sd card type, all use max discard value.
However, kernel 5.4 remove this logical, and will cause system watchdog,
if user format 512GB/1TB class 10 card.

Change-Id: Idc6b00187b8800465fca4af8f720aaf87db5700b
Reviewed-on: https://gerrit.mot.com/1890338
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:02 +08:00
wangyq13
a9db7a2843 defconfig: holi: enable coresight configs for qdss
defconfig/holi-debug:
Enable coresight configs for qdss.

Change-Id: I0d779a9fbd9c093d57c6f49862b41359912d321d
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1863643
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangyq13
617a485189 qcom-wled: disable cabc only when adjust to low brightness
Disable cabc only when adjust to low brightnss.
Don't disable cabc when screen off/on, this causes big
voltage issue on pm6150l/7150l.

Change-Id: I510ea8d1e3de1cee1a612fec6a08d50792b8b0af
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1873482
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
445dbcd415 Revert "(CR): enable zram writeback kconfig on SM4350"
Reason: zram-writeback will make 3 side effects
  1. Swapcached too large
  2. May cause CTS fail
  3. May cause panic

This reverts commit db753c431b0b778e4f1824efe79718b5e3864839.

Change-Id: I61c6d2eb0222d8bd4d749971bdf5ccaacee854ab
Reviewed-on: https://gerrit.mot.com/1873703
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
fuxm1
7dd7895691 set max_timeout_counter to 0 for large card do BLKDISCARD
Remark:
vold doformat() will call ioctl(BLKDISCARD) before unmount
this blocked sdhci layer for current driver.
So, set max_timeout_counter to 0 to ensure larger discard size by
always setting max_busy_timeout to zero.

the change is from temp patch drop by QC SR:05069564
next QC drop will include the formal patch. that time we can
drop this commit.

Change-Id: I2950b42c01e04bd9cfb9a2a739d00cd35da800f3
Signed-off-by: fuxm1 <fuxm1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1868453
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
huangzq2
cefa302004 disable watermark boost
Disable watermark boost on kernel 5.4
As it is not working fine

Change-Id: I7f13f763382f1a54616079bc8258997c7f732d91
Signed-off-by: huangzq2 <huangzq2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1625704
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit d391f5c240aa5d5bb196c6b4c1e21c17b46f069a)
Reviewed-on: https://gerrit.mot.com/1630007
Reviewed-by: Debora Raimundo <dromano@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1783219
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
2024-04-18 14:45:01 +08:00
jiayh2
41dca8df83 enable zram writeback kconfig on SM4350
Enable CONFIG_ZRAM_WRITEBACK config
  This config allow zram writeback

Change-Id: I089985d2f82478e37ad85a5d65149b03c4254885
Reviewed-on: https://gerrit.mot.com/1856194
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
chailu1
45cfb22658 charge: modify charge done condition by mmi charge full
mmi charge decide charge terminal current. So modify charge done
condition by mmi charge status. Otherwise could not got correct
charge done status.

Change-Id: I3f41582518bbb83bca9f5519a65f7ce311835b91
Reviewed-on: https://gerrit.mot.com/1850451
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
cf0e6955f7 qg: add bms voltage ocv prop node
add bms voltage ocv prop node
for battery parameter test

Change-Id: I2956fe82c95311d7d76f408cda8295dc93bd3784
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1848075
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
duqiu2
7555c913a7 wisl: ibiza: Modify nfc driver to ko module for GKI issue
GKI image should not support nfc. Nfc dirver is built to our kernel.
And nfc can't work after flashing GKI. So we change the nfc dirver as
a ko module.

Change-Id: I602e308fb636695aa6a4969341324bae11dca385
Signed-off-by: duqiu2 <duqiu2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1846765
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bin Liu <liubin7@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
chailu1
56a85f8a0d smb5-lib: Update USB ICL for USB phy speed
Override the SDP current if it needs to increase for SDP USB2.0 500mA
or USB3.0 900mA.

Porting from (CR)

Change-Id: Ib0136a2674e8f9ac6e7e5646a82052971a4bbf08
Reviewed-on: https://gerrit.mot.com/1836523
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangxf14
517749f766 drivers: rtc: revert debug log from rtc module
According to debug, denver's unexpected RTC reset was caused by
PMIC issue. So I rever the monitor change.

This reverts commit 2a62d1dc1ccb40b698b33d4cff83f8cdf3d4c95c.

Change-Id: I6ef1049ccdfd32b1f12df3aef748c5755a469a64
Reviewed-on: https://gerrit.mot.com/1831952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
f7c3400a64 QG: qg prob must after rtc prob
qg use alarm timer, so qg must prob after rtc prob.
when qg can't get rtc dev, return -517 to retry.

Change-Id: I36603856536505c52151d8ef7d685b4ccc3e96e6
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1825304
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
73a0d9455b kernel: remove export symbol in pmic-voter.c
Because GKI, pmic-voter.o is included by both qcom-qpnp-qg.ko
and qpnp-smb5-main.ko, so can't export symbol in pmic-voter.c

Change-Id: I3c9266531de4a4e2461e872bade0bd7dfcaa0eec
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1822938
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
mahj8
303f09a9d1 kernel: export some api symbol of pmic vote
Export some pmic-voter interfaces for dlkm usage as well
as create access functions that are exported for dlkm to
manipulate the struct.

charging DLKM need some api of pmic vote, but pmic_voter.o
is included by both qpnp-smb5-main.ko and qcom-qpnp-qg.ko,
KMI don't allow double export one function in two DLKM modules.

Change-Id: I56f96b663d9ee2228d91bd2efc6977a13f270de4
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1822930
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
jixj
d49939332d ion: dmabuf improve debugfs
it will cause ion related ABI CRC mismatch, wrap
CONFIG_DEBUG_FS for them

Change-Id: I162143205847323eaa0fbb52e7b337607e57b07a
Signed-off-by: jixj <jixj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1825354
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Chuanchun Zhu
e4ecf9469c Revert "(CR): mmc/sd: Add sys entry to read card speed"
This reverts commit ed5f0747d0723d8fd5ac93aea375d503642a5537.

Change-Id: I9ea66b3e6d66098466e0a4bad547ae9935452943

Mot-CRs-fixed:(CR)

[3.312547] init: Failed to insmod '/lib/modules/5.4-gki/cqhci.ko' with args ''
[3.319900] init: LoadWithAliases was unable to load /lib/modules/5.4-gki/cqhci.ko
[3.327496] init: LoadWithAliases was unable to load sdhci_msm
[3.333348] init: moto LoadListedModules failed sdhci_msm

Change-Id: I9ea66b3e6d66098466e0a4bad547ae9935452943
Reviewed-on: https://gerrit.mot.com/1824484
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
wangxf14
c6852b254e drivers: rtc: add debug log into rtc module
According to the guideline from Qualcomm support, I add RTC log
in kernel so that we can trace the issue from unexpected RTC reset

Change-Id: Ia26f18ecebcf7627df167dd146582717c8e3414c
Signed-off-by: wangxf14 <wangxf14@motorola.com>
Reviewed-on: https://gerrit.mot.com/1824238
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
1ed2acbc2c Revert "(CR): Ibiza remove kernel config for PASR"
Remove PASR will impact GKI
  So revert the changes

This reverts commit 8cd7ac5016d01623b92c01e2485640c155938330.

Change-Id: I587650c4b5fdb7474c98fa0754e51d4fa917b24f
Reviewed-on: https://gerrit.mot.com/1823952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
Yonghui Jia
9f2edd3674 Revert "(CR): Denver remove kernel config for PASR"
Remove PASR will impact GKI
  So revert the changes

This reverts commit 5e0fa830adf5aa819732004a1e30dfd31e024c42.

Change-Id: Ie06043ef33418c59daf881cc2296522b57f9b824
Reviewed-on: https://gerrit.mot.com/1823951
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:01 +08:00
liuyc20
4a8c8cd617 Revert "(CR): configure cfi permissve for user build"
This reverts commit f371f58ee5306333560fb67bfdec51145059087a.
correct usb_ether_xmit API return value type

Mot-CRs-fixed:(CR)

Change-Id: Ifa420b2e0a3ef17d1900be1b45790c9d8599a160
Reviewed-on: https://gerrit.mot.com/1818887
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
zhucc2
cc220ff68a arm64/config: enlarge kernel log buffer size.
CONFIG_LOG_BUF_SHIFT is default set as 17 =>128KB, however,
for sm4350, 128KB is not enough, after bringup, early bringup kermel
log is overwrite, we have to enlarge the valuse to 18=>256KB, to make
kernel bringup log complete.

Change-Id: Icae1058520b73fc0b979efa5977b5bdce73604a0
Reviewed-on: https://gerrit.mot.com/1817725
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
4100bb2c01 gki: add orderly_poweroff api for mmi-smbcharger-iio
add orderly_poweroff api for mmi-smbcharger-iio
LKM

Change-Id: I65873ce599f651cce2350131606166fa8427f39b
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1817449
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
1fbec1a378 arch/config: disable CONFIG_STATIC_USERMODEHELPER
disable CONFIG_STATIC_USERMODEHELPER in userdebug
and factory version for orderly_poweroff api can work.

Change-Id: Ic71a8471cfd4228d32556f898eaecbbc6ec40b17
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1817533
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
liuwang2
5b298f511c ion: dmabuf improve debugfs
Improvements made to ION to add an additional debugfs file
to display allocation/reference information for all ION buffers.

rb tree was deleted becaused of unused, add it back to track
ion buffer alloc.

Migrated from (CR):
https://gerrit.mot.com/#/c/1535657/
https://gerrit.mot.com/#/c/1535658/

Change-Id: I1e42d3dac61d4fc856ba8d749cfd2123e40529d9
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1811670
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
jixj
c1649eb8f9 power/reset: Fix "hw_warmreset" can't be set
Fix https://gerrit.mot.com/1778586 propagation error.
The "reason" is default PON_RESTART_REASON_UNKNOWN (0),
At the end, QC will set restart reg with "reason" so this reg
will be override to 0

Change-Id: I3a0092edb6a29a1d3edd9fa79428115b7c590ffb
Reviewed-on: https://gerrit.mot.com/1808858
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
jixj
5e978368a5 power/reset: store extra reset info in panic_prep_restart()
On sm4350 R,the priority of do_msm_restart is 200,the priority of
restart_wdog_handler is 255. when kernel panic happens,
restart_wdog_handler will be invoked first and trigger a watchdog,
but do_msm_restart will not be invoked so bootloader can not read
reset info.
The panic notifier (panic_prep_restart) still invoke, so store the extra
reset info for kernel panic

Change-Id: Ia263ebfb2eda4424555ddb937239325048ea846f
Reviewed-on: https://gerrit.mot.com/1809656
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
liuyc20
4630d35724 configure cfi permissve for user build
As CFI will panic at moto_usbnet module in user build,
so configure CFI permissive for moto_usbnet in factory mode.

<4>[   36.691491] Workqueue: ipv6_addrconf addrconf_dad_work
<4>[   36.696653] pstate: 80c00005 (Nzcv daif +PAN +UAO)
<4>[   36.701478] pc : __cfi_check_fail+0x14/0x18 [moto_f_usbnet]
<4>[   36.707080] lr : __cfi_check+0x340/0x390 [moto_f_usbnet]

Change-Id: I66990320048ee2150afb03f0b97a61806a908224
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1808698
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
zhucc2
3b09b35036 arm64/config: remove some configs on debug version
For improve debug verison performance, remove some unnessary configs.
If some guys need debug the special issue, need enable them at local.

Change-Id: I120b4fdbd03fc72d61825c708897b90d2ef38b2e
Reviewed-on: https://gerrit.mot.com/1807723
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
zhucc2
55237e2db5 arm64/config: remove slub debug configs on debug version.
For kernel usage is higher if enbale slub debug configs, we remove them
to improve the debug performance.

Change-Id: I45543d406ef24c324a5ae9ba768ad809b3e23542
Reviewed-on: https://gerrit.mot.com/1805306
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
5aa83849c7 smb5: add dcp max current config by dts
some product all sku inbox charger is 10W, so don't
need config usb_dcp in vhw.xml.
add dcp max current by dts to config all sku.
some product which don't have 10W charger in all sku
can overlay dts by mmi,usb_dcp in vhw.xml

Change-Id: Ie9ddb6c47d42b039d6bfe306e1263168688dac36
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1804249
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
chenyb1
71fbd43f47 Thermal: Fix Thermal Compiling Error.
Add " thermal_zone_device_unregister" to fix compling error.
Specific for user build

Change-Id: I6a872ea85ce6bb856a73b5e40dd34c72d3abb016
Reviewed-on: https://gerrit.mot.com/1804395
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
e9b26c8a46 pd: fix vbus can't reach 9V with PD charger
fix vbus can't reach 9V with PD charger
the return value of pd_get_pdo is 0

Change-Id: I811a94d8d81e2e09df440e04cf8c78b60e34cb16
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1803288
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
jiayh2
b5163438f3 Ibiza remove kernel config for PASR
kernel configs enabled to support PASR which can hotplug RAM banks
we don't have multiple RAM slots in devices, disable this feature
to avoid potential performance penalty

Change-Id: Ibd1d5d3837a39a1d0ce90da49b40861f128aeb2a
Signed-off-by: jiayh2 <jiayh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1801914
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
jiayh2
da25847246 Denver remove kernel config for PASR
kernel configs enabled to support PASR which can hotplug RAM banks
we don't have multiple RAM slots in devices, disable this feature
to avoid potential performance penalty

Change-Id: I399b0e45001679c7650715600cdbbc9fb8f75476
Signed-off-by: jiayh2 <jiayh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1786864
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bingqian Yang <yangbq1@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
wengjun1
864ead901f Revert "(CR): workaround for the error of "__symbol_put " undefined"
Now we don't use touchscreen_mmi in br-4350,
so this change is not necessary for us.

This reverts commit 899bedf4ac94d0c1b3769787d779226d107655f6.

Change-Id: I59f0ec8474350f2a796f9446c5cb9b1d77e9df9e
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1799286
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqiu Huang <huangjq9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
wengjun1
34153b6226 Update qcom whitelist for chipone touchscreen
The "rt_mutex_lock"  and "rt_mutex_unlock" functions can
be found in the latest google whitelist, so update the qcom
whitelist for chipone touchscreen.

Change-Id: I01c538b544d130b7c0dfe6999219c9af7fd8836f
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1797282
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqiu Huang <huangjq9@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
cc019a95ff qpnp-qg: Add CHARGE_NOW psy property in qpnp-qg
Add charger_now property into bms psy for battery health
test

Change-Id: If51f2396d06cdb13c75f306c6869ead12dd11e62
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1797305
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
mahj8
31762154d1 bcl: enable charger bcl feature
When SOC < 10% will mitigate CPU.For improved performance,
at turbo charging scene. will not mitigate CPU.

Change-Id: I593542e735c11227192367327d8aeaf51a03a06d
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1795816
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
liaohj
076ab2592b qcom: whitelist: Add necessary api for aw882xx dlkm
add "flip_open/filp_close" white list for aw882xx
All of them could be found in the latest abi_gki_aarch64*.xml file.

Change-Id: Ia89d6371a7c097dee12fa78dd9d5acb72e2f581b
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1794660
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:00 +08:00
Haijian Ma
b6a7ab72bd spi: disable_depth > 0 when pm runtime get sync
Port the spi changes from bq-6125.
    when unit suspend, pm_runtime_disalbe() would be called. And
    then dev.power.disable_depth number will +1. And its value
    will be -1 when pm_runtime_enable() is called.
    And if spi bus want to work as soon as system resume, it will call
    pm_runtime_get_sync(), which would check the value of
    disable_depth. If its value is not 0, spi operation will fail.
    The sequence is as following:

    runtime_suspend
    pm_runtime_disable()-> disable_depth +1
    rumtime_resume
    pm_runtime_eanble() -> disable_depth -1
    spi_sync()
    pm_runtime_get_sync -> check the value of disable_depth

    But for sometimes, spi operation will earlier than pm_runtime_enable()
    called. Then spi_sync() will fail duel to non-zero disable_depth value.
    So we add a checking logic before pm_runtime_get_sync() to make sure
    disable_depth is 0.

Change-Id: I673363bfd861402b5c54874137b12700ef2df14d
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1793166
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:59 +08:00
Wei Wei
e008ef1062 Revert "(CR): arm64/config: support UAS of usb storage"
This reverts commit 23cf0cbef716d48c3cc0a8f8382da9c0e9e586eb.

Change-Id: Ia984f65f4a69503041c0d75fb20843d16cfe38f1
Reviewed-on: https://gerrit.mot.com/1792953
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:44:59 +08:00