Commit Graph

1104329 Commits

Author SHA1 Message Date
Linus Torvalds
d7227785e3 sound updates for 5.19-rc1
Not much dramatic changes at this time, but we've received quite
 a lot of changes for ASoC, while there are still a few fixes and
 quirks for usual HD- and USB-auido.  Here are some highlights.
 
 * ASoC:
 - Overhaul of endianness specification for data formats, avoiding
   needless restrictions due to CODECs
 - Initial stages of Intel AVS driver merge
 - Introduction of v4 IPC mechanism for SOF
 - TDM mode support for AK4613
 - Support for Analog Devices ADAU1361, Cirrus Logic CS35L45, Maxim
   MAX98396, MediaTek MT8186, NXP i.MX8 micfil and SAI interfaces,
   nVidia Tegra186 ASRC, and Texas Instruments TAS2764 and TAS2780
 
 * Others
 - A few regression fixes after the USB-audio endpoint management
   refactoring
 - More enhancements for Cirrus HD-audio codec support (still ongoing)
 - Addition of generic serial MIDI driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmKOEiAOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE96FxAAnoVCecFK955fWInCULe15xYpi9kqngDSLAQk
 k6TkbP8AFyX+3PbIb9YVK9u+fLBaZzdK/ZIRqZNfb5T4q8tVTHphg2P+SNB36qaD
 nTTaEQ6dr6VUJO3fwwVBa3NJ+rGPr8KMKLlQGCg/I8HKdFeW2t/mV1YZI/ZxM7Or
 MXu3F5dt3yVXXMgUb33if+atYCXOwJ9YIqe1WHE4oPTtfOhbwiIdFeHgg88Kq7vJ
 ep7PCbyJ0rqfA9BIAnBfQuD9ZoaS7mKlo9xgyauNBzWnbRVd7dYyUnaxH++XLPPS
 GS0MEgftJfmUay6o++I7qrhoTyMKMHN/CU+6RlR1GD6WBpBhQ6T+poLkFDvKqbL8
 kvFEBFrEf0soeAKkUinzl1wCJnzWvpq2PF0EewQp03A3vOL5MOzGdId1wLKLmbCw
 Z0e0HAKTP4/AQeBluLo/SjiNoeSEU76xYYv8tFGv531ybIhvsF0nm/Suv4VZcy0V
 9tr2gLSORDLTBqSJqCf1JgN8oJht0QLirzgSekk8HUvx1JnIwwAaH1Dvy1DMrjyu
 TQ6oRyDS2giHKh7FItv3+U+HE1CkA89dzDvGrIbKrT6xkodHGzLNr0DxaDGuR11w
 H9f9oFEnGBpBxWmfLkGTa8+oBenTz8YRm4Ti8xhZkJkD1ys/4fjasAYoIKJqdnxH
 iG1DWic=
 =5qBk
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Not much dramatic changes at this time, but we've received quite a lot
  of changes for ASoC, while there are still a few fixes and quirks for
  usual HD- and USB-auido. Here are some highlights.

  ASoC:

   - Overhaul of endianness specification for data formats, avoiding
     needless restrictions due to CODECs

   - Initial stages of Intel AVS driver merge

   - Introduction of v4 IPC mechanism for SOF

   - TDM mode support for AK4613

   - Support for Analog Devices ADAU1361, Cirrus Logic CS35L45, Maxim
     MAX98396, MediaTek MT8186, NXP i.MX8 micfil and SAI interfaces,
     nVidia Tegra186 ASRC, and Texas Instruments TAS2764 and TAS2780

  Others:

   - A few regression fixes after the USB-audio endpoint management
     refactoring

   - More enhancements for Cirrus HD-audio codec support (still ongoing)

   - Addition of generic serial MIDI driver"

* tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (504 commits)
  ALSA: hda/realtek - Add new type for ALC245
  ALSA: usb-audio: Configure sync endpoints before data
  ALSA: ctxfi: fix typo in comment
  ALSA: cs5535audio: fix typo in comment
  ALSA: ctxfi: Add SB046x PCI ID
  ALSA: usb-audio: Add missing ep_idx in fixed EP quirks
  ALSA: usb-audio: Workaround for clock setup on TEAC devices
  ALSA: lola: Bounds check loop iterator against streams array size
  ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
  ASoC: rt1308-sdw: add the default value of register 0xc320
  ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic
  ASoC: rt9120: Fix 3byte read, valule offset typo
  ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver.
  ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver
  ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
  ASoC: codecs: lpass: Fix passing zero to 'PTR_ERR'
  ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
  ASoC: SOF: mediatek: remove duplicate include in mt8195.c
  ASoC: SOF: mediatek: Add mt8195 debug dump
  ASoC: SOF: mediatek: Add mediatek common debug dump
  ...
2022-05-25 16:55:16 -07:00
Linus Torvalds
2518f226c6 drm for 5.19-rc1
dma-buf:
 - add dma_resv_replace_fences
 - add dma_resv_get_singleton
 - make dma_excl_fence private
 
 core:
 - EDID parser refactorings
 - switch drivers to drm_mode_copy/duplicate
 - DRM managed mutex initialization
 
 display-helper:
 - put HDMI, SCDC, HDCP, DSC and DP into new module
 
 gem:
 - rework fence handling
 
 ttm:
 - rework bulk move handling
 - add common debugfs for resource managers
 - convert to kvcalloc
 
 format helpers:
 - support monochrome formats
 - RGB888, RGB565 to XRGB8888 conversions
 
 fbdev:
 - cfb/sys_imageblit fixes
 - pagelist corruption fix
 - create offb platform device
 - deferred io improvements
 
 sysfb:
 - Kconfig rework
 - support for VESA mode selection
 
 bridge:
 - conversions to devm_drm_of_get_bridge
 - conversions to panel_bridge
 - analogix_dp - autosuspend support
 - it66121 - audio support
 - tc358767 - DSI to DPI support
 - icn6211 - PLL/I2C fixes, DT property
 - adv7611 - enable DRM_BRIDGE_OP_HPD
 - anx7625 - fill ELD if no monitor
 - dw_hdmi - add audio support
 - lontium LT9211 support, i.MXMP LDB
 - it6505: Kconfig fix, DPCD set power fix
 - adv7511 - CEC support for ADV7535
 
 panel:
 - ltk035c5444t, B133UAN01, NV3052C panel support
 - DataImage FG040346DSSWBG04 support
 - st7735r - DT bindings fix
 - ssd130x - fixes
 
 i915:
 - DG2 laptop PCI-IDs ("motherboard down")
 - Initial RPL-P PCI IDs
 - compute engine ABI
 - DG2 Tile4 support
 - DG2 CCS clear color compression support
 - DG2 render/media compression formats support
 - ATS-M platform info
 - RPL-S PCI IDs added
 - Bump ADL-P DMC version to v2.16
 - Support static DRRS
 - Support multiple eDP/LVDS native mode refresh rates
 - DP HDR support for HSW+
 - Lots of display refactoring + fixes
 - GuC hwconfig support and query
 - sysfs support for multi-tile
 - fdinfo per-client gpu utilisation
 - add geometry subslices query
 - fix prime mmap with LMEM
 - fix vm open count and remove vma refcounts
 - contiguous allocation fixes
 - steered register write support
 - small PCI BAR enablement
 - GuC error capture support
 - sunset igpu legacy mmap support for newer devices
 - GuC version 70.1.1 support
 
 amdgpu:
 - Initial SoC21 support
 - SMU 13.x enablement
 - SMU 13.0.4 support
 - ttm_eu cleanups
 - USB-C, GPUVM updates
 - TMZ fixes for RV
 - RAS support for VCN
 - PM sysfs code cleanup
 - DC FP rework
 - extend CG/PG flags to 64-bit
 - SI dpm lockdep fix
 - runtime PM fixes
 
 amdkfd:
 - RAS/SVM fixes
 - TLB flush fixes
 - CRIU GWS support
 - ignore bogus MEC signals more efficiently
 
 msm:
 - Fourcc modifier for tiled but not compressed layouts
 - Support for userspace allocated IOVA (GPU virtual address)
 - DPU: DSC (Display Stream Compression) support
 - DP: eDP support
 - DP: conversion to use drm_bridge and drm_bridge_connector
 - Merge DPU1 and MDP5 MDSS driver
 - DPU: writeback support
 
 nouveau:
 - make some structures static
 - make some variables static
 - switch to drm_gem_plane_helper_prepare_fb
 
 radeon:
 - misc fixes/cleanups
 
 mxsfb:
 - rework crtc mode setting
 - LCDIF CRC support
 
 etnaviv:
 - fencing improvements
 - fix address space collisions
 - cleanup MMU reference handling
 
 gma500:
 - GEM/GTT improvements
 - connector handling fixes
 
 komeda:
 - switch to plane reset helper
 
 mediatek:
 - MIPI DSI improvements
 
 omapdrm:
 - GEM improvements
 
 qxl:
 - aarch64 support
 
 vc4:
 - add a CL submission tracepoint
 - HDMI YUV support
 - HDMI/clock improvements
 - drop is_hdmi caching
 
 virtio:
 - remove restriction of non-zero blob types
 
 vmwgfx:
 - support for cursormob and cursorbypass 4
 - fence improvements
 
 tidss:
 - reset DISPC on startup
 
 solomon:
 - SPI support
 - DT improvements
 
 sun4i:
 - allwinner D1 support
 - drop is_hdmi caching
 
 imx:
 - use swap() instead of open-coding
 - use devm_platform_ioremap_resource
 - remove redunant initializations
 
 ast:
 - Displayport support
 
 rockchip:
 - Refactor IOMMU initialisation
 - make some structures static
 - replace drm_detect_hdmi_monitor with drm_display_info.is_hdmi
 - support swapped YUV formats,
 - clock improvements
 - rk3568 support
 - VOP2 support
 
 mediatek:
 - MT8186 support
 
 tegra:
 - debugabillity improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmKNxkAACgkQDHTzWXnE
 hr4hghAAqSXeMEw1w34miyM28hcOpXqkDfT1VVooqFxBT8MBqamzpZvCH94qsZwm
 3DRXlhQ4pk8wzUcWJpGprdNakxNQPpFVs2UuxYxOyrxYpdkbOwqsEcM3d8VXD9Cy
 E36z+dr85A8Te/J0Yg/FLoZMHulTlidqEZeOz6SMaNUohtrmH/oPWR+cPIy4/Zpp
 yysfbBSKTwblJFDf4+nIpks/VvJYAUO3i6KClT/Rh79Yg6de582AU0YaNcEArTi6
 JqdiYIoYLx609Ecy5NVme6wR/ai46afFLMYt3ZIP4OfHRINk+YL01BYMo2JE2M8l
 xjOH0Iwb7evzWqLK/ESwqp3P7nyppmLlfbZOFHWUfNJsjq2H3ePaAGhzOlYx1c70
 XENzY4IvpYYdR0pJuh1gw1cNZfM9JDAynGJ5jvsATLGBGQbpFsy3w/PMZT17q8an
 DpBwqQmShUdCJ2m+6zznC3VsxJpbvWKNE1I93NxAWZXmFYxoHCzRihahUxKcNDrQ
 ZLH7RSlk9SE/ZtNSLkU15YnKtoW+ThFIssUpVio6U/fZot1+efZkmkXplSuFvj6R
 i7s14hMWQjSJzpJg1DXfhDMycEOujNiQppCG2EaDlVxvUtCqYBd3EHOI7KQON//+
 iVtmEEnWh5rcCM+WsxLGf3Y7sVP3vfo1LOCxshb1XVfDmeMksoI=
 =BYQA
 -----END PGP SIGNATURE-----

Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm

Pull drm updates from Dave Airlie:
 "Intel have enabled DG2 on certain SKUs for laptops, AMD has started
  some new GPU support, msm has user allocated VA controls

  dma-buf:
   - add dma_resv_replace_fences
   - add dma_resv_get_singleton
   - make dma_excl_fence private

  core:
   - EDID parser refactorings
   - switch drivers to drm_mode_copy/duplicate
   - DRM managed mutex initialization

  display-helper:
   - put HDMI, SCDC, HDCP, DSC and DP into new module

  gem:
   - rework fence handling

  ttm:
   - rework bulk move handling
   - add common debugfs for resource managers
   - convert to kvcalloc

  format helpers:
   - support monochrome formats
   - RGB888, RGB565 to XRGB8888 conversions

  fbdev:
   - cfb/sys_imageblit fixes
   - pagelist corruption fix
   - create offb platform device
   - deferred io improvements

  sysfb:
   - Kconfig rework
   - support for VESA mode selection

  bridge:
   - conversions to devm_drm_of_get_bridge
   - conversions to panel_bridge
   - analogix_dp - autosuspend support
   - it66121 - audio support
   - tc358767 - DSI to DPI support
   - icn6211 - PLL/I2C fixes, DT property
   - adv7611 - enable DRM_BRIDGE_OP_HPD
   - anx7625 - fill ELD if no monitor
   - dw_hdmi - add audio support
   - lontium LT9211 support, i.MXMP LDB
   - it6505: Kconfig fix, DPCD set power fix
   - adv7511 - CEC support for ADV7535

  panel:
   - ltk035c5444t, B133UAN01, NV3052C panel support
   - DataImage FG040346DSSWBG04 support
   - st7735r - DT bindings fix
   - ssd130x - fixes

  i915:
   - DG2 laptop PCI-IDs ("motherboard down")
   - Initial RPL-P PCI IDs
   - compute engine ABI
   - DG2 Tile4 support
   - DG2 CCS clear color compression support
   - DG2 render/media compression formats support
   - ATS-M platform info
   - RPL-S PCI IDs added
   - Bump ADL-P DMC version to v2.16
   - Support static DRRS
   - Support multiple eDP/LVDS native mode refresh rates
   - DP HDR support for HSW+
   - Lots of display refactoring + fixes
   - GuC hwconfig support and query
   - sysfs support for multi-tile
   - fdinfo per-client gpu utilisation
   - add geometry subslices query
   - fix prime mmap with LMEM
   - fix vm open count and remove vma refcounts
   - contiguous allocation fixes
   - steered register write support
   - small PCI BAR enablement
   - GuC error capture support
   - sunset igpu legacy mmap support for newer devices
   - GuC version 70.1.1 support

  amdgpu:
   - Initial SoC21 support
   - SMU 13.x enablement
   - SMU 13.0.4 support
   - ttm_eu cleanups
   - USB-C, GPUVM updates
   - TMZ fixes for RV
   - RAS support for VCN
   - PM sysfs code cleanup
   - DC FP rework
   - extend CG/PG flags to 64-bit
   - SI dpm lockdep fix
   - runtime PM fixes

  amdkfd:
   - RAS/SVM fixes
   - TLB flush fixes
   - CRIU GWS support
   - ignore bogus MEC signals more efficiently

  msm:
   - Fourcc modifier for tiled but not compressed layouts
   - Support for userspace allocated IOVA (GPU virtual address)
   - DPU: DSC (Display Stream Compression) support
   - DP: eDP support
   - DP: conversion to use drm_bridge and drm_bridge_connector
   - Merge DPU1 and MDP5 MDSS driver
   - DPU: writeback support

  nouveau:
   - make some structures static
   - make some variables static
   - switch to drm_gem_plane_helper_prepare_fb

  radeon:
   - misc fixes/cleanups

  mxsfb:
   - rework crtc mode setting
   - LCDIF CRC support

  etnaviv:
   - fencing improvements
   - fix address space collisions
   - cleanup MMU reference handling

  gma500:
   - GEM/GTT improvements
   - connector handling fixes

  komeda:
   - switch to plane reset helper

  mediatek:
   - MIPI DSI improvements

  omapdrm:
   - GEM improvements

  qxl:
   - aarch64 support

  vc4:
   - add a CL submission tracepoint
   - HDMI YUV support
   - HDMI/clock improvements
   - drop is_hdmi caching

  virtio:
   - remove restriction of non-zero blob types

  vmwgfx:
   - support for cursormob and cursorbypass 4
   - fence improvements

  tidss:
   - reset DISPC on startup

  solomon:
   - SPI support
   - DT improvements

  sun4i:
   - allwinner D1 support
   - drop is_hdmi caching

  imx:
   - use swap() instead of open-coding
   - use devm_platform_ioremap_resource
   - remove redunant initializations

  ast:
   - Displayport support

  rockchip:
   - Refactor IOMMU initialisation
   - make some structures static
   - replace drm_detect_hdmi_monitor with drm_display_info.is_hdmi
   - support swapped YUV formats,
   - clock improvements
   - rk3568 support
   - VOP2 support

  mediatek:
   - MT8186 support

  tegra:
   - debugabillity improvements"

* tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm: (1740 commits)
  drm/i915/dsi: fix VBT send packet port selection for ICL+
  drm/i915/uc: Fix undefined behavior due to shift overflowing the constant
  drm/i915/reg: fix undefined behavior due to shift overflowing the constant
  drm/i915/gt: Fix use of static in macro mismatch
  drm/i915/audio: fix audio code enable/disable pipe logging
  drm/i915: Fix CFI violation with show_dynamic_id()
  drm/i915: Fix 'mixing different enum types' warnings in intel_display_power.c
  drm/i915/gt: Fix build error without CONFIG_PM
  drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
  drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
  drm/msm: don't free the IRQ if it was not requested
  drm/msm/dpu: limit writeback modes according to max_linewidth
  drm/amd: Don't reset dGPUs if the system is going to s2idle
  drm/amdgpu: Unmap legacy queue when MES is enabled
  drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
  drm/msm: Fix fb plane offset calculation
  drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
  drm/msm/dsi: don't powerup at modeset time for parade-ps8640
  drm/rockchip: Change register space names in vop2
  dt-bindings: display: rockchip: make reg-names mandatory for VOP2
  ...
2022-05-25 16:18:27 -07:00
Linus Torvalds
86c87bea6b Devicetree updates for v5.19:
Bindings:
 - Convert smsc,lan91c111, qcom,spi-qup, qcom,msm-uartdm, qcom,i2c-qup,
   qcom,gsbi, i2c-mt65xx, TI wkup_m3_ipc (and new props), qcom,smp2p, TI
   timer, Mediatek gnss, Mediatek topckgen, Mediatek apmixedsys, Mediatek
   infracfg, fsl,ls-extirq, fsl,layerscape-dcfg, QCom PMIC SPMI,
   rda,8810pl-timer, Xilinx zynqmp_ipi, uniphier-pcie, and Ilitek
   touchscreen controllers
 
 - Convert various Arm Ltd peripheral IP bindings to schemas
 
 - New bindings for Menlo board CPLD, DH electronics board CPLD,
   Qualcomm Geni based QUP I2C, Renesas RZ/G2UL OSTM, Broafcom BCM4751
   GNSS, MT6360 PMIC, ASIX USB Ethernet controllers, and Microchip/SMSC
   LAN95xx USB Ethernet controllers
 
 - Add vendor prefix for Enclustra
 
 - Add various compatible string additions
 
 - Various example fixes and cleanups
 
 - Remove unused hisilicon,hi6220-reset binding
 
 - Treewide fix properties missing type definition
 
 - Drop some empty and unreferenced .txt bindings
 
 - Documentation improvements for writing schemas
 
 DT driver core:
 - Drop static IRQ resources for DT platform devices as IRQ setup is
   dynamic and drivers have all been converted to use platform_get_irq()
   and friends
 
 - Rework memory allocations and frees for overlays
 
 - Continue overlay notifier callbacks on successful calls and add
   unittests
 
 - Handle 'interrupts-extended' in early DT IRQ setup
 
 - Fix of_property_read_string() errors to match documentation
 
 - Ignore disabled nodes in FDT API calls
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmKNXrcQHHJvYmhAa2Vy
 bmVsLm9yZwAKCRD6+121jbxhw+GkD/9mwZp1qF0cueFI7FU0pYt8olVwi6DgqAJ0
 CR8Q/yPCtqyYKhZHcglyCYGgfMLE+9Y97jKJV3pOxfeIT9ZXet67JC2yTrCQKKhm
 rIYL1jseRZosvFfo21VsFhEVMdFVyGz8pRRaH2s59HYrATye8Vgt9D6zGWN5hOQD
 fMaqEVu/sEzfMuCHzBu1zkSx4VzWW1mU/jcpmE4zR/rIdyOI7DRPEl3+90VYFHH9
 PdUdzeGa4JkOlDg7rcqJXUda5ZMFlHzh4Qy8OQ8yj7jtyUEiGmLcXi07VNC4SZtx
 wI/y5eV8aPJ4gGNMBbgUqVfiKC+5citRmGTtfToLXGpqZ+gDTjPItjrZBI9MErj/
 HA2KF5bHGmoJrwJ4mFJ6uFjqSsqDjptOjIdKLZ2qMFkjTE2S+VwOsrtvMxo1Tjj0
 kgi3tRRVndtmOzRuOzfzAVwzUSa4VNtKAdx1rb7mWtAJoVPdBVf1cR7sDwawgZ8G
 KyfOR/2G0c12IfK18Fz9k9GR+eu4exQ4CUzBb7Q+P03bewLgenvW5tmSOtILzkKq
 OzHTNAVHLAeVxpezrV/0/leBErb9gnif6h8vrZNh4PxjYM5u6rjy0p+r61xcf3vC
 iIVDYzlx5buWBUVj68BEC4wRnTmkzGapS4CYtWpBdCzPOONHXMpq+0UYmu9vac18
 x+M52fQBLA==
 =OUL3
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "Bindings:

   - Convert smsc,lan91c111, qcom,spi-qup, qcom,msm-uartdm,
     qcom,i2c-qup, qcom,gsbi, i2c-mt65xx, TI wkup_m3_ipc (and new
     props), qcom,smp2p, TI timer, Mediatek gnss, Mediatek topckgen,
     Mediatek apmixedsys, Mediatek infracfg, fsl,ls-extirq,
     fsl,layerscape-dcfg, QCom PMIC SPMI, rda,8810pl-timer, Xilinx
     zynqmp_ipi, uniphier-pcie, and Ilitek touchscreen controllers

   - Convert various Arm Ltd peripheral IP bindings to schemas

   - New bindings for Menlo board CPLD, DH electronics board CPLD,
     Qualcomm Geni based QUP I2C, Renesas RZ/G2UL OSTM, Broafcom BCM4751
     GNSS, MT6360 PMIC, ASIX USB Ethernet controllers, and
     Microchip/SMSC LAN95xx USB Ethernet controllers

   - Add vendor prefix for Enclustra

   - Add various compatible string additions

   - Various example fixes and cleanups

   - Remove unused hisilicon,hi6220-reset binding

   - Treewide fix properties missing type definition

   - Drop some empty and unreferenced .txt bindings

   - Documentation improvements for writing schemas

  DT driver core:

   - Drop static IRQ resources for DT platform devices as IRQ setup is
     dynamic and drivers have all been converted to use
     platform_get_irq() and friends

   - Rework memory allocations and frees for overlays

   - Continue overlay notifier callbacks on successful calls and add
     unittests

   - Handle 'interrupts-extended' in early DT IRQ setup

   - Fix of_property_read_string() errors to match documentation

   - Ignore disabled nodes in FDT API calls"

* tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (86 commits)
  of/irq: fix typo in comment
  dt-bindings: Fix properties without any type
  Revert "dt-bindings: mailbox: qcom-ipcc: add missing properties into example"
  dt-bindings: input: touchscreen: ilitek_ts_i2c: Absorb ili2xxx bindings
  dt-bindings: timer: samsung,exynos4210-mct: define strict clock order
  dt-bindings: timer: samsung,exynos4210-mct: drop unneeded minItems
  dt-bindings: timer: cdns,ttc: drop unneeded minItems
  dt-bindings: mailbox: zynqmp_ipi: convert to yaml
  dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller
  dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet controllers
  dt-bindings: net: add schema for ASIX USB Ethernet controllers
  of/fdt: Ignore disabled memory nodes
  dt-bindings: arm: fix typos in compatible
  dt-bindings: mfd: Add bindings child nodes for the Mediatek MT6360
  dt-bindings: display: convert Arm Komeda to DT schema
  dt-bindings: display: convert Arm Mali-DP to DT schema
  dt-bindings: display: convert Arm HDLCD to DT schema
  dt-bindings: display: convert PL110/PL111 to DT schema
  dt-bindings: arm: convert vexpress-config to DT schema
  dt-bindings: arm: convert vexpress-sysregs to DT schema
  ...
2022-05-25 14:56:06 -07:00
Fenglin Wu
790d176623 input: qcom-hv-haptics: update initial FIFO programming count
Update initial FIFO programming count to 320 which can help to reduce
vibration request latency.

Change-Id: If0e12dd626dda66a0b296b9832562bbeaee57fd9
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:30 -07:00
Fenglin Wu
497b0c654b input: qcom-hv-haptics: force vreg ready base on VMAX_CLAMP notification
When hBoost is enabled by the charger firmware, force-vreg-ready need
to be set before triggering haptics play. This applies to all play modes
including SWR play mode. Set it base on VMAX_CLAMP notification and
keep it until the charger firmware unvote VMAX_CLAMP which indicates
it's no longer using hBoost. This helps to trigger SWR mode play
correctly in such case from swr-haptics driver which has no SPMI
regiser access in there.

Change-Id: I0a318dd7c5e9d856e200264b11eaea184be15e50
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:30 -07:00
Fenglin Wu
94a18d989a input: qcom-hv-haptics: Add trace events for FIFO play
Add trace events to log down the FIFO play process for debug purpose.

Change-Id: I54671a0b6a1228351067db8b6a7a052d11d8d080
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:29 -07:00
Fenglin Wu
4020b8cafb input: qcom-hv-haptics: update LRA_IMPEDANCE_MOHMS_LSB value
Update LRA impedance measurement resolution to 250 mohms per HW
recommendation.

Change-Id: I31a588ed027674cc2fa081d611a4c96f6001a90b
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:29 -07:00
Fenglin Wu
1a0cf44ac3 input: qcom-hv-haptics: parse devicetree effect in different functions
Split haptics_parse_per_effect_dt() into smaller functions for parsing
pattern, FIFO, brake settings from devicetree respectively.

Change-Id: I36a0e430752754a1e16b8f1acccc2f6f41ab8833
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:28 -07:00
Fenglin Wu
83af7dff89 input: qcom-hv-haptics: discard 1-byte FIFO write for HAP520
For haptics module with HAP520 HW revision, the HW would only read 1
valid byte in every 4 bytes if the 1-byte FIFO write clashes with the
FIFO read operation. To avoid this, don't use 1-byte write but just
pad zeros at end of the pattern to keep the samples 4-byte aligned
and always use 4-byte write for FIFO programming.

Change-Id: I3ebde0fe7378c0dcffb5c51e15e6ffaae5af3e29
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:27 -07:00
Fenglin Wu
af0ee1fa6e input: qcom-hv-haptics: Add LRA impedance detection for new modules
Add LRA impedance detection for HAP520_MV and HAP525_HV haptics
modules. Both modules can support binary search based impedance
detection as before which relies on the short circuit comparators.
HAP525_HV module has added a new impedance detection comparator
which can be used to support realtime impedance measurement. Add
binary search based impedance detection for both haptics modules,
and also add realtime impedance measurement for HAP525_HV module
but use a devicetree bool property to keep it as optional.

Change-Id: I4cb3f5360084c2d3d36778bed4c8d878f3b465ad
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:27 -07:00
Fenglin Wu
7644b7452c input: qcom-hv-haptics: Update RC_CLK_CAL_COUNT calculation
The equations for calculating RC_CLK_CAL_COUNT need to be updated
when flag SLEEP_CLK_32K_SCALE is not set. Update it by introducing
a coefficient named as SLEEP_CLK_CAL_DIVIDER which is the divider
of the 19.2 MHz system clock to generate the sleep clock.

Change-Id: I75d16eca3fe160c425af5cf3545272e0d1999a8a
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:27 -07:00
Fenglin Wu
e8e7d6a836 input: qcom-hv-haptics: Handle VMAX_CLAMP notification
Handle VMAX_CLAMP notification which contains a desired Vmax value when
hBoost is enabled by the charger firmware. Any vibration after this
notification should be set to a Vmax not higher than that to avoid
hBoost overloading.

Change-Id: I6fb1b66663df60041967e2cad0a914f57c310158
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:26 -07:00
Fenglin Wu
eeca4b54e1 input: qcom-hv-haptics: enable SW_CTRL_HBST workarounds for PM8550B V1
Enable SW_CTRL_HBST workarounds for haptics module in PM8550B V1 silicon
in which the HAPTICS_BOOST module is having digital revision as V0.1.

Change-Id: Ida824ae0846cef1e2be6adade0f3b4ac2461bf06
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:26 -07:00
Fenglin Wu
8ed2d0ed39 input: qcom-hv-haptics: config open-loop drive when hBoost is enabled
With commit 5427cc3025e0 ("input: qcom-hv-haptics: delay hBoost turning
off"), the hBoost would be kept as enabled in the 2 seconds after stopping
play. If a new play is triggered in that 2 seconds, the hBoost will be
considered as working in open-loop mode so configure haptics open-loop
drive in such case.

Change-Id: Ibfa533f23a52bd609e2a8564f859ca8835a8fd67
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:25 -07:00
Fenglin Wu
bf0527051c input: qcom-hv-haptics: ignore flushing FIFO memory during refilling
HAP525_HV haptics module has a register to flush the FIFO memory
before programming FIFO samples, this can only be done before initiating
a new FIFO play but not during FIFO refilling. Fix this.

Change-Id: I12cb9deeb1c85f979f455187f13e0f13f02f935f
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:25 -07:00
Fenglin Wu
48c4987a4a input: qcom-hv-haptics: delay hBoost turning off
Extend hBoost PBS control to all play modes, so hBoost disabling
will be always handled in the driver by triggering the PBS. Also,
delay hBoost turning off 2 seconds after the stop command to
prevent hBoost being enabled/disabled too frequently in repeated
short vibration case, this help to avoid hBoost lockup when it's
enabled and disabled very quickly.

Change-Id: I76263e51ad00a01d95ff7fd7b08c1655031516e6
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:25 -07:00
Fenglin Wu
ede62fd6fb input: qcom-hv-haptics: add high-voltage check for HAP525_HV module
HAP525_HV module Vmax setting follows the HV_HAP_DRIVER defined
in HW_CONFIG, so add the check to make sure the Vmax can be set
correctly.

Change-Id: I116e068c774dea47648f345cc3cf89a98f2eee52
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:24 -07:00
Fenglin Wu
e8ed28a66e input: qcom-hv-haptics: Set FORCE_VSET_ACK in open-loop mode
Based on hardware recommendation, set FORCE_VSET_ACK when HAP525_HV
module is working in open-loop mode.

Change-Id: I7f9bb45bc25b0923743fad0c58410523e278d1e7
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:24 -07:00
Fenglin Wu
a1bb4c1670 input: qcom-hv-haptics: set play rate for PATx_MEM mode
PATx_MEM mode has a different play rate setting with FIFO mode and
all PATx_MEM sources share the same play rate. Set the play rate
when configuring the mmap configuration for preload FIFO effect.

Change-Id: I1c0dbf80977b864264e4580d476cf25b4202f757
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:23 -07:00
Fenglin Wu
d502b78e6b input: qcom-hv-haptics: update mmap logic for preload FIFO effect
Correct the logic of finding an available PAT_MEMx source to store
preload FIFO effect. Also add a debug print for preload property when
dumping FIFO effect settings.

Change-Id: If328e8bdb32f28495ac893a5a31f2be48fedd2b9
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:23 -07:00
Fenglin Wu
542ceba17b input: qcom-hv-haptics: add flags to include fixes only for HAP520
Add TOGGLE_EN_TO_FLUSH_FIFO and RECOVER_SWR_SLAVE flags for the SW fixes
only applicable for HAP520 haptics module.

Change-Id: I8b5e1ca8e4d734dd4ed8c05edb88fa6642460e83
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:23 -07:00
Fenglin Wu
156f44c6bd input: qcom-hv-haptics: set Vmax before toggling HAPTICS_EN in FIFO play
Currently, HAPTICS_EN bit is toggled whenever a FIFO pattern is played
followed by setting Vmax. However, this would issue a SWR_VMAX handshake
and then follow a SPMI_VMAX handshake in HW if haptics effect is played
over SWR bus in the background. This back to back Vmax handshake would
potentially cause the HW not responding and no vibration being played.

To address this, set the Vmax before toggling HAPTICS_EN bit to avoid
back to back Vmax handshakes when SWR and FIFO are played concurrently.

Change-Id: I0b8924ab7f369db446458fe2510a0da01519a978
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:22 -07:00
Fenglin Wu
e9a98dc14c input: qcom-hv-haptics: update sequence to get status data
As per the hardware recommendation, MOD_STATUS_XT need to be programmed
before programming MOD_STATUS_SEL to get the correct status data in all
cases. Update it.

Change-Id: Ie66b12cdc702f32ebfad78a72396ad3ac4d14adf
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:22 -07:00
Subbaraman Narayanamurthy
614c8a90b1 input: qcom-hv-haptics: Fix haptics_init_fifo_memory()
"fifo" is allocated per effect only when "qcom,wf-fifo-data" DT
property is specified. Fix haptics_init_fifo_memory() so that it
doesn't access that when parsing per effect data structure for
configuration.

Change-Id: I4f48e5c43c3b289e47d9a9a0934a642172e65555
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-05-25 14:54:21 -07:00
Fenglin Wu
44ec5b55d0 input: qcom-hv-haptics: reset FIFO play logic when hBoost is busy
Currently, when waiting for hBoost ready times out, error code -EBUSY is
returned. In addition to that, reset the FIFO play logic so that the
following FIFO requests can still be served.

Meanwhile, add 100us before updating HAPTICS_EN for hBoost to have
enough time to handle its power transition as per the hardware
recommendation.

Change-Id: Iebfc98b589bda747e4c2b6fdf6ff78d2f46ece5d
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:21 -07:00
Fenglin Wu
cd6f6c7ba3 input: qcom-hv-haptics: try with vmalloc() if allocate custom data failed
Reallocate memory using vmalloc() for custom FIFO data if the memory
allocation using kcalloc() is failed. This may happen if the vibrator
HAL is passing down a vibration effect with a very big chunk of FIFO
data and system is running out of memory.

Change-Id: I3612208df42e46a44ca0fd43ec9b4c6ca862620e
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:21 -07:00
Fenglin Wu
e37bf7e664 input: qcom-hv-haptics: use OL_TLRA if getting CL_TLRA failed
If getting close-loop TLRA failed in driver probe, such as if there
is no valid value in SDAM register for CAL_TLRA_CL_STS because of the
bootloader had not run the frequency calibration successfully. Use
open-loop TLRA to program the hardware so the vibrator can still be
functional but just lose some efficiency because of unadjusted
frequency.

Change-Id: I8b8dd0906aa6b3fa882e2044cdbe579c746714a3
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:20 -07:00
Fenglin Wu
be18d8d3b5 input: qcom-hv-haptics: add PATx_MEM mode support for HAP525_HV
HAP525_HV haptics module has 2048 bytes of SRAM which can be allocated
for 1 FIFO partition and 4 PATx_MEM partitions. The PATx_MEM memory
space is allocated following the FIFO memory and the size for either
FIFO or PATx_MEM can be configured differently. Normally, memory
allocation can be started at the end and the space is sequentially
allocated to PAT4_MEM through PAT1_MEM, and the leftover space is for
FIFO. Any PATx_MEM with memory size 0 will not be used/enabled. Also,
it's suggested to cofigure FIFO memory size not less than 640 bytes
to ensure the normal function of FIFO streaming mode. For each PATx_MEM
memory partition, it has a corresponding PATx_MEM mode which can read
data from its space as the pattern source for a vibration effect. This
is very similar to FIFO mode but just PATx_MEM mode can't be played in
a loop with data refilling.

Add "qcom,wf-fifo-preload" property to allow use PATx_MEM mode to
implement preload FIFO effect. If this property is specified, during
driver probe, PATx_MEM partition with enough memory will be allocated
to store the preload effect data, and the data will be remain unchanged
until a device reboot. Later, whenever a play request with such effect
is issued, it will be simply triggered by writing to the play register.
If there is not free PATx_MEM partition or no big enough memory for
storing the preload effect data during driver probe, the preload
effect will be treated as normal FIFO streaming effect and it will
be loaded and played at runtime.

Change-Id: Ic165e396f22f56e61b68bbc5cfc05c461f0f77d6
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:20 -07:00
Fenglin Wu
c49cead0c0 input: qcom-hv-haptics: split haptics_hw_init() into small functions
Split haptics_hw_init() into small functions for better readability.

Change-Id: I34a6d48d0760d3dc834f6e8d2763ff8735f13f83
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2022-05-25 14:54:20 -07:00
Anjelique Melendez
8898a26e7f input: qcom-hv-haptics: update LRA period adjustment
Haptics clock calibration is based on SLEEP_CLK which is a 32.768 KHz
clock however HAP520 module in PM8350B assumes SLEEP_CLK is 32 KHz
exactly. Adjust LRA period and coefficients for calculations only when
PM8350B haptics is present.

Change-Id: If217937405aed2c2d93883f3645fe1bd5e7f6d8c
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-05-25 14:54:19 -07:00
Fenglin Wu
4f82125ce4 input: qcom-hv-haptics: Add HAP525_HV HW type support
Haptics with HW type HAP525_HV is having revision value 4 in both
HAPTICS_CFG and HAPTICS_PATTERN modules. Add this HW type support.

Change-Id: Icb1f2291aaaffd0790f133146ea9601b0182989b
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:18 -07:00
Fenglin Wu
2e5deec278 input: qcom-hv-haptics: Add a flag to include hBoost control logic
SW_CTRL_HBST flag is added to include the hBoost control logic which
is required for HAP520 haptics module.

Change-Id: I6615e6cff90f4cfb8d266752c61b3daf06dfe571
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:18 -07:00
Fenglin Wu
ee656b6cb1 input: qcom-hv-haptics: change to use module type to differentiate HW
Currently, the name of the PMIC along with haptics module is used to
differentiate the HW. Modify it to use only HW type of the haptics
module. The HW type can be detected by reading HAPTICS_CFG and
HAPTICS_PATTERN module revision register. Add the logic for HW type
detection. Also, unify the code places that use module revisions,
instead, use HW type for differentiation.

Change-Id: I8428cc74988e88c1057af8b41ed46979aa6009cb
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:17 -07:00
Fenglin Wu
1cb307ba48 input: qcom-hv-haptics: remove support for haptics in PM8350B V1 chip
PM8350B V1 chip is no longer used for new targets so clean up the
driver to remove the support for haptics module inside PM8350B V1 chip.

Change-Id: If8a6dfd025753a768aa067958f10d613b574ee3f
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:17 -07:00
Fenglin Wu
42bc856797 input: qcom-hv-haptics: remove return value for debugfs_create_u32()
Remove the return value when creating "fifo_empty_thresh" debugfs node
because debugfs_create_u32() API no longer supports return value.

Change-Id: I7b39ed79a9148c2815b8656222dc6f61540b2129
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:17 -07:00
Kiran Gunda
9335fe8f01 input: qcom-hv-haptics: update FIFO real time fill status mask
FIFO_REAL_TIME_FILL_STATUS_MASK is different for haptics HW
version V3. Update it.

Change-Id: Ida8326d89678af34ae2c3a35164ae1a7ad5f6b7b
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2022-05-25 14:54:16 -07:00
Kiran Gunda
e773cf38b8 input: qcom-hv-haptics: Toggle RC_CAL_EN mode only for PM8350B
The incorrect first cycle vibration issue is applicable only
for PM8350B PMIC. Hence, make the SW W/A to toggle the CAL_EN mode
from disabled to auto mode specific for PM8350B PMIC. Introduce
a "wa_flags" variable to handle the SW W/A in a cleaner way.

Change-Id: I8f0c31fd21681274081a4d58d589b4ed9a188f34
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2022-05-25 14:54:16 -07:00
Kiran Gunda
78596a946c input: qcom-hv-haptics: Update the VMAX configuration
The VMAX_STEP value is different for HV and MV haptics.
Update the VMAX configuration accordingly.

Change-Id: I5d0f00e9a07e76b01b16539d79897675ddd63117
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2022-05-25 14:54:15 -07:00
Kiran Gunda
ad265e91b0 input: qcom-hv-haptics: Add support for non-hboost haptics
Some PMICs such as PM5100 does not have the HBOOST peripheral
for haptics input supply. Add a new compatible string to avoid
accessing the non-existent HBOOST peripheral and also make the
necessary configurations required for hpwr supply.

Change-Id: I84301115706ee59984f7b051bc467d1537bbad29
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2022-05-25 14:54:15 -07:00
Shyam Kumar Thella
6f5ee64208 input: qcom-hv-haptics: Don't initialize swr regulator for HAP_CFG V3
Since HAP_CFG V3 doesn't support soundwire haptics, skip initializing
swr regulator so that swr_haptics cannot use it.

Change-Id: I64d783aabcf699233c68a96af5ffd922d361fb24
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2022-05-25 14:54:15 -07:00
Fenglin Wu
e9318ded52 input: qcom-hv-haptics: ignore pattern_src when checking hBoost ready
Commit b610aa2d70a3 ("input: qcom-hv-haptics: Ignore checking HBoost status
when SWR is playing") is added to ignore checking hBoost ready status when
triggering a non-FIFO play with SWR playing in the background. This should
be also applicable when triggering a FIFO play, so remove the pattern_src
check as the HBoost should be always ready when triggering the play with
SWR playing in the background.

Change-Id: If3d5ff7138e189c81991775d7814229c4d0e8c0a
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:14 -07:00
Fenglin Wu
f49f146a30 input: qcom-hv-haptics: ensure valid pointer when calling kfree
In haptics pattern/fifo/brake debugfs file write operation functions,
strsep() is used iteratively to split the user-passed string into tokens
for setting parameters. However,  strsep() modifies the pointer passed
and hence the same pointer cannot be used in kfree(). Fix this by
copying the pointer originally allocated by kzalloc() and use it in
kfree() as well.

Change-Id: I2baf8db4f7c39e7ab0a83411717e46a29a2e849b
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:14 -07:00
Fenglin Wu
a7691a0f8e input: qcom-hv-haptics: reset haptics module if it's stuck in SWR mode
The haptics module would get stuck in SWR mode if SWR port is
disconnected during SWR play, and this can happen if ADSP SSR
(subsystem reset) is triggered when playing in SWR mode. This
stuck condition can be detected by checking if haptics module
has already been in SWR mode when swr-haptics driver requests
to enable SWR haptics. When it's detected, ignore SWR mode
temporarily and toggle HAPTICS_EN for a HW reset. When SWR play
is attempted again i.e. when swr_haptics driver request to turn
on SWR slave device, SWR mode would get re-enabled.

Change-Id: Ie55d331e3c689972b42dd9688f0d2b182b3fd282
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:13 -07:00
Fenglin Wu
d4607df438 input: qcom-hv-haptics: Ignore checking HBoost status when SWR is playing
HBoost would be kept on when triggering a non-FIFO play with SWR playing
in the background, there is no need to wait HBoost to be ready hence bypass
the HBoost ready check in this case.

Change-Id: I68c4a97d1c5953fb5dc0dd53fa8792a02df4b3de
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:13 -07:00
Fenglin Wu
23895eba21 input: qcom-hv-haptics: update LRA frequency detection sequence
Update following settings in LRA frequency detection sequence according
to HW recommendation:
  1) Increase to 6 drive cycles before enabling High-Z period for auto
     resonance config.
  2) Disable adaptive drive duty function.

Change-Id: I551974603c99fcdad5d38fdef6edf15746c0033e
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:12 -07:00
Fenglin Wu
f0d2102bf1 input: qcom-hv-haptics: check playing effect pointer in IRQ handler
When uploading a constant effect after stopping FIFO play, the effect
pointer in haptics_play_info structure will be set to NULL. If there
is any pending fifo-empty IRQ gets served after that, it will trigger
a NULL pointer dereference issue. To avoid this, check the playing
effect pointer before use it in the IRQ handler.

Change-Id: Iacfea5e48d0a9519fa2c930ec821e395c43b6281
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:12 -07:00
Fenglin Wu
6e93432c87 input: qcom-hv-haptics: ensure HBoost is ready before the play
HBoost is required to be in disabled state before triggering the play.
Check this through DTEST1 signal and ensure the HBoost is ready before
serving a new vibration request.

Change-Id: I0d4b73fef39aa6da15abbb832369579221665d07
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:11 -07:00
Fenglin Wu
1116978168 input: qcom-hv-haptics: config interrupt in haptics_set_fifo()
Currently, haptics_fifo_empty_irq_config() uses a mutex lock and it's
called from playback() of input framework which is from an atomic
context. Fix this by moving it out of haptics_playback() and call it
from haptics_set_fifo() which gets eventually called in upload().

With this change, the irq_lock mutex is no longer needed because all
the calling paths of haptics_fifo_empty_irq_config() have been protected
by the mutex lock defined in haptics_play_info structure, hence remove
it.

Change-Id: I4e4d353f8427fb279fd3f4d6a28737acbdb22a0a
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:11 -07:00
Fenglin Wu
2d78e72322 input: qcom-hv-haptics: toggle HAPTICS_EN bit before playing FIFO
When FIFO samples are played back to back along with SWR mode, there is
a chance that FIFO samples won't get flushed out if they're not fully
played before FIFO mode is stopped. When this happens, FIFO samples gets
accumulated leading to overflow after which FIFO mode stops working.
Only way to recover from this is to toggle HAPTICS_EN_BIT before
starting FIFO mode playing again. While at it, add logs to print out
FIFO real time fill status which is helpful for debugging.

Change-Id: I07cd9ac34ad5ccfe7011850db554ba727f568482
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:11 -07:00
Fenglin Wu
72e5413d75 input: qcom-hv-haptics: keep FORCE_VREG_RDY always set in non-HBoost case
FORCE_VREG_RDY bit can be always set when non-HBoost regulator is used
and don't clear it when stopping play in non-HBoost case. Also set this
bit in driver initialization in non-HBoost case so that swr-haptics
driver can take the advantage of triggering SWR play without setting
this bit.

Change-Id: I6283396d9d5a4f0b87d87932d6db2d8e7bb7a623
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2022-05-25 14:54:10 -07:00