Re: [PATCH 06/12] pinctrl: imx: Serialise MMIO register updates with a spinlock
From: Frank Li
Date: Wed Dec 02 2026 - 12:22:40 EST
On Wed, Dec 02, 2026 at 09:30:00AM +0000, Lee Jones wrote:
> The pinctrl core does not serialise .set_mux() and .pin_config_set()
> callbacks against one another or against concurrent .set_mux() calls.
> On i.MX platforms that share mux and configuration registers via
> SHARE_MUX_CONF_REG or share general-purpose select-input registers,
> concurrent read-modify-write sequences in imx_pmx_set_one_pin_mmio(),
> imx_pinconf_set_mmio(), and the GPIO direction callbacks can race and
> overwrite each other's updates.
>
> Add a raw_spinlock_t to struct imx_pinctrl and hold it across MMIO
why choose raw_spinlock_t instead of spinlock_t?
Frank