drivers: counter: sam: Allow empty pinctrl config

The Atmel counter driver requires a valid pinctrl list to initialize.
This relax this condition since the timer can be used as general purpose
timer, which may not require a pin associated with the timer unit.

Fixes #83509

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
This commit is contained in:
Gerson Fernando Budke 2024-02-01 20:41:29 +01:00 committed by Benjamin Cabé
parent 5871037426
commit bff3874eaf

View file

@ -319,7 +319,7 @@ static int counter_sam_initialize(const struct device *dev)
/* Connect pins to the peripheral */ /* Connect pins to the peripheral */
retval = pinctrl_apply_state(dev_cfg->pcfg, PINCTRL_STATE_DEFAULT); retval = pinctrl_apply_state(dev_cfg->pcfg, PINCTRL_STATE_DEFAULT);
if (retval < 0) { if (retval < 0 && retval != -ENOENT) {
return retval; return retval;
} }