Commit graph

1,355 commits

Author SHA1 Message Date
Ryan Lattrel
48c97a9726 sec_mmi: add grip supp distance register
Add store/show functions to the grip supp distance register
at 0xAC.

Change-Id: I522bc2de32a1dcbe5af1ade338646babaedcd923
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1514568
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-03-18 16:38:21 -05:00
Ryan Lattrel
8816d3dac8 sec_mmi: Fix default prop reset on resume
When the post resume runs it stores the values set in init
if the values were updated when the chip was on instead of the
new values.

Copy the new values to the buffer regardless of the state.

Change-Id: I6ab9bf709746f2ac67eee786c4c5f36e9fcb1b72
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1516061
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-03-18 13:14:37 -05:00
dengwei1
4380bf72fd guam: add touch module support
add touch module
support
NO_PROP_NEEDED: this is for guam

Change-Id: I025ce7955c8ca1f028f0d259c6622db65041d146
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1514875
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2020-03-18 01:53:18 -05:00
Konstantin Makariev
5323ba6826 fixup! (CR): Solve the problem of I2C error when power off
Fixup for the original change. Resore registers values on resume.

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I40a9b4683e7bd9764fc2f06b341b379faf884729
Reviewed-on: https://gerrit.mot.com/1515374
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-03-17 17:01:41 -05:00
litong
b011085af6 Solve the problem of I2C error when power off
1. In case of touch power off, upper layer access node to set
pill_region and suppression, which generate I2C error.
2. Set power state when power on and power off.

Change-Id: I147c6aacbf215ecba431f9ee15e8a955e346155b
Reviewed-on: https://gerrit.mot.com/1514772
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-03-17 11:13:49 -05:00
chenl18
37b4aa1a48 fps: fixup kernel panic by calling input_free_device
Rmmod goodix_fod_mmi.ko caused kernel panic, 'Kernel panic -
not syncing: refcount_t: underflow; use-after-free.'
Input_unregister_device will internally free the device, so
input_free_device sohuld not be called.

Change-Id: I8b837ded53a734981744ea2310adc67fafe063f0
Signed-off-by: chenl18 <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1513967
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2020-03-16 04:39:57 -05:00
liaoxl
5459fa2023 FM: support elna module
fix compile faile after kernel upgrade for pinctrl function
not defined errors.

Change-Id: Iac78770789b9646443ced43e97079625fd785b8e
Reviewed-on: https://gerrit.mot.com/1484417
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-03-16 00:35:43 -05:00
wangyq13
0cc57e5d5d input: himax_v2_mmi: change resume timing for hx83102d
HX83102D is a low tier IC, need to create baseline early, so move
resume to early blank, but need to avoid lcd reset conflict, so
add some delay for this.

Change-Id: I3c98e3e41c5a1ee68084b4ffd0e69f76e3b51d8b
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1512722
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-03-13 07:15:51 -05:00
Ryan Lattrel
2856a99e4f sec_mmi: add hold distance register
Add store/show functions to the hold distance register
at 0xAB.

Change-Id: Ic697012de0ec22c4b4ebfbd6c39be159273be858
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511303
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-03-12 01:46:21 -05:00
Weilong Wu
8a49c2bd4f dlkm: aw8695: fix enter standby mode failture
Sometimes we find that the IC can't enter standby mode.
The root casue is that the period between go bit operation
and standby mode operation was less than 2ms.
Add wakelock to avoid this concurrent issue.

Change-Id: I318741acd2e60a019a32da3e91a6b373fe2d3020
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1508966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-03-10 02:09:12 -05:00
litong20
a1fa86582a Revert:(CR):timeout to wait for wake lock at suspend
TP:
The problem has been fixed in (CR).
This reverts commit e54a92ed077617b745386cee07351c087aac3744.

Change-Id: Iaddf7320f0c9477267c719adb6145e2491f30b2d
Reviewed-on: https://gerrit.mot.com/1507347
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
2020-03-05 02:04:43 -06:00
yanyh2
3a181247c4 Support dts property to configure force device on option
Add dts property to configure force_device_on_en_default
so the product can choose this option in dts.
Once this option is set, the TOF device will always be in
on state, the xshut will keep high and avdd will be on all
the time.

Change-Id: I0b74bcafdcb94e5b9356ff94ede4a97c62e57bdc
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1507387
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
2020-03-05 00:40:46 -06:00
Cesar Santos
01ac3daa9f modules: power: Update README document for bq27426 driver
Update bq27426 driver documentation, explaining how to add a battery
profile to a product, as well as the Device Tree parameters.

Additionally, what needs to be done in case it is a Dual Battery-based
product/architecture.

Change-Id: I6ecaf039087a7d83b26abe32c83f4ba96cc248ba
Signed-off-by: Cesar Santos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1494396
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2020-03-04 14:12:41 -06:00
Andrew Abbott
77ce570f4e modules: power: Build with battery profile header files
Add the battery profile header files to makefiles to build with correct
battery profile information

NO_PROP_NEEDED: change only necessary for smith battery. Does not affect
Olson
Change-Id: I73f32af18d91ffa573edb285d850cd3c450e9c7c
Signed-off-by: Andrew Abbott <drewa@motorola.com>
Reviewed-on: https://gerrit.mot.com/1494276
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2020-03-04 14:10:01 -06:00
Andrew Abbott
dfac45c7a0 modules: power: Add battery profile files from TI
Add *.fs files from TI for smith batteries and the *.h files generated
by converting the raw *.fs files using convbqfs.pl
Add *.fs and *h files for defender from defender branch
Separate "raw" and "imported" battery profile files into subdirectories

NO_PROP_NEEDED: change adds battery profiles for defender and smith.
Olson does not use these battery profiles.
Change-Id: Ida5d1a937f8046b4d926d3dd8e851f5a205e0bdf
Signed-off-by: Andrew Abbott <drewa@motorola.com>
Reviewed-on: https://gerrit.mot.com/1493722
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2020-03-04 14:09:57 -06:00
Andy White
22bbf73078 Revert "(CR) aw8697: boost ram loop mode playback"
Using boost mode for long vibrations leads to desense issues.
The long vibration waveform will be modified to increase power
instead.

This reverts commit e5c9b40ce9f6d9abf83dfde7da4adbd0f52664ef.

Change-Id: Idb38ad2fd1f51578ee3c1610ef13c90628b5dbb1
Signed-off-by: Perry White <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1505515
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-03-04 14:08:42 -06:00
zhongling1
822b255465 Disable navigation in driver
Since fps slide event is published  in hal,
so, disable egis navigation driver when fps slide nav enable.

Change-Id: I9f8ed0994f0755dea35c83a1780916e3e3206c58
Signed-off-by: zhongling1 <zhongling1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1502311
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianlin Nie <niejl1@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-03-03 20:21:55 -06:00
Shiyong Li
9db2172413 sec_mmi: timeout to wait for wake lock at suspend
As sec_mmi_pre_suspend() is called in the path of display-off, too long
blocking would possibly cause user space module "Display Controller" to
be out of syncing display power state.

Set a timeout for checking wake lock instead of waiting for forever.

Change-Id: Ie72bda93eaaf66e89ed34d33911ec1fdfea5b0cb
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1506510
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-03-03 15:41:21 -06:00
litong
b4a82b4f75 Take a long time to enter pre_suspended
1. Create a separate lock for gesture event reporting to solve the 
problem of blocking pre_suspend and then blocking the next wake-up.
2. According to BSP test, it takes 1500 ms for the touch to receive 
the gesture event and the upper layer to complete the processing.


Change-Id: I93a18399876beba49100b41a0561103b2b9fa86d
Reviewed-on: https://gerrit.mot.com/1505298
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
2020-03-03 01:46:32 -06:00
xuwt2
ea3b1a99b2 modules: power: Add a long heartbeat delay for discharging
when the batttery is discharging, if the hearbeat work schedule time is
too short, and work frequently will lead to power consumption problems.

Change-Id: Id9120295ee1452b14e790d6bc5876fd5fd94c6c2
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1504442
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-03-01 22:22:17 -06:00
wengjun1
1388befd5a dlkm: Nairobi single tap bringup for TDDI
- Add configuration and lib for wakeup gesture.
- Apply for display new interface to implement single tap for TDDI.

Change-Id: I404229ca6268094566076587ee7803759eddedf4
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1503785
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-03-01 19:41:41 -06:00
Cesar Santos
e0bffcc463 modules: power: Add Adaptive Charging feature
This feature allows to put device in Adaptive Charging. It has three modes:
- Auto (charger until upper SoC, and goes to 100% on a predefined time)
- Manual scheduled (same as Auto, but user defines predefined time)
- Manual (user defines upper and lower SoC limits, l(CR) an extended Demo Mode)

This feature is ideal for continuously plugged devices.

Change-Id: Id6fe80d358657c5e0142d8a5cd28b71596510fb3
Reviewed-on: https://gerrit.mot.com/1501961
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-02-28 11:39:28 -06:00
Cesar Santos
18653badcb modules: power: Review SMBMMI log messages
Minor message review (l(CR) changing some to start with uppercase
letters), as well as standardizing to all messages to present
"SMBMMI" text on this driver.

Change-Id: Id05eea39db9853c4d20069e73c393bd921b5c4e4
Signed-off-by: Cesar Santos <cmsantos@motorola.com>
Reviewed-on: https://gerrit.mot.com/1504251
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-02-28 11:27:10 -06:00
Haijian Ma
8b9fb3389b dlkm: support 20W charger
nairobi should support 20w qc3.0 charger (6.6V/3A) and compatible
with 18W and 15W charger.

Change-Id: Ifcffb381a4436e0ec0316c480531540cc0170552
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1497702
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-02-26 21:13:45 -06:00
zhouwl
2427f2ad26 ASoC: upgrade Aw882xx driver to v0.1.8
This version drvier supports different audio stream use
its own audio effect profile, audio source divides into
music, ring, voice and notification usecase.

usage: tinymix "aw882xx_profile_switch" [usecase]

Change-Id: I85b673be9a683f38d9f84d0a8a6ecefcf534f147
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1502547
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-02-24 04:49:41 -06:00
Ryan Lattrel
3d6bd1a65a qpnp-smbcharger-mmi: Add POWER_SUPPLY_PROP_HOT_TEMP prop
Add POWER_SUPPLY_PROP_HOT_TEMP property, which will be set
to 1 if we are either too hot to charge or in the highest
temp zone.  Otherwise report 0.

Change-Id: I67495fad2da2e30bc99e6ac5629d918d63d917ee
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499274
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-02-21 15:49:25 -06:00
Ryan Lattrel
38c2b1b771 p938x_charger: Reduce dc current if battery too hot
Reduce the dc current by 100mA if the battery reports
that it has entered a hot temp zone.  Charging is more
efficient if the battery is cool.  Each time the temp zone
is re-entered the current will be reduced. When the temp zone
is exited a timer of 5 minutes will start, and if the high
zone is not entered again the max current will be restored
by triggering dc AICL to rerun.

Change-Id: I5b9ac02410e33a729bcade957d9a5676376a0cb6
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499273
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-02-21 15:49:24 -06:00
litong
60e7620e60 Modify the output format of the testing node
Modify the output format of the testing node
for synaptics TCMD command execution

Change-Id: I3f6912a129ebc8a827641b34e8839bf72d83fa39
Reviewed-on: https://gerrit.mot.com/1497439
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
2020-02-19 02:35:09 -06:00
litong
1b4657e76a Update synaptics testiong code to V2.1
TP:
Update synaptics testing code

Change-Id: Id8e61b379824d45eb9a42d8e6b27491b23191327
Reviewed-on: https://gerrit.mot.com/1499001
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-02-19 02:27:42 -06:00
chenlj2
a1996d5796 DLKM/sar:modify enable process of abov sar
-there is  a defect when RF location is different
-modify enable process of Sar

Change-Id: Ib018136c6f9ded6f580432d6202f92d6830434c2
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499395
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2020-02-18 01:00:05 -06:00
chenlj2
58f3ac5c7a DLKM/sar:optimise driver of Abov 5 channels
log output process
extract name of input and cdev to dts

Change-Id: I554cb2e24be6ea4038d9106e2e7fc85b5b7e24c5
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1498941
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2020-02-17 19:42:02 -06:00
Andy White
afb828d7a6 Racer_turbo: aw8697: Add new entry in ringtone array
Add an entry for the new default ringtone into the RTP
ringtone->waveform map

Change-Id: I1f7faa906ad13b462c5673a88bfbdffe2d50db3c
Signed-off-by: Perry White <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1498409
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-02-14 14:59:47 -06:00
Konstantin Makariev
1cc25d4efb sec_mmi: cleanup device tree parse logs
Make sure non-fatal errors do not appear in the kernel log

Change-Id: I57a973709eb0f2ae1b6a2df7375fd8e821f6cfee
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1497921
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-02-13 14:56:37 -06:00
Konstantin Makariev
5775565ac4 sec_mmi: add pill region support
Pill region support added to improve edge double tap detection.
UI will utilize IMotTouch HAL to control this feature. Feature
needs to be optionally enabled by adding sec,pill-region-control
property to device tree node.

Change-Id: I582063c653ddd7631e6bf843c981726997d7c1ad
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1497429
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-02-13 10:38:46 -06:00
litong
2157f5c85e Solve the power on problem of Synaptics touchscreen
TP:
Modify the power on process of synaptics touchscreen to solve
the problem of power failure.

Change-Id: I8963e3db920de3830b81eb95611cce1696ac111f
Reviewed-on: https://gerrit.mot.com/1496299
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
2020-02-11 00:24:07 -06:00
litong
905d07601f Add touch suspend_noirq process
Because there is no disable-irq in LPM mode, I2C communication may
occur when system suspends, resulting in conflict, which may lead to
system crash.
  So we disable-irq when PM suspend, and then enable-irq again in the
suspend_noirq phase.

Change-Id: Ib9ca3f1f2a6d2da0142c6203acedb617535fc4a0
Reviewed-on: https://gerrit.mot.com/1494642
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-02-07 05:26:26 -06:00
haojl2
0844bfbb61 sec_mmi: report major and minor value in pixel unit.
If dts defined size to pixel factor, report those two value in pixel
unit.

Change-Id: Ie89e8d9427cc80d82a742e4ab2efbe8c468ac16e
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1493096
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-02-06 20:05:49 -06:00
litong
ebdae4dd88 Solve I2C error in the first suspend
TP:
Initializing the touch PM_MODE is PM_ACTIVE when registering the 
notification chain, to solve I2C error in the first suspend.

Change-Id: I80e6a20484cba58dd1f8a25c0b0707d0b8a95eb7
Reviewed-on: https://gerrit.mot.com/1493127
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-02-05 07:07:33 -06:00
Ryan Lattrel
cb0a7042c1 p938x_charger: Force dcin-en on when attached
Force dcin-en on in the 8150b pmic when a wireless charger
is attached. There appears to be a hardware glitch where
an undervoltage event will cause the feedback enabling dcin-en
to stop, which prevents us from charging even though the charger
is attached and working.

With this change, we have to determine if we are connected based
on whether the attach detect gpio is on instead of a voltage
at VRECT, because VRECT will always be high when we force dcin-en
to be on.

Change-Id: I887266b9316b556a3b1dd12997ae67b5c7a324d9
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1491980
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-02-04 10:51:52 -06:00
chailu1
d60d0e493f charge:real time check weak charge
PMIC receive usbin OV events, OV IRQ triggers for
very small duration in interim periods sometimes.
while this periods check charge type will judge inbox
charger adapter as  weak charge. now logic is always
recognize weak charge even if OV event disappear.
So add real time check weak charge type mechanism.

Change-Id: I18072c56b505f2508292d6b335f71a646d48b6d7
Reviewed-on: https://gerrit.mot.com/1486223
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-02-03 00:29:23 -06:00
Andy White
64b289fbc6 aw8697: Add error checking to RTP mode
Error status bits weren't being checked, so RTP mode
would attempt to continue despite errors being present,
causing occasional lock-ups and delays

Change-Id: I9de871e3e2e0ba2255e621b5a8505e87edd90f1e
Signed-off-by: Perry White <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1491069
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-31 14:09:17 -06:00
litong
b1d61265f5 touchscreen_mmi: Modify the process of panel off and on
1. Process of panel off and on
   Panel OFF:
(pre_suspend)->IRQ_OFF->INTO_MODE ->(post_suspend)->PINCTRL_OFF->POWER_OFF
   Panel ON:
POWER_ON->RESET->PINCTRL_ON->(pre resume)->MODE->IRQ_ON->(post resume)
2. Only when both the sensor and the gesture are enabled can the
   gesture mode be entered.
3. Interrupt will be turned on only in gesture mode.
4. Turn off the power only when Power_off_suspend is set
   and not in gesture mode

Change-Id: I962cde8711333a4f213b01dccc99a3268e3ca519
Reviewed-on: https://gerrit.mot.com/1479065
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-30 01:17:03 -06:00
haojl2
a3810fae2e sec_mmi: add delay if power supply off
To meet IC power on sequence, if IC power is not always on, need to wait
for 70ms before checking IC status. If no delay added, I2C communication
may fail sometimes. This is copied from sec_ts_probe.

Change-Id: I85b3a8a2b444ea2e3e77a60e2fcc45c8b976bc6c
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489000
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2020-01-30 01:16:55 -06:00
Ryan Lattrel
eca836551e p938x_charger: protect fw flash and handle reboot case
Add disconnect mutex guard to tx mode and flashing
the firmware to prevent unexpected racing.

Add a check_status on probe in case we are starting from
a reboot attached to a pad and have already handled the IRQ.

Change-Id: I5c6a4fad548e2e7b6847ec51da6791b51dd71e98
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489666
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-29 15:14:07 -06:00
Konstantin Makariev
783a66af57 touchscreen_mmi: secondary touch panel supplier
Extract panel supplier name from different properties for primary
and secondary touchcsreens.

Change-Id: I1fcf162bb9f2090ef967343467aa1bbf2803a35a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489322
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-29 09:04:57 -06:00
Konstantin Makariev
7fff1f29a3 synaptics_mmi_class: fix firmware file name
Firmware file name was truncated causing update to fail.

Change-Id: Ibccd02705d4778653db1f147ff7a4fe91de95bec
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489162
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-28 09:51:40 -06:00
timwang
0dedfa732b Add Build Flags for Data Width Change
Add build flags to cci_intf so that only kernel versions 4.19 and above
will have this functionality. This is because older kernel versions will
use a different cci_intf header and will not build.

Change-Id: I69111b4161734303e8a1c99223623896ac5d112b
Reviewed-on: https://gerrit.mot.com/1488924
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
2020-01-27 16:10:07 -06:00
liuwang2
fd7c4a8b01 Add Data Width to CCI_intf
Main OIS requires 16 bit writes. cci_intf only supports 8 bit writes
currently. Add a field to allow user to specify data width. Add logic to
proccess data according to that width.

Change-Id: I5da72399d9060ab60775488f36c5f72262a105a9
Reviewed-on: https://gerrit.mot.com/1488484
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jian Luan <jamesluan@motorola.com>
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 63e2369c5c00ed0a504f9a45e0a3be381faafd55)
Reviewed-on: https://gerrit.mot.com/1488831
2020-01-27 12:10:26 -06:00
Ryan Lattrel
0145dd0928 p938x_charger: Wait for LDO to report charging
There are too many cases of a wireless charger showing as
charging when it is not.  Only show when LDO is turned on
even if it sacrifices some detection speed.

Change-Id: I9bd1cb03428f4be4fcd2847b50fd7f0e9122154e
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1488807
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-01-27 12:00:16 -06:00
Ryan Lattrel
5260ae84e6 p938x_charger: Update detection algorithm
Show that we are charging when VRECT_ON is triggered.
This unfortunately leads to some edge cases where we will
toggle the charger on and off if on the edge of the pad.

Additionally clean up the remove function so that we
do not race with the status interrupt in any context.

We will process the removal of a charger if (1) detect
IRQ goes low (2) we fail to read I2C or (3) the heartbeat
function reads there is no voltage at VRECT.

Change-Id: Ieec364bfa2a7bac8966dea3951d913ad7bdefee9
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1487527
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-01-24 16:01:17 -06:00