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
Minimum changes were performed on this variable defines, in order to
correct typos, as well as to avoid magic numbers.
Change-Id: I3a94183f2cf28344d464cd4bea319a4897151e80
Reviewed-on: https://gerrit.mot.com/1275094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
TCMD needs to check the connectivity of the CDC_LP_GATE line by reading GPIO1 status,
and CS35L41_GPIO_STATUS1 indicates the status of GPIO1.
Change-Id: I4a563cc228a455f9995fc92bfcf4b11cdfd6136b
Reviewed-on: https://gerrit.mot.com/1274600
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
Replace character device with debugfs for reporting raw data.
Multiple instances of driver and raw data reports supported.
Source files moved to ldc2114_mmi folder to align with other
drivers.
Change-Id: I0357117962f5d492459091c28e8fe1cd403490a2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1277626
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Add the USB OTG interface so that other drivers can enable
the Output. This is only going to be used by MUC devices as
the USB PD driver will handle enabling this regulator for
actual OTG cases.
Change-Id: I3e5984e4310fc56d75b77c5a08916abfacf17eea
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1276550
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
When the MUC sends the VBUS_OUT command notify mmi_battery.
The mmi_battery will handle the Power switching.
Change-Id: I52fecb1683e7634b135a7e975588c1be849cb9c0
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1276549
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
With added ability to run multiple instances of the driver, now all
named resources should change their name to reflect what instance
allocated them. This commit fixes the bug the original code had.
Change-Id: Iad3afefcb04b503d08152365b6be81fbe642d9e3
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1276014
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
The previous commit stopped outright setting of the wake alarm.
Without that alarm, because no wake source is held with charger
present, it could be possible to sleep while charging for a period
that exceeds 60-70 secs. To fix this ensure that the alarm is set
if charger is present.
Change-Id: I50cd409694cb51452c5ca902f64a5b62b94475ca
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1275889
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
when the hp impedance is greater than 5000, we regcognize it as
lineout to instead the orginal headphone
Change-Id: I0a7843c4e8fb7db3f0d5b681210c24e15d56a59c
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1275817
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
update the reset ic sleep time to 100ms
as vendor defined on their common base
Change-Id: I0138620ce138fe26dfd4e3cd9d4e972602019522
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1276079
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
channel: support two tas2560 bin files
-tas2560_TI_row.bin for Channel ROW with smart pa;
-tas2560_TI_na.bin for Channel NA;
-add ti,spk_type_id to distinguish row and na bin files;
-close debug log.
Change-Id: I8ae7805db2e92c807b34f841dd1268db96ba6163
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1274052
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Add a module parameter to control whether we allow the suspend
wakeup alarm to be configured in the heartbeat. This will allow
testing of the feature in case it is needed.
Change-Id: I3f3d0928289362e597c7cc3f20dbe529df4f62cd
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1275055
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Set the value to variable state before it is used.
Change-Id: I240b754483a1d36fadb6759e5c223472d7909cf3
Reviewed-on: https://gerrit.mot.com/1271405
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Andrew Wheeler <awheeler@motorola.com>
Submit-Approved: Jira Key
When the phone is attached or detached from the
mod recalibrate the capsensors. This uses the
power supply device provided by the muc uart
driver.
Change-Id: Ic7002da8301ea3a3d9e3740c1532a0876d95a903
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1269885
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
this change fix that
can not get the fw version first time
Change-Id: I2c63f32d0c210c3b0bfc1cde15dbedb2cd66e422
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1269454
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Add function to upload the firmware to the
muc on a packetbus request to do so.
Change-Id: I53d7444735ae95a945e6194b2e81eb3cd100f18e
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1256019
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Add re-calibration on usb attach/remove feature
to odin and fix it for the 4.14 kernel.
Change-Id: Ib5afce222155e268bd9cf58026effca9dae8cd07
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1267723
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Enabling charging from Factory Image. This will allow boots
while in the factory to skip and charge the device if a Wall
Charger is present.
Change-Id: I3fd3d6f2773c38bebdc2d3c93aef7c847051425e
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1267774
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
When there are multiple Synaptics touch ICs present, multiple
instances of driver need to run concurrently. This change is the
initial implementation of multiple driver's instances support.
Temporarily FW upgrade function is now lauched in probe only
for the first instance of driver and RMI device support ceased.
Change-Id: I59cc1521eee1679922fba77418fc111ff850f1cf
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266638
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Touch now can be bound to display using device tree option. DRM
framework API provides display name to allow comparison. If touch
driver has bound display name specified, then probe will fail
whenever bound display name and name reported by DRM API do not
match.
Change-Id: I4b934efdbc38944faae36c49d093099d9ac50834
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266671
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Take control of the Power supply interface.
This will be done by creating a passthrough "battery" that
passes the properties from this driver to the qcom smb driver.
At first there wil be 2 properties that can be caught and replaced.
Status is needed to ensure the mmi algorithim hits FULL.
Capacity is needed in case of dual batteries where it will be
merged into a singular capacity.
Change-Id: Ib20bf6a574c0c74c01b0fc4a959f57706d3ab83f
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266769
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Make sure to charge back if battery drops to 99%.
This was found beucase after charge FULL the Flip battery
still needed charge to balance voltage. The Main battery
charged the Flip battery. Then Main battery hits 99% but
because Flip was FULL it was blocked from restarting the
Charge controller.
Change-Id: I58d00acf963afeba1c3bf6bf7fbea98b293d4251
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266305
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Curtis Porter <porterc@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
The Flip Voltage will lag a bit more behind the Main Battery.
This is due to path impedance so adjust the Voltage offset to
consider a Taper condition. For Flip only use twice the 50 mV
or 100 mV of Voltage offset.
Change-Id: I4e2be6ed57bd5e097b7d735af3b00d21fc1f9a4c
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1265427
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: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Change pr_info to pr_debug to reduce those too many kernel logs.
Can still enable these logs by the following adb command:
echo "file aw869x.c +p" > /sys/kernel/debug/dynamic_debug/control
Change-Id: I3515457a5c9184022150688b76731363c24249c5
Signed-off-by: yangjq <yangjq@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1266935
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
fix the touch issue
pick up the fix from odm
Change-Id: I76e80f2c3d46055bb592a72d2e05bee31d0e3296
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266915
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
This patch is released by Vendor.
Without this patch, stack point issue may happen.
Change-Id: I710a36021112dcdc9726e3171a8cbb552b7a4e3d
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266527
Tested-by: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
g_zero_event_count not clear after resume.
This will cause ESD recover triggered after resume device several times.
Change-Id: I79d4c0637763ee23544c0eff367a6eeec75cee19
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1266511
Tested-by: Jira Key
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Because this digital volume adjustment only has 21dB space,
it can't meet SOP-0289 requirements, remove this function,
let's use QCom codec digital gain for ramping tuning.
Change-Id: I90ecc9778bffe218704c71236223666e6af3d4cb
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1266429
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhihong Kang <kangzh@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
Limit number of print messages in run time. If necessary, debug
messages can be truned on dynamically through kernel debug interface
echo "file sx933x.c +p" > /d/dynamic_debug/control
Change-Id: Ic317c4076540600f6838a0dae24ca3aaefcd5f6c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1264922
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
remove some DEBUG level logs to INFO level
logs of sx9331
Change-Id: Icba07c38ee19d5b5125221aa0c5daf4cb274a116
Signed-off-by: liugy11 <liugy11@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1264209
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haichao Li <liuhc3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
the POWER_SUPPLY_PROP_STATUS only express charge status,
such as charging,discharging,not charging. and cannot be express
as Charge IC ERROR status.
use the POWER_SUPPLY_PROP_CHARGE_NOW_ERROE to express it
Change-Id: I319e41e903da33f1b052c3b856a0852c3b44c029
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1263621
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
In the bq2597x_mmi drive, the PROP_STATUS was replace with
CHARGE_NOW_ERROR, and the mmi_pl_chg_manager also replace it
Change-Id: Id9cdf2991f54717e2c4ed079b952b633d09efe46
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1263623
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
when the 4-pole headset unplug, APM will receive HEADSET remove event.
then HADPHONE insert and remove event. this cause unnecessary audo route
switch which lead music plyback stuck.
if we change order of madera_cable array, we may remove headphone firstly.
this can avoid this issue.
Change-Id: Icf1af827a3364384b5bc63a8d10dde3a88d38986
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1259458
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key