ASoC: wcd9xxx: Enhance class H controller to support dynamic CP voltage

Codecs can operate at a lower voltage for vdd_buck, whereas
this voltage source being shared, it is not guaranteed that the
codec will always receive exactly the requested voltage. Add support
to class H controller to handle dynamic switching of the chargepump
voltage.

Change-Id: I68f93e0b070ec51db9b958f56c797edb5cbe0c85
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9xxx: Apply class H parameters based on impedance

Different headphones have different impedance that results in volume level
difference on ears as lower impedance headphone will have higher
volume with the same gain on PAs.
To get better output on headset configure class H controller
based on the impedance detected.

Change-Id: Ia4d62120e57122a52ec0030f7e883cbeb284631b
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9320: Update buck control and mode registers

Leave BUCK control registers as default and set to lower BUCK ref voltage
for avoid pop noise during playback initiation.

CRs-fixed: 506099
Change-Id: I47c068fc8344108dcd5b2c63f8a5c0a5e40a4c8b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9xxx: fix class H controller driver to handle concurrency

Fix class H controller driver's finite state machine to handle concurrent
playback.  This makes audio playback quality to be better with less power
consumption.

CRs-fixed: 506099
Change-Id: I621fa5a4df9964fda6c51c70e50ece2e783cafb6
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9xxx: introduce headphone impedance detection support

Different headphones have different impedance that results in volume level
difference on ears as lower impedance headphone will have higher
volume with the same gain on PAs.
Provide impedance of headphones to be able to adjust gain according to
impedance so user can have consistent volume level with different
headphones.

Change-Id: I707f34344cd0068507bdd8a0192eb7afea1147f2
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
ASoC: wcd9320: Configure codec hardware in optimal mode

Update class H controller registers to configure codec in optimal mode.

CRs-fixed: 506099
Change-Id: I26ec0ad04bcec511ea2a37d2e357bae0345bd2a1
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: Remove unnecessary cpu_online() check

Cpufreq no longer calls governor callback for offlined cpus. i.e. All
policy->cpus are guaranteed to be online. Hence we don't need explicit check to
see if cpu is online or not.

Change-Id: I9ad85ea4addd5b4a40952e59ed730dd15e328690
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>