Commit Graph
60 Commits
Author SHA1 Message Date
tin_bingtai.zou_tmp 3fa32c60ae optimize aw963xx driver
1.optimization of secondary interrupt triggering logic for sar
2.modify driver aw963xx

Change-Id: I81782749f4cc8c62be421316e9d367f0d9d92156
Signed-off-by: tin_bingtai.zou_tmp <tinno60@motorola.com>
Reviewed-on: https://gerrit.mot.com/2585232
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <yangyi31@motorola.com>
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-04-23 01:21:54 -05:00
tin_bingtai.zou_tmp 99381ee852 optimize aw963xx driver && insert usb calibration
1.optimize driver about multiple mode
2.insert usb calibration(aw config flag in dts)

Change-Id: I392f5cf266647abf3b6eb0aa649f8061d944871b
Signed-off-by: tin_bingtai.zou_tmp <tinno60@motorola.com>
Reviewed-on: https://gerrit.mot.com/2575217
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <yangyi31@motorola.com>
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-04-14 02:48:10 -05:00
tin_bingtai.zou_tmp 4b93d45e50 sar sensor bring up 1/2
1.sar sensor bring up
2.modify sx937x driver for secondary sar

Change-Id: I3eef88077a14e7e1dab92c860406d0b1ee35a02c
Signed-off-by: tin_bingtai.zou_tmp <tinno60@motorola.com>
Reviewed-on: https://gerrit.mot.com/2552802
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <yangyi31@motorola.com>
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-03-27 05:32:41 -05:00
tnyangc 5540075a2b sar sensor bring up -aw
1.sar sensor bring up
2.add aw driver

Change-Id: I42564cc4393fdbe30a63722d544b7e84c578a177
Signed-off-by: tnyangc <ramiel.yang@tinno.com>
Reviewed-on: https://gerrit.mot.com/2554436
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <yangyi31@motorola.com>
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-03-27 04:40:20 -05:00
cuijy1 6e1740fd14 sx937x: add flip near & far reg list
when flip state change, modify reg list which read from dts

Change-Id: I739c6fb5b1a531886b6fce527451633cb74af912
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2514472
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-02-17 00:38:41 -06:00
qiurp1 79cc991419 zeekr:modify capsensor driver
add lable to distinguish whether to calibration
when flpi state change

Change-Id: I00d386ee6c5dd70ba22b1fba3e22fb6cd5704b79
Signed-off-by: qiurp1 <qiurp1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2498055
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-01-31 03:30:07 -06:00
weimh1@motorola.com c3949d41a0 sx937x: reset chipset instead of cali
1.porting from sx937x about re-initialize machanism
  2.reset chipset instead of cali for bronco only,
   use dts to control it and will not impact other projects

Change-Id: Ifd616a57863cdd96641440a5b2926ec9286f60ee
Signed-off-by: weimh1@motorola.com <weimh1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2463575
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-12-16 03:51:44 -06:00
wunan3 5739c4fae5 Devon:seperated DVT1/DVT2 sar sensor firmware
WHY:sar sensor need seperated firmware
HOW:support multi firmware

Change-Id: I2a77adb3dea88b57f9f4a85ad463f1d992dfdae4
Signed-off-by: wunan3 <wunan3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2237527
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-04-10 21:54:36 -05:00
qiurp1 bbbc9a2bce ONELI/LI: add calbration driver of capsensor
add digital headset calbration,usb_calbration,
load parameter when flip far/near

Change-Id: I766d7166c8b91c7a24763576e78adc2f99a76a9a
Signed-off-by: qiurp1 <qiurp1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2231946
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2022-04-07 01:47:35 -05:00
longc100 70f8bc91e8 devon:sensors bringup
WHY:devon:new project sensors bringup
HOW:fix aw9610x code,devon use ext ldo ctl by gpio

Change-Id: I3af035617bfa383243d121c9eed0f61e423d2d6f
Signed-off-by: longc100 <longc100@motorola.com>
Reviewed-on: https://gerrit.mot.com/2205222
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
(cherry picked from commit 1e9aa7f0f254143a03837fee68305dc0fa111e0e)
Reviewed-on: https://gerrit.mot.com/2205886
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2022-03-03 02:36:57 -06:00
cuijy1 6a64c7429e sar:add driver for multi sx937x
add driver for multi sx937x

Change-Id: I0ec688cec7b7773f0ab4d578189e51da26122a4d
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2188738
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2022-02-14 03:53:29 -06:00
huaqin79 0678779d3b sar: aw9610: Modify sar sensor voltage.
The power supply of sar sensor is changed from 1.7v
to 2.8v to solve the problem of voltage jump

Change-Id: Ia731c372ddce703743d3966ddf7e185e5225cb06
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138719
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-08 04:30:28 -06:00
zhangh12 def94f695a sar: aw9610: the reference channel can't be seen on user layer
ref_channel will be tested failed on factory, it should be filter for user,
add "ref_channel" on dts, it won't be registered to sensor_class.

Change-Id: Ibc5c927d5441665066aba990ecab36dbd7d03e47
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2134407
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-06 02:33:14 -06:00
zhangh12 484bae18fd sar: add aw9610 driver
add the driver of aw9610,
modify the build scripts.

Change-Id: Ic2be827fd281759c6184e68cfe5690f76642cc46
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110739
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-11-09 02:08:48 -06:00
Jiyue Cui 908e2bdb8b Revert "(CR) sx937x:mv ps_get_state to work callback"
This reverts commit c2f744d014225db0494144bcc874be8d0c3dbf13.

Change-Id: I14be7ed2aefdd0522d70f6eb2ac2d7c9e2d8e254
Reviewed-on: https://gerrit.mot.com/1991079
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-24 09:27:28 -05:00
cuijy1 b43fdec148 sx937x:mv ps_get_state to work callback
ps_notify_callback warnning for block function usb_psy_get_prop()
mv ps_get_state to work callback

Change-Id: I856879ccd0d727660bc92c945445a64b4a03fddb
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1977442
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-23 04:55:46 -05:00
zhangh12 34605de176 sx937x: reset sar on i2c failures
porting from x933x,
Re-initialize via a watchdog failure

Change-Id: I5df7d15c9bc62d77940e7da1f57425d245bf5c86
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/1935976
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-04-30 03:45:19 -05:00
zhangly19 b16994d232 DLKM/Sar:add abov 7ch driver
-add abov 7ch driver
-add abov 7ch header file

Change-Id: I0a7e5214c25157ae4fff07d22fd301b2e395637e
Reviewed-on: https://gerrit.mot.com/1803336
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Nan Wu <wunan3@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-11-16 03:01:02 -06:00
weimh1 4e93c431df driver/sar-sensor: sx937x bring up
1.update paramters
  2.adjust driver to match new params

Change-Id: I3affc71bce80ca8ce1558179df1f4305640df163
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1801960
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-11-13 02:36:31 -06:00
zhangh12 e222b9be7f [capsensor] add debug info for read_rawdata
venor provide a new driver for adding some debug messages
on read_rawdata().
cmd: adb shell "logcat -b kernel | grep SMTC_D"

Change-Id: I0e0ebc09d48b1d34d40d581f9a3cdf43dcd7cf97
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/1773854
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
2020-10-29 22:51:47 -05:00
weimh1 d2c353851a driver/sar-sensor: add sx937x base driver
1.semtech sx937x support multi channels(6/7/8)
  2.add sx937x to bo common branch

Change-Id: If434ed22b6c92fe3612bda882bee8eb7405fe8f7
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1779278
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-10-19 22:57:17 -05:00
tnlizd a88706793f sx9338: sar sensor bring up
caprip:
1. add sx9338 sar sensor support

Change-Id: If1357134f8b0e4b2d420c3ff444aedde31ed243d
Reviewed-on: https://gerrit.mot.com/1758991
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2020-09-25 01:40:12 -05:00
chenlj2 6cb005d0f4 DLKM:modify capsensor_enable_flag_t enum for abov
abov chip works abmormal in Qsensortest APK
branch:bo

Change-Id: I66a1bdef56162c46e4c5fa094394e15cd4f88d47
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1718306
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2020-08-12 03:06:12 -05:00
chenlj2 6bcd3fe49e DLKM:control VDD off when sar sensor is off
It's used to save power.
It's only used on Borneo NA

Change-Id: I2aa60149f0a362dc29fc0eded5c509a9fd4ddc7c
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1718145
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2020-08-10 02:26:39 -05:00
Ryan Lattrel e5ce10d03d sx933x: reinitialize via i2c watchdog
Re-initialize via a watchdog failure instead of a general
i2c failure.  This will allow us to recover from failures that
happen during init, and re-init.  The current solution does not
account of the fact that init could fail, and if init fails
there l(CR) won't be an interrupt that will drive the i2c
read/write failure to cause a recovery.

This should also reduce false postives, such as if we failed
to read i2c while suspending/resuming.

Change-Id: If7579a90c6490d5f9c4fec4c0d3e7b74cb8bdcaa
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1690483
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-07-20 17:08:19 -05:00
Ryan Lattrel 420066548b sx933x: reset and re-init the device on i2c failures
If we get an unexpected i2c failure, toggle the ldo
and re-init the registers after it is back online.

Change-Id: Ie17a208fb612264a6ddc8cb5fff16e3123b5719e
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1672836
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-07-17 14:31:52 -05:00
chenlj2 3ab651e580 DLKM/sar:optimise process of sar to support 4 channels
compatible with 3 and 2 channels
support 4 channels only in borneo
the sar chip default support 3 or 2 channels

Change-Id: I0a594fe18ebff2679b0ada26646f44b50afce67f
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1640530
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
2020-06-24 04:43:59 -05:00
cuijy2 e51af2ddaa capsense sx933x recive headset state
when headset insert
use special reg config

NO_PROP_NEEDED: only racer need this change

Change-Id: Iaea4faf18b5fce845a05f7262b2e683e1e37c16b
Signed-off-by: cuijy2 <cuijy1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1539481
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Submit-Approved: Jira Key
2020-05-08 03:29:33 -05:00
Ryan Lattrel 9f28f0ef46 sx933x: update registers on open/close
Update configured registers on open and close events
if set in the device tree.

Change-Id: I004f519e1dd5851a93affab81598969509f27712
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543714
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-04-29 14:17:00 -05:00
chenlj2 d52429660e DLKM/sarsensor:add tcmd test interfaces for abov mmi
1. add fw_download_status sys interface;
2. add int_state sys interface.

port form:
https://gerrit.mot.com/#/c/1539901/

Change-Id: I809e33078d66fe04b1b3678a690e5e19c7bdddf0
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1540822
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2020-04-23 03:51:46 -05:00
Wen Xie 321c070657 DLKM/sar: Add fw mode detection for A96T346HW.
guam sar bringup:
Add fw mode detection for A96T346HW.

Change-Id: I81a0f4802fda3b276b870a3fa758528871d31a4a
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509854
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2020-03-25 03:56:55 -05: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
linhonglei 1ac4f19994 kernel/sar: update a96t driver to support two channel
Modify driver files and read properity channel number node
Distinguish two channel number or three channel number

Change-Id: I9a00992c9875e94fe00711e92d6f74121327fb6b
Reviewed-on: https://gerrit.mot.com/1478286
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <honglei.lin@ontim.cn>
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqiu Huang <huangjq9@motorola.com>
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2019-12-31 02:48:08 -06:00
litong 9c5394f8c2 Synaptics updated driver code to V2
TP:
The touch driver code is updated to second version
of synaptics.

Change-Id: Id460de3197aaee25cefeab918923212a484c8346
Reviewed-on: https://gerrit.mot.com/1468558
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
2019-12-10 04:39:04 -06:00
cuijy2 9e562a85c2 factory:add sx9331 interrupt line test for doha
add sx9331 interrupt line check node int_state
tcmd_send 009b03

Change-Id: I4187bfac87e829d2e3e2b9f19e84cbb8cd6dac65
Signed-off-by: cuijy2 <cuijy1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1445145
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2019-10-27 22:20:36 -05:00
huangjq9 a143cdade2 sar-sensor: fix some issue about a96t
- fix the sensors enable/disable confusion;
- fix the initial mode is not in stop mode for a96t;
- fix the issue about the update work;
   the initialize(this) no calling under mutex_lock;
- fix the detection about above_detect(), the max time is 75ms.
   so, we need set the detct time to 100ms.

Change-Id: I070c908fcb8edadb4dad51fa7a749e912d19f0a1
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1414619
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-09-03 09:22:49 -05:00
huangjq9 862d3dc87e cap-sensor: fix some issues for a96t346.
- change the sensor name to top/bottom_left/bottom_right.
- if the upper layer doesn't disable capsensor, we should let it enter sleep in suspend.
about the average current of abov's a96t346:
active mode:  1.8 mA;
sleep mode:   160 uA;
stop mode:     2 uA;

Change-Id: I4ce68cb428d225a7843424e2a3b11f925392de2e
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1411693
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-27 21:32:10 -05:00
huangjq9 b14e4bdafb sar-sensor: add sar-sensor drviers
vendor: Abov
device: a96t346

Change-Id: If31c6f873d51eb17fb7d285aa29d5c68d03f3731
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-08-09 09:47:56 +00:00
huangjq9 57b272c252 sofia: sx933x: Compatible with external LDO.
The default driver uses the PMIC's LDO output.
The sofia project uses an external LDO power supply.
Make the driver compatible with external LDO power.

Change-Id: I0a7d42dbbbd3ae80e65bcd742309f99c532d39f1
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1379366
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-07-08 01:38:13 +00:00
Ryan Lattrel ca50551fda sx933x: add recal on flip
Recalibrate the capsensor when the extcon
flip device is changed.

Requires an extcon parameter in the device
tree node.

Change-Id: I7a7408a064620fdd67a55a7f2f877d4a3542bf00
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1290732
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-01-29 13:43:56 -06:00
hujing3 6f0074005e DLKM: focaltech tp firmware support for ft5446
surfNA: focaltech new ft5422u IC support
add new ft5446/5422u firmware upgrade logic

Change-Id: I91f8bd41f6ea4cc2d7cd8999e3d4e87ee8742918
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1285518
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2018-12-20 02:27:15 -06:00
Ryan Lattrel 53d25de060 sx933x: calibrate on phone present
Limit the recalibration on phone power supply
events to present changed.

Change-Id: I6c6a49820ef93c3062c13c56aa3322b495ea40b4
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1279109
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-12-10 15:25:52 -06:00
Ryan Lattrel 9966367f76 sx933x: only sense enabled channels
When a channel for the capsensor is turned on,
enable sensing only on that specific channel.
Same for disable.

Previously, all channels were enabled when a single
channel was set to enable, and all channels were
turned off after every channel was disabled.

Enabling only the channels we need will reduce
scan time and increase performance.

Change-Id: I77e11b1a66b3cbcfbfdbb9752faecb53dd6a3ea7
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1269356
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-12-10 09:54:06 -06:00
wunan3 6713bcc1e8 sx9311/sx9325:New log requirement for SAR sensor
WHY:Need print value of CS3
HOW:Add debug channel number

Change-Id: Icedda92edaad8a826094d5d638b3b988c5b9b513
Signed-off-by: wunan3 <wunan3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1246425
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2018-09-25 21:57:33 -05:00
cuijy2 61853faa7e Sensors:add capsense sx933x usb and headset calibrate
Change-Id: Iab54aed1244a833adbec8011bbe522f4a074d75e
Signed-off-by: cuijy2 <cuijy1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1230951
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2018-08-24 01:00:31 -05:00
Dharmesh Patel ff4f01d8a8 Revert "(CR) Sensors:add capsense sx933x usb and headset calibrate"
This reverts commit f1f464c061c8d1da51017f76a5ae8b5d5b9468fc.

  CC [M]  ../../motorola/kernel/modules/drivers/misc/sx933x/sx933x_sar.o
  /localrepo/a22472/5g/kernel/msm-4.14/../../motorola/kernel/modules/drivers/misc/sx933x/sx933x_sar.c:410:2: error: unknown field 'class_attrs' specified in initializer
  .class_attrs  = capsense_class_attributes,
  ^

Change-Id: I3795dddd352884c037fb02c50613511a3281b74b
Reviewed-on: https://gerrit.mot.com/1229396
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yin-Jun Chen <a7301c@motorola.com>
Submit-Approved: Jira Key
2018-08-17 16:26:06 -05:00
cuijy2 a14c10ceaa Sensors:add capsense sx933x usb and headset calibrate
Change-Id: I7ba74f85deb6fc4eb427a80e470fbdf6ca9fd34e
Signed-off-by: cuijy2 <cuijy1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1229005
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2018-08-17 03:37:40 -05:00
Guoyue Liu 48a707c56e Revert "(CR) Sensors:add capsense sx933x usb calibrate"
This reverts commit bba073fe7861ff07e7bcb30426d7c889249f4511.

Change-Id: Icdb673ebc2683d5b25e3068b05d039e53aa3cd67
Reviewed-on: https://gerrit.mot.com/1225926
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2018-08-14 02:26:35 -05:00
liugy11 0c6e9c1d62 Sensors:add capsense sx933x usb calibrate
Change-Id: I32e82656b837cf450d536d99451db75624bbbcff
Signed-off-by: liugy11 <liugy11@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1225783
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2018-08-13 22:46:25 -05:00
chenlj2 0eeeb5c97a motorola: dlkm: Add Sarsensor abov
-Add the abov sarsensor DLKM.

Change-Id: Ic40f8088eab798f04be5915bdf17b26853e2a26d
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1216940
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2018-07-28 04:11:46 -05:00