Re: [PATCH 03/13] dt-bindings: imx: Add pinctrl binding doc for i.MXRT1050

From: Arnd Bergmann
Date: Sun Oct 24 2021 - 14:07:44 EST


On Sun, Oct 24, 2021 at 5:40 PM Jesse Taube <mr.bossman075@xxxxxxxxx> wrote:
> +/*
> + * The pin function ID is a tuple of
> + * <mux_reg conf_reg input_reg mux_mode input_val>
> + */
> +
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_SEMC_DA00 0x014 0x204 0x000 0x0 0x0
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_FLEXPWM4_PWM0_A 0x014 0x204 0x494 0x1 0x0
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_LPSPI2_SCK 0x014 0x204 0x500 0x2 0x1
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_XBAR_INOUT2 0x014 0x204 0x60C 0x3 0x0
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_FLEXIO1_D00 0x014 0x204 0x000 0x4 0x0
> +#define MXRT1050_IOMUXC_GPIO_EMC_00_GPIO4_IO00 0x014 0x204 0x000 0x5 0x0

The constants don't appear to be needed in this header at all, as the binding
looks completely generic with a tuple of five values, so you could simply
open-code the numbers where they are used, no need to include these
in a driver.

Arnd