soc: qcom: qpnp-haptic: add support for auto mode

Based on the duration of the pattern, haptics mode and other
parameters needs to be configured dynamically for a better
performance and ease of use. Add support for this through device
tree property "qcom,lra-auto-mode".

Add support to configure some parameters like auto resonance
mode, LRA high-Z period, calibration period, vmax along with an
option to override the settings done by auto_mode configuration.

Change-Id: I4706fed4e3ca97d190f907769fd4a9899479b330
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
Subbaraman Narayanamurthy 2017-03-06 16:23:23 -08:00
parent 8312e8d304
commit ca8dd889c6
2 changed files with 736 additions and 228 deletions

View file

@ -76,6 +76,10 @@ Optional properties when qcom,actuator-type is "lra"
at End of Pattern
- qcom,lra-res-cal-period : Auto resonance calibration period. The values range from
4 to 32(default)
- qcom,lra-auto-mode : If this property is specified, haptics mode for LRA
actuators will be automatically configured along with
other required settings runtime based on the duration
of the pattern.
- qcom,perform-lra-auto-resonance-search : boolean, define this property if:
a) the underlying PMI chip does not have a register in the MISC block to
read the error percentage in RC clock

File diff suppressed because it is too large Load diff