Commit graph

572 commits

Author SHA1 Message Date
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
Kenny Kessler
cb24c8041a power: qpnp-smbcharger-mmi: Add Dual Low Voltage Shutdown
Add a check against both batteries in a dual configuration
for a low voltage condition.  This will drive the SOC to 0% so that
the System Voltage does not get too low.

Change-Id: I70353eeef6b12b25e2d48b181efe00327d1dedb1
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1322360
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-22 13:00:44 -05:00
Kenny Kessler
8c1ed0afa6 power: qpnp-smbcharger-mmi: Add Cycle Counting
Count the Cycles in the battery so that tracking can be done.

This will help with adjusting charge parameters as cycles
increase.

Change-Id: I737ff91f71f41e671e785a7cef370586fcedb7f0
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1322359
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-22 13:00:40 -05:00
Kenny Kessler
e7232435be power: max17xxx: Fix Initialization
The Initialization of some undocuemnted registers is wrong.

Fix this so that the correct encoding and conversions are used.
The latest maxim supplied spec sheets state that 0x46 should be 0xC80
and that 0x45 should be 1/16th of FullCapNom.  Also it seems that
it should be 1/16th of the Register FullCapNom not the actual mAh.
To do this the Rsense conversion will be applied prior to writing.

Change-Id: Ica801e4f57e7070c4b56b87cd45f607b40ea5530
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1322357
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Reviewed-by: Curtis Porter <porterc@motorola.com>
Submit-Approved: Jira Key
2019-03-22 13:00:37 -05:00
Kenny Kessler
83a392f86f power: max170xx: Add RepCap
Add the POWER_SUPPLY_CHARGE_NOW property to the power supply
and report RepCap.  This will allow easier tracking of the
FCC calculation being done in the driver.

Change-Id: I9299ed0430308651578d943fe7379bbe62de6b38
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1321620
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Curtis Porter <porterc@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-22 13:00:33 -05:00
Kenny Kessler
af9d7cc0ff power: qpnp-smbcharger-mmi: Disable Force Votables on Charger
If charger is inserted in factory mode disable factory mode charging
Set the Votables back to OFF (0) wen this happens so that any previous
Force to set Factory mode charging is overridden.

Change-Id: Id7b88a098d890c8705cbf03ebdec628de396d4fd
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1325224
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-21 16:13:54 -05:00
Konstantin Makariev
13b4492041 synaptics_mmi: bsc calibration support
BSC calibartion is a new feature required for Synaptics s7318 IC
built into AUO TP5 panel. Driver need access to F54 control
registers: 242 and 269 to fully implement BSC calibration. This
commit allows for these registers' discovery and setting up
necessary sysfs entries to access them.

Change-Id: I9a31fcbdc64930ebeedb17ab4b7e574be8048935
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1322193
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-03-20 17:10:31 -05:00
Ryan Lattrel
8b4420d7e4 qpnp-smbcharger-mmi: use max batt therm
If there is a main battery and a flip battery, return the
highest thermistor value for the batt temp instead of
defaulting to main.

Change-Id: I1eaf67a9b0dccb345a2890eadad8a835e195b5ce
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1319852
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-18 15:20:19 -05:00
haojl2
fe3668cdff input: ets_fpc_mmi: Add vendor sys entry
Add a sys entry in /sys/class/fingerprint/*/vendor
This sys entry can show vender name of current installed fps..

Change-Id: I608bac2fd2dfc6eb22cb105150b502c24360503c
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1320504
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-03-17 22:13:22 -05:00
haojl2
d538b1ac5c input: ets_fpc_mmi: Fix rmmod issues
Driver code failed to unregister all resoures in probe function.
So after rmmod this kernel module, can not insmod again.

Change-Id: I481e823adc506c1666ef7095c23f99744d2a363d
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1313653
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-03-17 22:13:00 -05:00
Konstantin Makariev
4102fcfda0 synaptics_mmi: query f34 for bl version 8
PDT scan assigns bl_version based on version of F34. Thus BL_V7
is assigned whenever BL version is 7 or 8. However, if we run
erase_all and then attempt reflashing firmware from the image
that belongs to BL version 8, reflash will fail. Thus we query
F34 after calling erase_all.

Change-Id: I75c8d26eb09f1dd93aea1ba1f0f5202c7736740c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1320478
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-03-14 11:28:34 -05:00
Kenny Kessler
2bd42e76db power: qpnp-smbcharger-mmi: Read BMS for Age
The basic state machine for charging incorrectly is reading
the qcom power supply instead of the bms power supply
for the charge full and charge full design.  This was
preventing the age calculation from occuring.

Change-Id: I8185529d9eec016b30bdc4c43a1c63c4cb0a6870
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1317787
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-06 14:59:23 -06:00
Kenny Kessler
ef4e3a25fe mmi_muc_uart: uart: Change Power Supply Type
The Phone Power supply which is used to denote that the
MOD is attached to a Phone had the incorrect Type.
It was set to USB and thus made Framework think that
there was a USB cable attached.  Fix this by changing to
Type MAIN.

Change-Id: I145e01a6affd5c74ee46641c4c3c7c1c73618a69
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1317772
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
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-03-06 14:07:27 -06:00
Konstantin Makariev
26a555759b synaptics_mmi: assign class sysfs name to input device
Instead of using driver's instance number, this commit assigns input
device name based on the name of touchscreen class sysfs entry. This
allows for static input device name independent on number of
running instances. This name is controlled by
synaptics,class-entry-name device tree option and default to
primary if the option is not provided.

Change-Id: If6f6ddc895688edd2d9128d262407ea2a0c8c60b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1317273
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-05 11:12:10 -06:00
Konstantin Makariev
8ed5dd7631 synaptics_mmi: set class sysfs entry name
Due to ability to tun multiple driver instances, it makes more
sense to distinguish primary touch. Thus driver will handle a
new device tree option allowing for specifying class sysfs
entry name explicitly.

Change-Id: I3f3154db57c01f0d1ddea2df7716aadec7f48d9a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1316818
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-04 23:12:38 -06:00
Kenny Kessler
db676935c5 power: qpnp-smbcharger-mmi: Block Age for Dual
There are some weird age reporting from the dual fuel gauges.
For now so that it does nto corrupt and write bad values
into units only send 100.  This will allow the other layers
to test interfaces.

Change-Id: Ic2378106e2583887183b8dce74b1f95c16221e54
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1316420
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Eyob Tesfu <Eyob.Tesfu@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-01 15:19:28 -06:00
Kenny Kessler
76a8dac4d7 power: max170xx: Add Age
Create a new group and make the age parameter.  This will be
added to the power supply kobject so that it shows up in that
power supply's sysfs directory.

Change-Id: I95cc23242df5bd7096d0b4e554e31647e46ce3a4
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1315612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Eyob Tesfu <Eyob.Tesfu@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-01 15:19:18 -06:00
Kenny Kessler
626ca0c133 power: qpnp-smbcharger-mmi: Add Charge Rate
This message adds the Charge Rate message.  To add this message
a new group had to be created for the battery power supply
kobject.  Then so that the uevent propagates the new message
a new version of power_supply_changed had to be added this driver
so taht kobject_uevent_env could be called with the new
information.

While this was being done the other paramater that is missing,
age, was also added.  It calculates the age from either the
single battery or both if it is a dual configuration.
The choice of using the lowest between the 2 in a dual
battery configuration was taken and seems the best to force
replacement of both batteries at service time.

Change-Id: Ifc34dfca3602bce042a2545a15914b1421198942
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1315611
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Eyob Tesfu <Eyob.Tesfu@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-01 15:19:14 -06:00
Konstantin Makariev
097ba84eac synaptics_mmi: fix handling of splash screen mode
Flag splash screen mode was introduced to to work around
deficiencies in DRM framework found on early stages of development.
Once DRM matured, flag becomes unnecessary. Removing this flag
revealed a bug in the logic. This commit is fixing it.

Change-Id: I0f8310f79732e675e6be7f5e373e6b2f07765e0c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1316335
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-01 13:03:15 -06:00
w15039
1b3dfa3d61 power: qpnp-smbcharger-mmi:Fix reported capacity update
On Some units battery capacity and MONOTONIC_SOC values seems
to be less than the reported capacity. In this case reported
capacity will not get updated until the unit is rebooted.

Change-Id: Ibfcaf31509e4e0d987e620f9896b66a70544689d
Reviewed-on: https://gerrit.mot.com/1315042
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-03-01 11:51:45 -06:00
yangjq
0015b868ee aw869x: Add TJINGLE vibrating waveform for TMO revvl
Add vibrating waveform aw869x_rtp_TJINGLE.bin for ring tone
TJINGLE to lake_revvl for TMO revvl.

Change-Id: I8a6324139aa24e0cd10b282470022803aee17be2
Signed-off-by: yangjq <yangjq@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1314689
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-02-27 06:02:35 -06:00
Konstantin Makariev
0a0ef094a0 synaptics_mmi: avoid loading modules on bare board
On PCB level driver should not attempt loading modules. Bare board
detection using DRM framework is based on reported panel name. Main
panel will report dummy name while CLI will report an empty name.
Driver will fail probe for main and CLI touches once this condition
detected.

Change-Id: I7b54dc59287140cdf8a88f3c220ab76e6421b133
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1314565
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-26 16:04:49 -06:00
Ryan Lattrel
942a10bad3 muc_uart: add uevent for online/offline
Add a uevent to line up with the usb_ext online
and offline.

Change-Id: I6ceeeefaa03835f140e042d6c5a0e198fb35ba1c
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1294012
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jing Zhao <zhaojing@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-02-26 09:31:54 -06:00
guoyf2
591b409bee Add NXP rpc_send delay time for 8937/8940
NXP smartPA new algorithm for 8937/8940 need to set
rpc_send delay time to 5ms.

Change-Id: I79ec1c1493f8b32f562bbc7e8a78f64e62e3ef6a
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1310382
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
2019-02-21 20:07:00 -06:00
Konstantin Makariev
b57eb61423 synaptics_mmi: firmware recovery with DRM
DRM framework is not sending resume event, thus recovery needs
another trigger. Then we cannot rely on touch IC reporting
flash programming mode if firmware has been wiped with erase
all (and this is the case when touch IC comes w/o any firmware
pre-flashed). Thus we load F34 handler first to ensure solid
flash mode detection.

Change-Id: I084188dec58d2dc690f5c7c7415329d0adb92bd9
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1310296
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-21 10:10:43 -06:00
Konstantin Makariev
92068ac384 synaptics_mmi: test reporting debug logs
All show/store methods in test reporting module declared as macros.
That makes it convenient to log what resorce is being accessed and
in which way (read/write). Adding some logs to test reporting code
for debug purposes.

Change-Id: I7369604af33a767c11ae539430d92b1f02c5515a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1312205
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-21 10:10:37 -06:00
Ryan Lattrel
41d3bdfe30 muc_uart: reduce idle timer to 1 s
Reduce the idle timeout from 5 seconds to 1 second
in an attempt to limit the amount of time the uart
keeps the system awake.

Change-Id: I667922b8eafe91e434a68a40b92beeac8bd0467c
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1310926
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-02-19 18:09:32 -06:00
Konstantin Makariev
6d73ebc640 synaptics_mmi: enable erase_all in factory mode
Recent build issue with absent touch firmware prompted to add a new
test case. As erasing firmware is potentially dangerous, erase_all
will be only enabled in factory mode for TCMD to access.

Change-Id: Ia27593f85dd4d83cc327a81ded9ac7a4410e3220
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1307995
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-18 12:53:12 -06:00
Wen Xie
36cbda5bb6 haptic: update aw8624 vibrator driver
Bug2go turns on the vibrator,Kenel is in suspend process at this time.
After the vibration time is over,Kenel suspend the I2C bus.
Causes the driver to shut down the vibrator to fail.

Change-Id: If6a5c7ca42be7a55c17f45c47748f785dbc317b1
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1309316
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-02-18 03:33:56 -06:00
Balachandar Swami
aecce7a156 nfc: st21nfc: add suspend/resume support
Clock needs to be disabled/enabled in suspend/resume to avoid
current drain in device idle.

Change-Id: I1992447e0d0b53963762d71d17b675668d334252
Signed-off-by: Balachandar Swami <w60013@motorola.com>
Reviewed-on: https://gerrit.mot.com/1308561
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
2019-02-15 15:22:01 -06:00
Wen Xie
7016c7d9cf haptic: revert update aw8624 vibrator driver
Kernel panic:
So revert "(CR): haptic: update aw8624 vibrator driver"

This reverts commit e9324b897bee9f301f91d46e95401342c9410142.

Change-Id: Ibc944b4a5a4427a13cc30384f94e376be75b0abd
Reviewed-on: https://gerrit.mot.com/1308803
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-02-14 05:07:30 -06:00
Wen Xie
5c5e843059 haptic: update aw8624 vibrator driver
Bug2go turns on the vibrator,Kenel is in suspend process at this time.
After the vibration time is over,Kenel suspend the I2C bus.
Causes the driver to shut down the vibrator to fail.

Change-Id: I881eb08efc0b7a1c9f934aa886f1eeab2da9d55d
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1307591
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-02-13 20:51:32 -06:00
Kaio Karam Galvao
9079f9067e Apply mot changes
Mot changes ported from SDM710 Android P:
(CR): Update VL53L1 ToF makefiles

Mot changes ported from 8998 Android O:
(CR): 8998: ToF sensor VL53L1 bring up
(CR): change netlink protocol ID
(CR): moto change for TOF_INT
(CR): update pinctl and regulator for power
(CR): 8998: To make laser sensor work on Nash DVT1B
(CR): moto changes on 7.2.1
(CR): implement sar function
(CR): turn off l22 when sensor is off
(CR): Apply moto changes based on new ST driver 8.0.0_b4.1.0_1268
(CR): adjust xtalk value per ST's request
(CR): fix laser autonomous mode issue
(CR): fix black target at 0mm range issue
(CR): [CTS] Nash ATT: 4 failures on Module CtsSensorTestCases
(CR): unlock ipp_mutex in ipp_in_process to avoid deadlock.
(CR): Set timing budget for SAR mode
(CR): Add default calibration

Change-Id: I52949c420cbb5c166b7b987f552d0e982e6398bb
Reviewed-on: https://gerrit.mot.com/1305297
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Sumit Jamadar <xkbr38@motorola.com>
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
2019-02-13 13:04:57 -06:00
Kalyan
4f6b53fba5 Upgrade M3 release for TOF
VL53L1 driver code from STM
Maintenance 3 release.

Modifications
1. Ambient level is now available in ranging data when no target is
   detected
2. When no target is detected the ranging data are set to fixed values
   and range status equals 255
3. New tuning parameter to choose number of measurement loops for the
   simple offset calibration
4. Support for new Xtalk calibration method(FullROI)
5. Code cleanup to comply with linux checkpatch(kernel version 4.14)
6. In Ranging/MultiZone mode, the input sub-system injecting data
   package format has to be compliant with requirements of QCOM Sensor
   Event data packing
7. In Lite/Autonomous mode, the input sub-system injecting is disabled
   temporarily
8. Support for Autonomous Low power mode in Linux driver
9. Deadlock fix (this was provided as a patch on Maint2 some time back)
10. Allow Tuning parameter update anytime

Fixes:
11. Code optimization in histogram functions saved about 4Kbytes of
    stack size
12. Improved accuracy in offset calibration functions
13. Improved accuracy in inter measurement period used for TIMED modes

Change-Id: I603d25d54a5f264eb415431ee3acecb74961a301
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Reviewed-on: https://gerrit.mot.com/1304907
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sumit Jamadar <xkbr38@motorola.com>
Submit-Approved: Jira Key
2019-02-13 13:00:31 -06:00
Konstantin Makariev
5ebb7fdebe fixup! (CR) synaptics_mmi: firmware upgrade with older bootloader
Original commit mistakenly took out a piece of interrupt handling
procedure. Getting this issue fixed

Mot-CRs-Fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: Icf41f2497b5b470d81713b5f9e1b25e68e7a7611
Reviewed-on: https://gerrit.mot.com/1307876
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-12 13:07:13 -06:00
Konstantin Makariev
e81d0de7c6 synaptics_mmi: firmware upgrade with older bootloader
Original change made to fwu_read_flash_status and fwu_wait_for_idle
functions unexpectedly created incompatibility with older BL
versions. This commit restores compatibility with BL version
6 and older.

Change-Id: I30d20fa6acd3352dd01ec3ac7b681297a046d699
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1306274
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-02-11 08:04:00 -06:00
Ryan Lattrel
2c0c776e55 drivers: qpnp-smbcharger-mmi: use orderly shutdown
User an orderly shutdown for factory kill instead of a
kernel power off.  The orderly shutdown will attempt to
call the reboot binary from userspace first, and then
fallback to kernel power off if it fails.

Change-Id: I38fc885547b31231fc30eb6bce7163f4e3dd0a24
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1306845
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-02-08 16:11:29 -06:00
Ryan Lattrel
4d52915d39 power: qpnp-smbcharger-mmi: remove ps unregister
Remove power_supply_unregister calls on shutdown. The power
supplies use devm register so it should not be needed.

This resolves warnings about reference counts on factory kill
and a potential race condition with power_supply_changed.

Change-Id: I86e78d9b685ba162fb5e5492c4f017227f287e3d
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1306182
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Ling Jin <lingjin@motorola.com>
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-02-08 09:59:10 -06:00
Ling Jin
0d852b3738 Fix user build error
Fix the following user build error:

/motorola/kernel/modules/drivers/mmi_muc_uart/mmi_uart.c: In function
'mmi_uart_close':
/motorola/kernel/modules/drivers/mmi_muc_uart/mmi_uart.c:416:6: warning:
'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: mmi_uart.c:416
make[2]: *** [../../motorola/kernel/modules/drivers/mmi_muc_uart/
mmi_uart.o] Error 1
Change-Id: I156ea7cabddb21092c7dc024c28caa7066450d14
Reviewed-on: https://gerrit.mot.com/1306327
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2019-02-08 00:10:59 -06:00