mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
ASoC: codecs: wcd938x: Unify define used for MIC2 bias register
There is a define for MIC bias registers enable mask called WCD938X_MICB_EN_MASK, which is already used to handle all four MIC1-4 biases in wcd938x_mbhc_micb_adjust_voltage(). Use the same define also in wcd938x_mbhc_micb_en_status() for MIC2 to have unified, simpler approach. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240523104228.36263-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f20847d92c
commit
40b2ffaf59
|
|
@ -1982,7 +1982,7 @@ static bool wcd938x_mbhc_micb_en_status(struct snd_soc_component *component, int
|
|||
if (micb_num == MIC_BIAS_2) {
|
||||
val = snd_soc_component_read_field(component,
|
||||
WCD938X_ANA_MICB2,
|
||||
WCD938X_ANA_MICB2_ENABLE_MASK);
|
||||
WCD938X_MICB_EN_MASK);
|
||||
if (val == WCD938X_MICB_ENABLE)
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@
|
|||
#define WCD938X_MICB_PULL_UP 2
|
||||
#define WCD938X_MICB_PULL_DOWN 3
|
||||
#define WCD938X_ANA_MICB2 (0x3023)
|
||||
#define WCD938X_ANA_MICB2_ENABLE_MASK GENMASK(7, 6)
|
||||
#define WCD938X_ANA_MICB2_RAMP (0x3024)
|
||||
#define WCD938X_RAMP_EN_MASK BIT(7)
|
||||
#define WCD938X_RAMP_SHIFT_CTRL_MASK GENMASK(4, 2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user