Skip to content

Commit 651ddd6

Browse files
asmellbydkalowsk
authored andcommitted
drivers: adc: silabs: Don't fail to init if clock is on
It is not an error if the clock source is already enabled. This may happen if a bootloader has used the peripheral and not de-initialized it before booting the application. Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
1 parent cd78920 commit 651ddd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/iadc_gecko.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static int adc_gecko_pm_action(const struct device *dev, enum pm_device_action a
370370
if (action == PM_DEVICE_ACTION_RESUME) {
371371
err = clock_control_on(config->clock_dev,
372372
(clock_control_subsys_t)&config->clock_cfg);
373-
if (err < 0) {
373+
if (err < 0 && err != -EALREADY) {
374374
return err;
375375
}
376376

0 commit comments

Comments
 (0)