asoc: codec: Use regmap_update_bits on wsa884x post IRQ

Change snd_soc_component_update_bits to
regmap_update_bits because wsa884x may not be
initalized post IRQ.

Change-Id: I3018c680e8b2db346e5acaefc330a5af98150cf2
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
This commit is contained in:
Eric Rosas
2023-02-10 16:01:03 -08:00
parent 4e4aec5874
commit d898a57ffd

View File

@@ -208,16 +208,13 @@ static int wsa884x_handle_post_irq(void *data)
u32 sts1 = 0, sts2 = 0; u32 sts1 = 0, sts2 = 0;
int retry = WSA884X_IRQ_RETRY; int retry = WSA884X_IRQ_RETRY;
struct snd_soc_component *component = NULL;
if (!wsa884x) if (!wsa884x)
return IRQ_NONE; return IRQ_NONE;
component = wsa884x->component;
if (!wsa884x->pa_mute) { if (!wsa884x->pa_mute) {
do { do {
wsa884x->pa_mute = 0; wsa884x->pa_mute = 0;
snd_soc_component_update_bits(component, regmap_update_bits(wsa884x->regmap,
REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01)); REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x01));
usleep_range(1000, 1100); usleep_range(1000, 1100);
@@ -231,7 +228,7 @@ static int wsa884x_handle_post_irq(void *data)
if (wsa884x->swr_slave->slave_irq_pending) { if (wsa884x->swr_slave->slave_irq_pending) {
pr_debug("%s: IRQ retries left: %0d\n", pr_debug("%s: IRQ retries left: %0d\n",
__func__, retry); __func__, retry);
snd_soc_component_update_bits(component, regmap_update_bits(wsa884x->regmap,
REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x00)); REG_FIELD_VALUE(PA_FSM_EN, GLOBAL_PA_EN, 0x00));
wsa884x->pa_mute = 1; wsa884x->pa_mute = 1;
if (retry--) if (retry--)