Driver cannot set RST gpio direction and state explicitly in pictrl
config dur to compatibility reason. Thus adding the code setting
RST gpio high every time pin control switches from Off to On state
Change-Id: I4217b7546f48ec20204bf93b12a15baf95905475
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1411555
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Update the cci_intf driver used for sending CCI commands from
the shell to the Linux 4.19 kernel
Change-Id: I5de934badc2ad2b25cb7148e9abbc95492ba48d5
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-Fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1411444
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <timwang@motorola.com>
Submit-Approved: Jira Key
ABOV_CTRL_MODE_RET is defined in abov_sar.h,
and in abov_sar_a96t.h file, the register name has changed to ABOV_CTRL_MODE_REG.
It will cause build error. Now revert it, and resubmit it.
This reverts commit 16143ccfc41d9c80827615fdd060fd6f72a41c82.
Change-Id: I3605f0df5c3d6b3c1e38f01c8111bcd536044948
Reviewed-on: https://gerrit.mot.com/1411231
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
about the device of abov's a96t346:
active mode: the average current is 1.8 mA;
sleep mode: the average current is 160 uA;
stop mode: the average current is 2 uA;
if the upper layer doesn't disable capsensor,
we should let it enter sleep in suspend.
Change-Id: I0821280e6f52335badcd7dfc0e2c15a08a1eee0b
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1411125
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
If palm detect function is enabled, interrupt will not disable,
IC works in normal mode.
But in case touch event is reported to input subsystem, skip touch event
when suspend flag is true. So input subsystem will not take wakelock
because no one report event.
In this case, we still need read data from IC, so AP can not enter
suspend. Add a 10ms wakelock when this function is enabled.
(TP report rate is around 100Hz).
Change-Id: I867a90844edc2d9372bf6b15f776f6b1a66ef51a
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1409612
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
If palm detect function is enabled, interrupt will not disable,
IC works in normal mode.
But in case touch event is reported to input subsystem, skip touch event
when suspend flag is true. So input subsystem will not take wakelock
because no one report event.
In this case, we still need read data from IC, so AP can not enter
suspend. Add a 10ms wakelock when this function is enabled.
(TP report rate is around 100Hz).
Change-Id: I381a13fca6dedfcb68e0c3048291610da2554f17
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1409610
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
issue: linux kzalloc min malloc size is 64byte,
as sizeof params error,current code only malloc 64bit,
that means will malloc 64byte when probe exec,
but struct is more than 64byte(72byte),
so kernel panic would be triggerd.
solve: change sizeof params to fix this issue.
hese Sarsensor chips have this issue.
Such as Sx9325,Sx9310,Abov chips.
Change-Id: I4c479c0365b91bf86afc0633ce941948703d6912
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407942
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
TP:
Add a wakelock when leave event reported.
The wakelock timeout time is same as leave report timer.
Change-Id: I0c1b1e5f0e7be588c98fe3f9e37ee1aa64374a9b
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407159
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
(cherry picked from commit 046c02edca7b8de7dc998743d4c3ba0af474bf17)
Reviewed-on: https://gerrit.mot.com/1407897
Reviewed-by: Jianqi Yang <yangj@motorola.com>
TP:
Add a wakelock when leave event reported.
The wakelock timeout time is same as leave report timer.
Change-Id: Ifd3859eac54758ee3c1463f2e09b7c146d4ee5e3
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407158
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
(cherry picked from commit 31dce07c39958c7f4dbca9531766e7dddddee2fe)
Reviewed-on: https://gerrit.mot.com/1407894
Reviewed-by: Jianqi Yang <yangj@motorola.com>
1. Remove irq timer handler which is used by outdated IC.
2. Skip irq close request send from HAL. For now, HAL open and close
irq in very high freq, and at last, irq will be set to open state.
When HW report IRQ, but HAL set irq state to close. This will cause
missing IRQ issue.
Change-Id: I5448ef89cfe988197d4204b17e4764b730ec1ad4
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407246
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Both panel suppliers: BOE and CSOT are changing Tx/Rx layout while
switching from EVT to DVT revision of HW. LSI provides no facility
in their firmware to distinguish HW variants. Thus driver will be
matching panel id and version in chosen node with id and version
for EVT provided as a mapping table in LSI device tree.
Change-Id: I265caced054f19ab2f985bf798dd169e09097fa0
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1406669
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Added multiple suspend/resume scenarios to the driver. First option is
to perform HW reset on resume. It implies that touch IC will be put
to sleep mode when suspended. Device tree property sec,reset-on-resume
controls it. Second option is to turn power supplies off when suspended.
Device tree property sec,power-off-suspend controls it. Second option
takes precedence over first one when both enabled in device tree.
Change-Id: I93a99152397ea15f46a01c2f1a0ca8bd68c9f732
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1405038
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Clean up some unused macros. Fix charger mode set function
Change-Id: If80fc134db1a2132e30e4b12a1e565fffd0bc197
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1405014
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Added USB cable detection support to better handle charging noise.
This is optional feature controlled via device tree property
sec,usb-charger-detection. Fixed suspend mode current drain by
using sleep power mode instead LPM.
Change-Id: I53357cd578ec8412006dcf664558776c6cbadb7b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1403963
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
-solve that sar sensor of olso-h didn't work
-Compatible with previous projects
Change-Id: I33a2cdd2065205491f78e4f7d111e3bb124fc0af
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1404580
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
Update ram info to handle ddr5, which uses a new
struct from the bootloader with an extra flag.
Also re-work error handling, previously it was possible
that if a wrong size is returned, the pointer to the
smem struct might not be null and we will still try
to access it, causing a panic. So, do not add the
sysfs entry if it is not correct.
Change-Id: Ib195543175528d0477266281080c4dc4a96abd3c
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1402645
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-by: Curtis Porter <porterc@motorola.com>
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Fix missing includes and warnings that show up when
building with the clang compiler.
Change-Id: I3eadc724df1598c4c2efe0ca1e18d6a6b7013367
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1401055
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Curtis Porter <porterc@motorola.com>
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Set voltage might fail due to regulator constraints settings, which is
not fatal error and thus should not fail the probe.
Change-Id: I4e1c5dae7acb2fddd5eedbdbc1bab3a81ef4f961
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1400192
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Since the device is detected by i2c communication after the device power on,
the probability that the drivers cannot be loaded normally.
Fix the a96t346 drivers loading abnormal.
Change-Id: I6eefa6fa718d39e67cac5087816ca99552223f1c
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1400568
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Difference between ft8756 and ft8009 is only CHIP_TYPE_MAPPING,
so use ft8756 configs firstly.
Change-Id: I79f3e04bf0a31c4a94091bd8f8525b2dd87af1d7
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1399541
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Add option to build using clang via
USE_CLANG_FOR_MODULES. Add to the appropriate
board file for the product that needs clang.
Change-Id: I05578ac49de38887b3f359276a3350d0bb5a18db
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit includes the following enhancements:
1) debug interfaces moved from Samsung specific sysfs path to I2C
device path
2) write register interface added
3) write register and erase firmware interfaces only available
in factory mode
Change-Id: I12504e99506c1a1bc76b3c9622814dbeac249438
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399692
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
QG uses the battery supply charge done property for
capacity learning, but qcom battery may not be in
charge done state when mmi charger terminates the
charging as battery is full charged.
In that case, QG will not trigger the capacity learning
when it completes a full charge cycle.
As the FULL charge state is mantained by mmi charger, so
set the charge done state once mmi charger complete charging.
Change-Id: I574e6f3349949882bb38a759835cf85a67386fb5
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396976
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Originally it was planned to do HW reset on resume. However, HW
reset was taking way to long and S.SLI suggested first to switch
to SW reset and then to simply set Normal power mode. Thus this
commit combines 2 things:
* new parameter to reset function (hw or sw)
* setting normal mode on resume
Change-Id: Ic52737f09cc7848377f91b274b47ee6dacee5204
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1397255
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
When count =1 and charger also present, it will run count reset and
cancel charger check work, so add charger present condition.
Change-Id: I4a6b871cc23a18b8f9412d16f35949c610cc17e3
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396760
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Adding sysfs entry to report panel supplier name retrieved from
mmi,panel_name property of chosen device tree node. That property
gets initialized in bootloader based of results of HW detection.
Change-Id: I1c0a4ac8dc008ab8a41ae3da77cdc7ec9b2d20e2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396198
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
There is no need to assign synaptics name to input device for
primary touch.
Mot-CRs-fixed: (CR)
This reverts commit ca0acb312a01582663d3a485f85f7a67390cf088.
Change-Id: I4d787c44b343727c9917fe7eaf036ce63bd673ad
Reviewed-on: https://gerrit.mot.com/1396206
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key