Commit graph

610 commits

Author SHA1 Message Date
Weilong Wu
eaccb4e597 aw8695: add awinic haptic driver
Initial aw8695 DLKM code.
It is new awinic haptic driver IC.

Change-Id: I834e4cbcade93c6e8fd2e22bd7a8fa6b9d43131c
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1309272
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit d8615210fadad3fd9b9aae9b95ed2d0f7d6c3577)
Reviewed-on: https://gerrit.mot.com/1365541
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
2019-06-03 20:05:16 -05:00
Yonghua Yan
8b392dc3b8 power: add current_max to get effective fcc
Add current_max property in battery supply to get the
effective FCC value.

Change-Id: I2a9dd33a42bfc248518db7447c8bc5cd322be5e8
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1364670
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-31 23:12:41 -05:00
Yonghua Yan
9519f45eea power: Rerun AICL if charging disable/enable
It is found that the USB settled ICL drop down when battery
charging is disabled for full charge, but the ICL does not
adaptively increase for incremental system load or recharge.
In that case, it draws current from battery even a charger
is attached.
In order to recover from that situation, rerun AICL is an
effective way to recover the USB ICL.

Change-Id: Ic08691817bb51276187db558cdd5addd07fc85f0
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1364085
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-31 23:12:34 -05:00
Yonghua Yan
5889409334 power: Disable HW JEITA for PMI632
As the h/w JEITA is enable by default, which will impact
the thermal charge profile in qpnp-smbcharger-mmi driver,
so disable it.

Since the h/w JEITA is not used, and mmi thermal charge
profile is used, the battery health in qpnp-smbcharger-mmi
driver should be used as the battery health property.

Change-Id: I53b8a7739f6c94307e076aad6e9234a3149db494
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1362570
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-28 21:47:55 -05:00
haojl2
3399eeb923 fpc1020: Enable fpc class device only for multi fp.
Enable class fingerprint only when multi fingerprint sensor enabled.
Do not change if only has one fingerprint sensor.

Change-Id: I90c85ba3399241d7652f164603cf7f571ab98118
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1356399
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Tested-by: Jira Key
2019-05-23 22:18:46 -05:00
haojl2
53483bf12b fpc1020: Create sysfs before irq enabled.
IRQ handler will notify sys entry.
So must create sys entries before irq requested and enabled.

Change-Id: I6596866a19bMontana779536eb71147810cd13c9528f
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1354629
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/1356392
2019-05-23 22:17:54 -05:00
Qiuliang Cheng
cf3f5de761 FPS.FPC.driver: Make uevent for sysfs node creating
motorola/kernel/modules/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c:
Change device_create() calling to device_create_with_groups() calling.

To make KOBJ_ADD uevent to be aware of sysfs node creating,
device_create_with_groups() but not device_create() should be called.

Change-Id: Idc85caedc7ad770791b893f4c4d65753e2e9b1c6
Reviewed-on: https://gerrit.mot.com/1352027
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356391
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-05-23 22:17:14 -05:00
haojl2
2bc6445321 fpc1020: Add vendor sys entry
This sys entry shows current fingerprint vendor.
This info is useful if multi fingerprint vendor exist in one product.

Change-Id: I77a97745802c30bb319ed3b62fc222101f6ac6ff
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1340583
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1322013
2019-05-23 22:15:05 -05:00
haojl2
195a31feef fpc1020: Move sys entries to class device.
As fingerprint HAL need read and write fpc1020 sys entries, so those
sys entries need change owner and group to system.

If DLKM is used, after rmmod and insmod fpc1020 kernel module again,
owner and group will be root again for those sys entries.

One way to fix this is set those sys entries owner and group in
uevent.rc.
uevent.rc need be triggered by a device add uevent. So create a
fingerprint class device and move original sys entries to a class device

Change-Id: I890eb93a616973e2a454be0fea494206c066cc25
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1340582
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/1318460
2019-05-23 22:14:56 -05:00
haojl2
38493352f1 focaltech_0_flash_mmi:Fix TP Firmware Recovery Failure Issue
Update TP FW check value.
This is defined follow TP FW.

Change-Id: I29ae73a9a884bc6ee18caeecc08523075f925f51
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1354712
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/1356398
2019-05-23 21:52:35 -05:00
haojl2
e257b23ca8 focaltech_0_flash_mmi: Add sys entries for moto FW update
moto touch firmware update need some sys entries to accomplish this work
Add those entries.

Change-Id: Ib6789e04ba888f9ee53b7cbc00abe981b8f707c8
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1346254
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356397
2019-05-23 21:52:27 -05:00
haojl2
485e090b13 focaltech_0_flash_mmi: Update FW to 03
Update focaltech FW to 03 version.
To fix report location not accurate issue.

Change-Id: I6ae88cf0ca9f4cecf5b9e2a84735b021ad385a34
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1342385
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/1356396
2019-05-23 21:52:20 -05:00
haojl2
5eeb5c0464 focaltech_0_flash_mmi: Add touch class sys entries
Add touchscreen class sys entries.
Those entries contains IC info, which is used by FW upload
and CQA test.

Change-Id: Ie599eb3974ebc0e1ff8df1b14e25acc9b52172a6
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1342368
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356395
2019-05-23 21:52:11 -05:00
haojl2
dbeabe11a5 focaltech_0_flash_mmi: select IC based on device config.
If FOCALTECH_TOUCH_IC_NAME defined in device.mk, use this to select
different IC.
Default option is ft8719

Change-Id: I9ef108d26d1fc8aae8f63f7d2b65fff0680633e9
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1341266
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/1356394
2019-05-23 21:52:04 -05:00
haojl2
7be10a9a86 focaltech_0_flash_mmi: Bringup focaltech 0 flash IC.
Focaltech 0 flash IC using SPI bus only.
This driver code can not compatible with focaltech_mmi.

Change-Id: I830f01869955f5335d65fbd8a56a5ffb4f4eeff0
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1338744
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 1533298c042f32dbab364e55a044cd8bcaa76781)
Reviewed-on: https://gerrit.mot.com/1338939
Reviewed-on: https://gerrit.mot.com/1356393
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-05-23 21:51:53 -05:00
Yonghua Yan
809a55ee88 power: battery wakelock prevents system suspending
This issue is due to the race between power_supply_changed()
and smb_mmi_power_supply_changed().

First, power_supply_changed() holds the battery wakelock and
releases the wakelock if battery supply change work is scheduled.

And then, qpnp-smbcharger-mmi driver set the supply changed flag
to be true, call smb_mmi_power_supply_changed() and wait for
battery supply change work completion, where it does not release
the wakelock as the supply changed flag becomes true.

Finally, the battery wakelock will not be released any more.

Change-Id: I57f4728cb6510acce004d5d84489695035c10eaf
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1357520
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-21 20:43:58 -05:00
guoyf2
35ff849a25 NXP patch to fix earpiece no sound issue
NXP patch to fix (CR)

Issue description:
No sound issue has been found in handheld mode
in one of Moto Projects, SurfNa project(tfa9871,
driver code Ver6.5.0). About 1/600 chance

root cause:
If set SBSL=1, the AMPE usually can be AMPE=1 automatically.
But sometimes can’t be set AMPE=1 by itself.
So AMPE must be set to 1 manually in code.
Dependency on automatic AMPE setting is not a wise way.
In driver 6.5.0, there’s no code to set AMPE during profile switch,
but boot up sequence has already been added.

Solution:
Add AMPE=1 operation in profile switching


Change-Id: I3de27e826d39c93f2d011d0f9d8fe9877e8efc89
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1358094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-21 04:28:12 -05:00
Yunfei Guo
af366d4dc6 Revert "(CR): SurfNA: Add NXP smartpa log"
This reverts commit 1e4c87d6ebc458a1f40a5b7dbff7d1fa9e1a1001.

Change-Id: I6fa7f78125fdc72cd41d4ba35d96a04ebbb37c8c
Reviewed-on: https://gerrit.mot.com/1357969
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Submit-Approved: Jira Key
2019-05-21 02:50:51 -05:00
Yunfei Guo
52d301d6de Revert "(CR):SurfNA: earpiece no sound"
This reverts commit 21c63bd2b7406151248931be4991e86d5dba3c53.

Change-Id: I7ee0c40c0494d5a2a580091e6a9f270677961629
Reviewed-on: https://gerrit.mot.com/1357966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-21 02:46:02 -05:00
huangys
1e7204e942 audio: remove Cirrus code to vendor/cirrus/audio/dlkm
Cirrus has their own code release branch. and these branches are
not compatible each other. audio team can't branch off motorola
kernel modules

Note: cs4012 and msm-cirrus-playback had not beeen moved away.

Change-Id: Ib14bf3c5a5cfaa9c363a59c4ba0f871e11e9c92a
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1350673
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-05-20 21:39:12 -05:00
Yonghua Yan
9e4148ece0 power: Set charge_control_limit writable
Thermal Engine uses the charge_control_limit to trigger
the charge mitigation, so set it to be writable.

Mot-CRs-fixed: (CR)

Change-Id: Ie529b0969c46afcfb190c5524fe862059522385c
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1353035
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355886
2019-05-20 10:03:32 -05:00
Yonghua Yan
2b419819b4 power: Skip recovery of boost reverse for suspended usbin
There is no need to do boost reverse recovery if the usbin
has already been in suspend state.

Meanwhile, this avoids the incorrect usbin suspend state
being written back after boost reverse recovery if usbin is
in suspend state before boost reverse recovery through
force_chg_suspend in factory test.

Mot-CRs-fixed: (CR)

Change-Id: Id172860862482d4f9e19505320e854b17a7610ce
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1352348
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355885
2019-05-20 10:02:50 -05:00
Yonghua Yan
6ef5c86105 power: force hvdcp 5v charging
Only allow hvdcp 5V charging for QC2.0 and QC3.0
chargers, and increase hvdcp voltage within 5.5V
to maintain stable 15W charging.

Mot-CRs-fixed: (CR)

Change-Id: Ie2292e3215263fac30f98542a68620cc21a6c5d4
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1351497
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355884
2019-05-20 10:01:26 -05:00
Yonghua Yan
af37f4658f power: Fix the mmi chip struct access issue in QC battery
If use QC battery as the "battery" supply, the sysfs nodes charger_rate
and age will have no way to access the mmi smbcharger chip struct, as
it can only obtain the QC battery supply driver data.

Mot-CRs-fixed: (CR)

Change-Id: I6388c1bd951ee3aa9288c8dda15602f72b275dd3
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1346435
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355883
2019-05-20 10:00:22 -05:00
Yonghua Yan
9b148d612e power: Add IPC logging
Add IPC logging support for debugging purpose
Support debug enabling through module parameter.

Mot-CRs-fixed: (CR)

Change-Id: I27a43755f0103ad75a262a00fc7160aec73a526c
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1346422
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355882
2019-05-20 10:00:11 -05:00
Yonghua Yan
93e9068acf power: use force voter in factory FCC and ICL config
Use force voter for factory FCC and ICL configuration during
factory test in case the configuration is overridden by SMB5
charger driver.

Mot-CRs-fixed: (CR)

Change-Id: I8647b42b6ca420a02312198fb56c7ee09edfbde3
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1345281
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355881
2019-05-20 09:59:09 -05:00
Yonghua Yan
19b94beead power: fix wrong charger presence detection
There is mistake for charger presence judgement when the
device is in sink mode.

Mot-CRs-fixed: (CR)

Change-Id: I5ce02d839cae40763f00e0bcf3cda24947f9b08a
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1345262
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355880
2019-05-20 09:59:03 -05:00
Yonghua Yan
ed1e4e9416 power: qpnp-smbcharger-mmi: Handle DCIN presence
The heartbeat_work breaks and output error log when accesses
the DCIN status register for presence detection.

As the DCIN is not supported in PMI632 chip and the address
at 0x14XX is undefined, so it return -ENODEV when access it.

So for PMI632 chip, just consider it as successful with data
0 returned for DCIN presence check.

Mot-CRs-fixed: (CR)

Change-Id: Id459296ec20bb679e1803b820be1bd288a1cdc75
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1342040
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1355879
2019-05-20 09:58:55 -05:00
Kenny Kessler
aed5336114 power: qpnp-smbcharger-mmi: Add Suspend SOC Recalc
When the System Suspends the running last reported SOC needs to
be reset.  The reason is that the SOC could have moved a large
amount while sleeping.  The curretn SOC needs to be recalculated
so that the changes is noticable to the User upon wakeup.

To do this keep track of the Suspend state as well as the fact
that the heartbeat has not run yet after a Suspend.  The
WAS_SUSPEND bit will track this and then be cleared once the
heartbeat gets past the point that the information is not longer
needed.  For Dual Batteries, this will force the last_reported_soc
to be updated with the current calculation rather then trying
to Monotonically adjust it slowly.

Change-Id: I0de830df74720f0f26f8f7a7cfcba7698f6a6dd6
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1355819
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Curtis Porter <porterc@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-20 08:31:12 -05:00
guoyf2
1f58f0b219 SurfNA: earpiece no sound
root cause:
incorrect NXP AMPE reg value when power on

fix:
if AMPE==0 and PWDN ==0, force set AMPE value to 1

Change-Id: Ib7605261b76cac3238b5fa23a7d74a091f0b5ffd
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1356869
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-18 09:27:44 -05:00
Paul Handrigan
7168b79a8f ASoC: cs47l90: Add kcontrol for Noise Generator Rate
Add a kcontorl for the Noise Generator sample rate select.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: If4dc2ec707e679da23e31740bf071d3e1f7d311a
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354957
2019-05-16 12:42:29 -05:00
Paul Handrigan
a70d8bf90b ASoC: wm_adsp: Change fw name from device id to name.
Change the device id of a part to the device name.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I6ca0f03da34bffe4025b49d5e1913b03c4b9a70e
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Tested-by: Jira Key
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354956
2019-05-16 12:42:25 -05:00
Vlad Karpovich
1caf80753a ASoC: wm_adsp: Add capacities to AOU fw definition
Enable compressed stream support.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: Ia83014ba21abc6d12aa84629e3d111f2c8eb6467
Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354955
2019-05-16 12:42:21 -05:00
Paul Handrigan
39e81e99d3 ASoC: wm_adsp: Change kcontrol for AoU and AoU concurrent
Change the dsp firmware control to switch AoU and AoU concurrent
firmware.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I8822e02f8b4aa229dee187c89297f43e4c111e0f
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Tested-by: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1354954
2019-05-16 12:42:18 -05:00
Paul Handrigan
8ace5a94b0 ASoC: madera: Add rate select for Noise Generator
Add enum to select the rate for the Noise Generator.
Patch came from vendor (Cirrus).

Mot-CRs-fixed: (CR): approach won't work with youtube in background
Change-Id: I056bc0eb204d5f3feef61ee7066cc5b4c59427a6
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
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/1354953
2019-05-16 12:42:16 -05:00
guoyf2
5bd115ed69 SurfNA: Add NXP smartpa log
Add NXP smartpa profile log


Change-Id: Ie1880208b091e225b2055090f2b1b6075e7e79a1
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1353959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Submit-Approved: Jira Key
2019-05-14 05:02:43 -05:00
Konstantin Makariev
af2bdde38f sec_mmi: initial kernel driver
Kernel driver code for Samsung LSI. Includes MMI specific interfaces

Change-Id: I0b3ae080637f8f103d8d2928240841909ec6c258
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1351484
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-05-09 17:02:17 -05:00
Kenny Kessler
03026931fd power: qpnp-smbcharger-mmi: Toggle USB At Probe
At power-up the USB should be suspended for 50 ms to clear
any issues that might have occurred during boot.  This will
be handled in the probe when NOT in factory mode.  Stability
racks are reporting discharged batteries and the cause appears
to be ICL is at minimum before probe occurs.  This should allow
for a clean start on each boot.

Change-Id: I66817f5a74f8161fbf1c3023c42ae72e994d8fa2
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1349801
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Curtis Porter <porterc@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-07 11:50:39 -05:00
Konstantin Makariev
e2c7ca421e synaptics_mmi: log touch events in factory mode
Always log touch events while running in factory mode. This will
allow for easier debugging of factory issues.

Change-Id: I348164021d590e40751ba3c456245c3349a4d53a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1347015
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-05-02 22:28:29 -05:00
Konstantin Makariev
db27ede695 synaptics_mmi: load module with regard to power state
When FW upgrade happens, regmap might change. This makes access
to test reporting invalid and thus DLKM needs to reload. However,
if touch IC's power state does not allow successful I2C
communications, DLKM will never properly initialize. This change
introdices 2 things:

 * waiting for valid power state to load DLKM
 * new state "loading" that allows to hold on power state change
   during DLKM load

Note: It has been evaluated for test reporting DLKM only at this
time. Long term it would need to apply to all DLKMs.

Change-Id: I86f1ab6b815053e499b01a655fccf517d1e9addc
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1346820
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-05-02 22:28:24 -05:00
liaohj
02b0f7c724 modules:tfa98xx: send tfa cal just on speaker mode.
- send tfa cal just on speaker mode.
  if set tfa cal on handset mode, algorithm no ready,
  afe_callback will return fail
  and set this_afe.status to 1,
  once other modules want to get the status at the same time,
  will get the fail status.
  the call on handset screne,
  open capture pcm low probality to get the status
  at the same time, so open capture pcm fail,cause call no sound.
  so send tfa cal just on speaker mode.
  nxp smart pa is bypass on handset mode.

Change-Id: Ib977fc68d48931d8617ec4339dc5494da9986ca4
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1339597
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-04-20 20:29:43 -05:00
cmsantos
e231968c55 power: qpnp-smbcharger-mmi Demo Mode implementation
Demo Mode was a pending feature on MOD 5G and Olson. This patch
allows it to work on both devices, as well as being compatible with
any other device that uses this same driver.

Change-Id: I99f117485faf27a01890c6433a6ece77ab755cfd
Signed-off-by: cmsantos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1281220
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-04-18 13:24:24 -05:00
Kenny Kessler
84c958de12 power: qpnp-smbcharger-mmi: Configure DC Path
The DC ICL needs to be set via the DTS entry. Also the Charge
current when the source is DC should be lower so use a default
500 mA rate.

Change-Id: I7f04e1601b657cf3a4ff58614b309426026c150a
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1337904
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-04-17 15:17:31 -05:00
xuwt2
3346c4b7f7 mmi_pl_chg_manager: optimize charging policy in CC stage
In the constant current charging stage, we made a power compensation
strategy to improve the charging efficiency.
this patch is for optimize the power compensation strategy, so that
it can avoid the disturbance of thermal mitigation policy.
and it can help improve the accuracy of the battery fuel gauge

Change-Id: I404f63da75c93ca409b6bb5c7d581f62ba415f6c
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1336218
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-04-12 05:14:35 -05:00
Konstantin Makariev
6206510c3e synaptics_mmi: fix unloading dlkm
This commit addresses issues that were causing kernel panic on attempt
to unload Synaptics driver DLKM.

Change-Id: I7af11cdbee6cf414a4026ebb4522297ce132f80c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1332607
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-04-04 16:13:32 -05:00
Konstantin Makariev
5eb1814dc5 synaptics_mmi: DRM panel state machine
State machine needed to indicate DRM panel states. This fixes
unloading of DLKM.

Change-Id: I8093337c3890f8e76dd4b3b7290cc8e311d245d1
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1330943
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-04-04 16:13:26 -05:00
hujing3
38b39ae895 DLKM: focaltech tp reset seq optimize
focaltech tp reset seq optimize
There are two tp reset seq when display on, optimze it.

Change-Id: I73187aa0d9efd3c7659951e6942ef2b4ecb53185
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1330402
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-04-01 03:44:53 -05:00
Balachandar Swami
ef8eb83419 mmi_nfc_clk.ko: Add dlkm to control clk
This dlkm will configure pm660 gpio 4 as interrupt. BB_CLK3 has
pin control enabled so gpio 4 logic high will enable clk.

Change-Id: I3dda722f184551b7b3be564b9f9e8c26ab3fafc7
Signed-off-by: Balachandar Swami <w60013@motorola.com>
Reviewed-on: https://gerrit.mot.com/1327541
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
2019-03-28 14:39:14 -05:00
Konstantin Makariev
3d8fdee88b synaptics_mmi: improved F54 control registers discovery
Added missing conditions to discover F54 control registers up to
F54_ANALOG_Ctrl269 BSC calibration. There are still few gaps, but
even the latest RMI4 specification provides no info on how they
could be discovered. Tested on s7813 and s3601 touch ICs.

Change-Id: I0995ea7bb2a1a24766cc8ce250b65582a99db73e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1326957
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-03-26 08:35:51 -05:00
Konstantin Makariev
ccfb048ca4 synaptics_mmi: enforced page selection
Driver contains performance improvement algorithm allowing to avoid
unnecessary page selection transactions by "remembering" the last
accessed page. However, mixed types of communications used in
factory "breaks" this algorithm and causes access to a wrong page.
This change allows to enforce page selection in certain functions
used by factory.

Change-Id: I72c0bf76a3428234645103404372455b42356ae1
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1326865
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-03-26 08:35:44 -05:00