Commit graph

1,043 commits

Author SHA1 Message Date
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
Konstantin Makariev
1c0beef3e2 fixup! (CR) sec_mmi: update Kbuild
Config option PANEL_NOTIFICATIONS only set for products using
touchscreen_mmi class code.

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I01d82a3a8df2a5684b70675c0676ff29aa7cbdc5
Reviewed-on: https://gerrit.mot.com/1488434
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-24 15:53:37 -06:00
Konstantin Makariev
c8b1751705 synaptics_mmi_class: start using touchscreen_mmi class
Synaptics driver code aligned with touchscreen_mmi class code. Despite
changed directory name, module name is still synaptics_mmi. Synaptics
driver with class support will build whenever touchscreen_mmi.ko
exists in the list of product DLKMs.

Change-Id: I7aabf417292981d09f4c431d45815ff16e80ba62
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472910
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-24 13:25:13 -06:00
Konstantin Makariev
5c64bb1f67 touchscreen_mmi: match panel notifier with control dsi
In multiple display configuration, panel notifier will be called for
each display. Control DSI associated with display is passed as a
parameter to panel notifier and will only be actionable in the case
when notification belongs to display.

Change-Id: I6abbf2d34aaedd230ac1de79100babed20ed712b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1482868
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-24 13:24:13 -06:00
Konstantin Makariev
2cd3a2c96a synaptics_mmi: add touchscreen_mmi class check
This DLKM will only be built if touchscreen_mmi class is not used
for backward compatibility.

Change-Id: Iced4457c6f87faa726ea6de44f9f625955d646fb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1479387
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-24 13:24:06 -06:00
Konstantin Makariev
757e284aca sec_mmi: update Kbuild
Need to build DLKM using touchscreen_mmi class code as well as old
fashion way.

Change-Id: I2013c074b603ac1e048fc2c59dc19efc853808d5
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1486524
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-24 13:23:37 -06:00
Konstantin Makariev
e757546214 sec_mmi: do not calibrate on firmware update
Enforced calibration on firmware update might cause problems when
something is touching the screen while it runs.

Change-Id: I7296d3c00881ed482cfa5dadd16de2d09c935230
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1487884
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-24 11:42:28 -06:00
awhite6
071e0b2d8b aw8697: Move RTP update work out of irq handler
The vast majority of RTP work was being done directly in
the irq handler. Occasionally, it would take eight or more
seconds to return from the irq.

Change-Id: I7332b9746efcfaac1d09b8c1cc8116da59138cd0
Signed-off-by: awhite6 <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1487522
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-23 16:43:57 -06:00
Ryan Lattrel
5b11693dcc p938x_charger: remove unneeded resets
Remove the reset on init, it was initially used when the
interrupt did not function properly in early firmware.

Also remove the reset in disconnect, and instead just check
the status.  And add a mutex to prevent the disconnect irq
from running concurrently with the status irq to prevent
races.

The VOUT and VRECT handlers in the IRQ were flipped in case they
are both true.  We should make sure we handle it in the expected
order.

Change-Id: Ib835d1ba85127a69dfed3c08821aa928e9c0bf9e
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1487334
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-22 13:55:46 -06:00
Ryan Lattrel
9e6b681df3 p938x_charger: Remove thermal message print
The thermal subsystem will call this function on every
wake up or failed sleep attempt.  Do not spam the log,
instead only report if the state changed.

Change-Id: I5c5f2b30333c754b334028444b93c8dcf5af32c7
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1486519
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-21 14:23:42 -06:00
linhonglei
f018b2e344 add sar svdd regulator in kernel driver
kernel module
add sar svdd regulator
sar sensor has tow power vdd and svdd regulator,now add svdd

Change-Id: Ia8d0c8a24f9d633e323d69da846ed1d19e0a7580
Reviewed-on: https://gerrit.mot.com/1484941
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
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-01-19 20:19:48 -06:00
John Ratke
400ae84eb1 Change dt-gesture sensor to SPECIAL_REPORTING mode
dt-gesture sensor was previously an ON_CHANGE sensor. This is
generally okay, but it can lead to the Sensor Service sending out
an old event to a new (second, third, etc..) client if there was
already a previous client registered for the sensor, and this is
not the behavior that is desired.

Change-Id: I3bc91c5271fedc83b11ee5028980cfea99dd6732
Reviewed-on: https://gerrit.mot.com/1484754
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-17 17:01:51 -06:00
Ryan Lattrel
df42a488f3 p938x_charger: Update tx mode fault handling
Add TX FOD write: write up to 6 bytes starting at register 0x00AC.
Configure tx parameters on mode change IRQ & bit 2 of mode reg set:
-write TX_FOD if configured
-write EPTRMPWRTGL to SYS_CMD (moved from p938x_set_tx_mode function)

Add handling for EPT modes. Reset after 3 POCP events, or 3 FOD
events.  OTP will turn off on first event.  All others will reset
the IC.

Additionally, if tx mode has recovered 10 times without being
turned off by the user, disable it.

Change-Id: I2e5d2b00e34d29225347964434f4a4dd0b898d6b
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1484737
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-17 14:54:25 -06:00