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
Wake up the system from suspend with either the
wake_irq or the attach_irq.
Change-Id: Ia635fdbc24d0bcc138f7416cfa52740175ef126c
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1261634
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Change the sleep timeout period from 5s to 500ms.
Before the timeout occurs the driver blocks the transmission
of messages in the tx queue.
Change-Id: Ib35d28c6e0586b1216bbf5cdd769074b6f4629de
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1262209
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Don't toss the entire message on a bad magic number.
If there is a bad value in front, look for a valid
magic number in the rest of the data, then throw out
the bytes before it. This is to eliminate any
random bytes that might show up before a valid message.
Change-Id: I70c395de146d7368d0d2a6433be329b8d69b5729
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1258434
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
This reverts commit 987d71921e6d284257daff68be69375138ce3d56.
This is not needed anymore since the clk is always on 32K clk.
Change-Id: I7aedfd7d10d558ed1e780637f4b57dfdd3989faf
Mot-CRs-Fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1262244
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
Ensure the the SW JEITA is disabled in QCOM driver.
Also forcibly Disable the HW JEITA since the QCOM driver
will enable it when the SW JEITA is disabled. The MMI
State Machine in this driver is superior.
Change-Id: Idfe42c08f720990a5edfd6cfb01491a89f5cf524
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1261048
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
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
Check the VOLTAGE_NOW property and if it is above 2 V
send back to MUC that VBUS is present. This is needed
mostly for Factory test but might come in hPerry later on.
Change-Id: I16688520611e6087fb04a7cf8006db71496ec519
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1259770
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
This is for factory test.
Set gpio 35,36,136 as output.
Change-Id: Iacdcaf62fa75f46e8aeebff26d152ae9c6c87b95
Reviewed-on: https://gerrit.mot.com/1258547
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Moon Do Seo <moon@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Use polling instead of interrupt for DSP mail box
acknowledgement.
With interrupt method, the amount of time for mail box
acknowledgement can vary, and sometimes long.
This is because interrupt handler reads all interrupt
status registers and masks, which can take long time,
especially on slow I2C bus.
Use polling to directly check for DSP mail box
acknowledgement reduces variability in amount of time
needed, because only 1 register is read.
Cirrus-JIRA-fixed: MMI-912
Change-Id: I21a223bbfdccb3593c61c7d04ae8355f2734c7a9
Signed-off-by: Li Xu <li-xu@outlook.com>
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1259695
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key
There is a corner case in separate earpiece and speaker system, where
speaker path isn't open (so DSP isn't enabled yet) when usecase switches
but AP consumes the event and doesn't send again to DSP when DSP enabled.
Send usecase switches to DSP everytime, let it decide to switch or ignore.
Change-Id: I014d4d607f5a134970c3f8e43d41c296b62b3a46
Signed-off-by: Yoon (Seungyoon) Lee <w22905@motorola.com>
Reviewed-on: https://gerrit.mot.com/1259187
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Seungyoon Lee <yoon@motorola.com>
Submit-Approved: Jira Key