Commit graph

1,355 commits

Author SHA1 Message Date
xuwt2
4e5372dc1e power/driver: add bq2597x_mmi driver
Add Ti bq2597x_mmi driver

Change-Id: I3c7b42f4b478eb022b228a2be6c12c17ea831646
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1197165
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1202298
Reviewed-by: Ling Jin <lingjin@motorola.com>
2018-06-30 12:45:35 -05:00
wengjun1
5b22dd7178 dlkm: input: Port focaltech touch driver
Add focaltech driver into dlkm.
- The dependency on CONFIG_TOUCHSCREEN_FOCALTECH*
are removed in the driver
- Add focaltech,fw-update-mmi in dts for moto firmware update
process
- Changes related to resource release to prevent kernel panic

Change-Id: Ib38c51969e58f827e2996de1a0550bade39036e7
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1200328
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2018-06-28 21:28:18 -05:00
Kenny Kessler
1f328b563e power: max170xx: Update CGAIN
Change default profile CGAIN to 0x7FFF.

Change-Id: I370bec696b91b8559f4e563fc9baa9e6e9416eec
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1201224
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-06-28 10:44:26 -05:00
Weilong Wu
7f188b3d94 dlkm: nfc: add st21nfc driver
Add new vendor NFC st21nfc driver.

Change-Id: I68ecf09272480b62faca365db0d4e3284af94fbe
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1200342
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-06-27 21:10:23 -05:00
Kenny Kessler
94e2472fb0 power: qpnp-smbcharger-mmi: Add Initial MMI Charging driver
Add the dlkm for mmi control over the qcom smb charger.
This initial drop only gives access to the factory
interfaces but over time will be granted more control
over total system charging.

Change-Id: I408a4e36dab976697d1f98499bf33b6378deaf96
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1200750
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-06-27 20:43:21 -05:00
yangjq
3634bf64d3 Optimize awinic vibrator driver
Optimize awinic vibrator driver on rio_h(lake)

Change-Id: Id29f711a81fcb21f591f33c085583e9b6930f9da
Signed-off-by: yangjq <yangjq@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1197624
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 64be27fd213d5b329654c9ecc5d8317b570a5c0f)
Reviewed-on: https://gerrit.mot.com/1200186
2018-06-27 03:46:19 -05:00
Ryan Lattrel
b1d1de9b5b modules: Add muc uart driver
Add the driver to talk to the muc via uart.

Change-Id: I4f2b0b1a99d6834b668a15c594ccd4f0188a8eaa
signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1174586
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-06-25 15:58:28 -05:00
Kenny Kessler
ba6eb8c580 power: max170xx: Enable DBFS entries
Enable the entries for DBFS direct register access.

Change-Id: I23213a739e85bdb3d9ed73f4686ee55ccb537c25
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1197884
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-06-22 15:32:13 -05:00
Ravi Vembu
baf3d1b4fc madera: Add ref clk for codec
Enable the ref clk when the codec is not in reset.

Mot-CRs-Fixed: (CR)
Change-Id: Ic6d0d3f869621b193747f7ba309c2fb18b6a2573
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Reviewed-on: https://gerrit.mot.com/1197391
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2018-06-22 12:43:24 -05:00
chenlj2
3fad82963b motorola:dlkm:sx9325 regs modification
-regs:0x28,0x29,0x2A modified

Change-Id: I71ca7b87917d46e8e738c4860c5a554ffd8e6e4f
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1197589
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-06-22 03:02:31 -05:00
Kenny Kessler
f8997df374 power: max170xx: Add MAX170XX driver
Create initial drop for MAX170XX which is based on
based on teh max17042 driver.

Change-Id: Ide3cd2e8fd0dc5585c0c10665873b66845b2c45e
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1197354
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
2018-06-21 17:46:07 -05:00
Ravi Vembu
20fae43331 codec: Don't default to CS35L41 SPI codec.
Some targets may not use CS35L41 AMP. Do not default to the
SPI codec as it may break the build.

Change-Id: Ie5e0da0e9a7318a99480f97df73620ea51e11d28
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-Fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1196742
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2018-06-20 15:45:19 -05:00
haojl2
25fb12224c input: ets_fps_mmi: Inital egis fps driver
Poring Egis fps driver.

Change-Id: I6313631950869d7d44dc155538034ba4a85f323f
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1181700
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2018-06-20 04:58:18 -05:00
Wen Xie
87709cb9cd ASoC: Tas2560: Add audio codecs
Add audio codecs Tas2560 driver.

Change-Id: I0806dc5427b7c8bdd3447e06ebd1e92d9a8ec22c
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1196381
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
2018-06-20 02:54:39 -05:00
haojl2
de28d59ec4 misc: Port TI drv2624 haptic driver
This driver is ported from moto kernel branch bomr1-8998

Change-Id: I930cfda493ad081fbd6a3383211043bb5ad4488f
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1190730
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2018-06-20 02:22:07 -05:00
liaohj
9a099837ee Ocean : audio close tfa98xx debug macro
- close tfa98xx debug macro.
- fix complie error,if no define TFA9874_NONDSP_STEREO

Change-Id: I14ffe544a6a5a25db106a9a7a68df725bf3223a8
Signed-off-by: liaohj <liaohj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1195735
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuesheng Huang <huangys@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-06-19 03:56:38 -05:00
Vlad Karpovich
ead2ce4336 ASoC: cs35l41: Set DSP FW name suffix to an empty string
DSP preload function adds "(NULL)" string to the control
name if a dsp suffix is not set. As result the control
could not be find. Zero lenght string will fix that issue.

Mot-CRs-fixed: (CR)

Change-Id: I9e8f88fb2ac10d7143b0434926dc9b589138c298
Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
Reviewed-on: https://gerrit.mot.com/1193402
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2018-06-19 03:00:44 -05:00
Konstantin Makariev
20934360c1 utags: add kernel version independent read call
Function kernel_read prototype is different in kernel 4.9 and 4.14.
Adding conversion function based on LINUX_VERSION_CODE

Change-Id: Ic993ae91ddbc4db4608822009954208923abe205
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1194418
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2018-06-18 14:18:40 -05:00
liaohj
27e46b7985 Ocean NA: audio bringup ,add tfa9874 driver
add tfa9874 driver as modules.

Change-Id: I53bc97d1435f44033cb4a17a7258ce38905a5b2f
Signed-off-by: liaohj <liaohj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1194107
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-06-15 08:17:13 -05:00
Konstantin Makariev
145fc10ebb aw896x: awinic haptics driver
Initial DLKM code

Change-Id: Ib6f27aa7deeb9807d46fbf2264181c5612c14a41
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1193016
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2018-06-14 14:21:46 -05:00
chenlj2
880641c595 sensors:optimise SX9325 driver
-output more regs information

Change-Id: I95384c36813a0a7ce4a143306a12b9d169a6f5eb
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1193256
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2018-06-14 04:24:17 -05:00
Vlad Karpovich
ec13514954 ASoC: wm_adsp: Fix Preload control name.
Set suffix to an empty string if it is NULL to avoid
adding (NULL) to the conroll name.

Change-Id: I61e2b93cbda10b6ba5300b652b6fb0f6c49057bf
Signed-off-by: vkarp <vkarp@motorola.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1193034
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2018-06-13 15:01:19 -05:00
Ryan Lattrel
c38a72e014 modules: f_usbnet: add missing include
Add missing include.  Will not build in 4.14 otherwise.

Change-Id: I3417e2e58c7a37798420edbfd5bb860b91a195f9
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1180413
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Ling Jin <lingjin@motorola.com>
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2018-06-12 09:36:20 -05:00
zhouwl
16d7c9431d misc: move tps61280 driver into its own folder
Create tps61280 directory and move tps61280.c into it.
When put this file in root of misc folder, system will compile
cs40l2x together, build motorola_kernel_modules_drivers_misc,
this is not we want, we need build
motorola_kernel_modules_drivers_misc_tps61280.

Change-Id: Ie89182423172be16f85e8cfa01cb1a8c9360f689
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1191062
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
2018-06-12 06:45:39 -05:00
Konstantin Makariev
73629a9861 synaptics_mmi: prevent soft lock on reboot
Reboot callback might be called multiple times causing a soft lock.
This change clears flags and invalidates pointers to avoid repeated
function call.

Change-Id: I73010f64960f238faacd2fac2f2a831e36b63d71
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1190524
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2018-06-11 14:52:32 -05:00
haojl2
c187fcf12c synaptics_tcm: Disable wakeup gesture
This feature is not used in moto projects.

Change-Id: I21b4ab7f33e448e4ce7bfaa4992ed26900b64b90
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1189236
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2018-06-08 05:46:44 -05:00
Wen Xie
fd4d86b0cd motorola: dlkm: Add Sarsensor sx931x
-Add the Semtech Sx9310/Sx9311 DLKM.

Change-Id: I13cc4e70a43d02f6de6148895c168fd9db3ff497
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1188111
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2018-06-08 00:06:50 -05:00
Jeff LaBundy
3ca806f96d misc: cs40l2x: Add GPIO1 device tree entries
Added device tree entries for default GPIO1 rising-edge index,
falling-edge index, and falling-edge timeout to be written to
the corresponding DSP firmware controls during initialization.

Change-Id: Ib8f0b662fdf8367e31608cdc121fdcade0fdd1be
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
bf29268493 Documentation: cs40l2x: Add GPIO1 device tree entries
Added device tree binding documentation for GPIO1 rising-edge
wavetable index, falling-edge wavetable index and falling-edge
timeout device tree entries.

Change-Id: I0b527eda2969428aadc0a8bd11131f46387cc3d6
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
cd5ebc4a19 misc: cs40l2x: Add bounds checking to timeout controls
Added a safety check to ensure that the values written to the
gpio1_fall_timeout and standby_timeout controls do not exceed the
maximum value supported by the DSP.

Change-Id: I8b5dca1f5013acb2d06688af577d0214ce956559
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
David Lin
0e68b2ef46 misc: cs40l2x: Do not use stack buffer for regmap_bulk_read
SoC bus controller driver may choose to use DMA for the underling data
transfer. This patch removes the usage of stack for DMA buffer.

Bug: 79998874
Test: manual haptics test
Change-Id: I5729ecc9751eb1af768261b66c499ccb9957cb69
Signed-off-by: David Lin <dtwlin@google.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
e9867607c7 misc: cs40l2x: Restore additional registers following basic mode
Added GPIO configuration and amplifier digital volume to the list of
registers restored to their respective default values following the
shutdown of ROM mode, but the initialization of RAM mode (B1 only).

Change-Id: If317a0b7145718d45cea3249037a503d60c32d37
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
9454721ee8 misc: cs40l2x: Remove aoh_auto_enable control
* Removed the ability to force the PLL active (aoh_auto_enable = 0)
  as it is forbidden to do so with firmware revision 4.1.0 and above.
* Fixed playback queue polling interval to 5 ms.

Change-Id: I2e79a0becbdd2f7d4e10d15af0f675f945f0ab9f
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
4fd0b8d167 misc: cs40l2x: Add suspend blocker support
Added wakeup calls in order to prevent the system from suspending
while continuous vibration is in progress.

Change-Id: I295fbe3098ebda4710bcd90653609c284d8c69a3
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
845da911f3 misc: cs40l2x: Eliminate local storage of digital volume
Replaced references to a local copy of digital volume (mapped to the
dig_scale sysfs control) with an actual query of the device.

Change-Id: If5c1a3d65a4466299f198f751f6364e979243fd1
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
74625b10a3 misc: cs40l2x: Use firmware amplitude control for playback queue
Replaced changes to the chip-level digital volume control (dig_scale)
during execution of the playback queue with changes to the firmware's
control-port-triggered amplitude control (cp_dig_scale) to prevent
changes to the amplitude of GPIO-triggered playback during execution
of the playback queue.

Change-Id: Ice5b7a36978a73f2c2408f2f1ead8dbb48dbe8f9
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
be1a2bed27 misc: cs40l2x: Expose firmware amplitude controls
* Added sysfs controls for the firmware's separate GPIO-triggered
  playback and control-port-triggered playback amplitude controls.
* Increased the minimum supported firmware revision to 4.1.0.

Change-Id: Idae3fa1a839871cfa2760f14fc3b6ecf707fbd93
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
d834ef678c misc: cs40l2x: Add f0/ReDC device tree entries
* Added device tree entries for default f0/ReDC values to be written
  to the corresponding DSP firmware controls during initialization.
* Added device tree entries for minimum and maximum values that may
  be written to the f0_stored and redc_stored sysfs controls.

Change-Id: I5b681efc38e466d1545496f327da66f189c8fc89
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
ecbe7bb187 Documentation: cs40l2x: Add f0/ReDC device tree entries
Added device tree binding documentation for default, minimum and
maximum f0 and ReDC device tree entries.

Change-Id: I7f3d7170e51e81bf4900c4065500a78fbae55878
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
cc094c82cf misc: cs40l2x: Add nested loops to playback queue
Added the ability to group multiple segments together and repeat them
multiple times within the queue.

Change-Id: I0eb3a4931092961e8ac332ee5f4d5507a0128c20
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:36 -05:00
Jeff LaBundy
869f552313 misc: cs40l2x: Use length-limited string functions
* Replaced instances of strcpy and strchr with strlcpy and strnchr,
  respectively.
* Eliminated use of strlen.

Change-Id: I44e0a47329a2d2d3bc440aee3a0f0bce5f4a0971
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
876eacbc38 misc: cs40l2x: Update errata for reduced haptic latency
Updated PLL loop parameters as per new errata issued for the device.

Change-Id: I772b4b93b91eec6ee1ed90461e3df57ceb0562a9
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
04b908a357 misc: cs40l2x: Route VPMON to DSP
Routed the battery monitoring ADC output (VPMON) to the DSP in support
of DSP algorithms that may query the battery voltage.

Change-Id: I8d83ed6a3f8ad7f0d985406eb4ef4038760151ca
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
98d5fb77b8 misc: cs40l2x: Add basic-mode haptics shutdown sequence
Added a shutdown sequence to safely exit basic-mode haptics following
device power-on, prior to re-initializing the device and booting the
DSP into normal operation.

Change-Id: I3955f60fa736071d0af80edc65777100ef9865b0
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
e539311c99 misc: cs40l2x: Add errata for reduced haptic latency
Added errata writes for expedited PLL lock time in support of reduced
haptic latency.

Change-Id: I558a895c9973752759ff17f4212db8bbb6027337
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
dc70b9930b misc: cs40l2x: Add support for OTP memory map 0xE
Added map 0xE to the list of packed OTP memory maps supported by
revision A0 silicon.

Change-Id: I86f60afd5af223617a70d61cb3185e7c38078b64
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
4d12bb0500 misc: cs40l2x: Add Always-On Haptics disable control
* Added a sysfs control to prevent the device from automatically entering
  standby in order to reduce latency of subsequent haptic events.
* Reduced the polling interval of the playback queue for cases in which
  automatic entry into standby is disabled.

Change-Id: I5e695b33641ffe305b95f73f2eef89c94de65922
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
23248efe7d misc: cs40l2x: Add playback queue support
* Added the ability to trigger multiple waveform indexes and delays in
  a sequence based on a string passed to a sysfs control.
* Moved the call to start vibe_timer to the vibe_start_worker function
  and restricted the timer's use to continuous playback.
* Canceled vibe_timer prior to destroying vibe_workqueue.
* Replaced hard-coded waveform indexes with macros.
* Replaced all digital volume register writes with a single function.

Change-Id: I1b28bcc8d9d2a90bda432f0d3def83563baf9496
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
e03c0063ac misc: cs40l2x: Update DSP initialization for revision A0 silicon
* Enabled the device prior to enabling the DSP to ensure internal clocks
  are present while revision A0 silicon initializes firmware.
* Corrected the waveform filename and replaced with a macro.
* Updated the minimum supported firmware revision to 3.0.0.

Change-Id: If41a6865e661e55f3eed8f401bcfe19176af3de3
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00
Jeff LaBundy
fca66161fa misc: cs40l2x: Add support for Always-On Haptics
* Removed write to GLOBAL_EN during initialization as this control is
  now managed autonomously by firmware.
* Replaced trigger control DSP memory addresses with their fixed-address
  representations in the mailbox space.
* Added sysfs controls for the firmware's GPIO1 falling edge timeout and
  standby timeout controls.
* Increased the minimum supported firmware revision to 2.1.0.

Change-Id: I38cdac4e6ac79fb8f354750ac724ce119eb7764c
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
2018-06-06 14:15:35 -05:00