Skip to content

Commit 7e680b2

Browse files
committed
mfd: tacna: Do a PM runtime get for some 32k clock sources
MCLK1 and the internally derived SYSCLK are not on the always on domain and as such we need to keep the chip enabled to provide the 32k clock if those sources are used. Change-Id: I47ebd7bfdc718964ab235188c8d2da7ae6de539c Signed-off-by: Charles Keepax <[email protected]>
1 parent 8b18c4a commit 7e680b2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

drivers/mfd/tacna-core.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,22 @@ static int tacna_configure_clk32k(struct tacna *tacna)
582582
}
583583
break;
584584
case TACNA_32KZ_MCLK1:
585-
case TACNA_32KZ_MCLK2:
586585
case TACNA_32KZ_SYSCLK:
586+
switch (tacna->type) {
587+
case CS48L31:
588+
case CS48L32:
589+
case CS48L33:
590+
break;
591+
default:
592+
ret = pm_runtime_get_sync(tacna->dev);
593+
if (ret)
594+
dev_err(tacna->dev,
595+
"Failed to enable chip for 32kHz clock: %d\n",
596+
ret);
597+
break;
598+
}
599+
/* Intentional fall-through */
600+
case TACNA_32KZ_MCLK2:
587601
mclk_src = tacna->pdata.clk32k_src - 1;
588602
break;
589603
default:

0 commit comments

Comments
 (0)