[PATCH v5 6/7] pinctrl: s32cc: add driver for GPIO functionality

Markus Elfring Markus.Elfring at web.de
Fri Nov 1 08:45:47 PDT 2024


> Add basic GPIO functionality (request, free, get, set) for the existing
> pinctrl SIUL2 driver since the hardware for pinctrl&GPIO is tightly
> coupled.
…
> +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c
…
> +static int s32_gpio_request(struct gpio_chip *gc, unsigned int gpio)
> +{
…
> +	spin_lock_irqsave(&ipctl->gpio_configs_lock, flags);
> +	list_add(&gpio_pin->list, &ipctl->gpio_configs);
> +	spin_unlock_irqrestore(&ipctl->gpio_configs_lock, flags);
…

Under which circumstances would you become interested to apply a statement
like “guard(spinlock_irqsave)(&ipctl->gpio_configs_lock);”?
https://elixir.bootlin.com/linux/v6.12-rc5/source/include/linux/spinlock.h#L551

Regards,
Markus



More information about the linux-arm-kernel mailing list