Commit 525792d1 authored by Arınç ÜNAL's avatar Arınç ÜNAL Committed by Linus Walleij

pinctrl: ralink: rename variables which point out the pin group

These variables define a list of functions which can be muxed to the pin
group which the name of the pin group was originally intended to be pointed
out on the name of the said variables.

Therefore, rename "func" to "grp" across all subdrivers where this applies.

Fixes: 18653d4b ("pinctrl: ralink: rename variable names for functions on MT7620 and MT7621")
Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20221231160849.40544-2-arinc.unal@arinc9.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 542c893c
This diff is collapsed.
......@@ -34,59 +34,59 @@
#define MT7621_GPIO_MODE_SDHCI_SHIFT 18
#define MT7621_GPIO_MODE_SDHCI_GPIO 1
static struct ralink_pmx_func uart1_func[] = { FUNC("uart1", 0, 1, 2) };
static struct ralink_pmx_func i2c_func[] = { FUNC("i2c", 0, 3, 2) };
static struct ralink_pmx_func uart3_func[] = {
static struct ralink_pmx_func uart1_grp[] = { FUNC("uart1", 0, 1, 2) };
static struct ralink_pmx_func i2c_grp[] = { FUNC("i2c", 0, 3, 2) };
static struct ralink_pmx_func uart3_grp[] = {
FUNC("uart3", 0, 5, 4),
FUNC("i2s", 2, 5, 4),
FUNC("spdif3", 3, 5, 4),
};
static struct ralink_pmx_func uart2_func[] = {
static struct ralink_pmx_func uart2_grp[] = {
FUNC("uart2", 0, 9, 4),
FUNC("pcm", 2, 9, 4),
FUNC("spdif2", 3, 9, 4),
};
static struct ralink_pmx_func jtag_func[] = { FUNC("jtag", 0, 13, 5) };
static struct ralink_pmx_func wdt_func[] = {
static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 13, 5) };
static struct ralink_pmx_func wdt_grp[] = {
FUNC("wdt rst", 0, 18, 1),
FUNC("wdt refclk", 2, 18, 1),
};
static struct ralink_pmx_func pcie_rst_func[] = {
static struct ralink_pmx_func pcie_rst_grp[] = {
FUNC("pcie rst", MT7621_GPIO_MODE_PCIE_RST, 19, 1),
FUNC("pcie refclk", MT7621_GPIO_MODE_PCIE_REF, 19, 1)
};
static struct ralink_pmx_func mdio_func[] = { FUNC("mdio", 0, 20, 2) };
static struct ralink_pmx_func rgmii2_func[] = { FUNC("rgmii2", 0, 22, 12) };
static struct ralink_pmx_func spi_func[] = {
static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 20, 2) };
static struct ralink_pmx_func rgmii2_grp[] = { FUNC("rgmii2", 0, 22, 12) };
static struct ralink_pmx_func spi_grp[] = {
FUNC("spi", 0, 34, 7),
FUNC("nand1", 2, 34, 7),
};
static struct ralink_pmx_func sdhci_func[] = {
static struct ralink_pmx_func sdhci_grp[] = {
FUNC("sdhci", 0, 41, 8),
FUNC("nand2", 2, 41, 8),
};
static struct ralink_pmx_func rgmii1_func[] = { FUNC("rgmii1", 0, 49, 12) };
static struct ralink_pmx_func rgmii1_grp[] = { FUNC("rgmii1", 0, 49, 12) };
static struct ralink_pmx_group mt7621_pinmux_data[] = {
GRP("uart1", uart1_func, 1, MT7621_GPIO_MODE_UART1),
GRP("i2c", i2c_func, 1, MT7621_GPIO_MODE_I2C),
GRP_G("uart3", uart3_func, MT7621_GPIO_MODE_UART3_MASK,
GRP("uart1", uart1_grp, 1, MT7621_GPIO_MODE_UART1),
GRP("i2c", i2c_grp, 1, MT7621_GPIO_MODE_I2C),
GRP_G("uart3", uart3_grp, MT7621_GPIO_MODE_UART3_MASK,
MT7621_GPIO_MODE_UART3_GPIO, MT7621_GPIO_MODE_UART3_SHIFT),
GRP_G("uart2", uart2_func, MT7621_GPIO_MODE_UART2_MASK,
GRP_G("uart2", uart2_grp, MT7621_GPIO_MODE_UART2_MASK,
MT7621_GPIO_MODE_UART2_GPIO, MT7621_GPIO_MODE_UART2_SHIFT),
GRP("jtag", jtag_func, 1, MT7621_GPIO_MODE_JTAG),
GRP_G("wdt", wdt_func, MT7621_GPIO_MODE_WDT_MASK,
GRP("jtag", jtag_grp, 1, MT7621_GPIO_MODE_JTAG),
GRP_G("wdt", wdt_grp, MT7621_GPIO_MODE_WDT_MASK,
MT7621_GPIO_MODE_WDT_GPIO, MT7621_GPIO_MODE_WDT_SHIFT),
GRP_G("pcie", pcie_rst_func, MT7621_GPIO_MODE_PCIE_MASK,
GRP_G("pcie", pcie_rst_grp, MT7621_GPIO_MODE_PCIE_MASK,
MT7621_GPIO_MODE_PCIE_GPIO, MT7621_GPIO_MODE_PCIE_SHIFT),
GRP_G("mdio", mdio_func, MT7621_GPIO_MODE_MDIO_MASK,
GRP_G("mdio", mdio_grp, MT7621_GPIO_MODE_MDIO_MASK,
MT7621_GPIO_MODE_MDIO_GPIO, MT7621_GPIO_MODE_MDIO_SHIFT),
GRP("rgmii2", rgmii2_func, 1, MT7621_GPIO_MODE_RGMII2),
GRP_G("spi", spi_func, MT7621_GPIO_MODE_SPI_MASK,
GRP("rgmii2", rgmii2_grp, 1, MT7621_GPIO_MODE_RGMII2),
GRP_G("spi", spi_grp, MT7621_GPIO_MODE_SPI_MASK,
MT7621_GPIO_MODE_SPI_GPIO, MT7621_GPIO_MODE_SPI_SHIFT),
GRP_G("sdhci", sdhci_func, MT7621_GPIO_MODE_SDHCI_MASK,
GRP_G("sdhci", sdhci_grp, MT7621_GPIO_MODE_SDHCI_MASK,
MT7621_GPIO_MODE_SDHCI_GPIO, MT7621_GPIO_MODE_SDHCI_SHIFT),
GRP("rgmii1", rgmii1_func, 1, MT7621_GPIO_MODE_RGMII1),
GRP("rgmii1", rgmii1_grp, 1, MT7621_GPIO_MODE_RGMII1),
{ 0 }
};
......
......@@ -15,22 +15,22 @@
#define RT2880_GPIO_MODE_SDRAM BIT(6)
#define RT2880_GPIO_MODE_PCI BIT(7)
static struct ralink_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_func[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 7, 8) };
static struct ralink_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func sdram_func[] = { FUNC("sdram", 0, 24, 16) };
static struct ralink_pmx_func pci_func[] = { FUNC("pci", 0, 40, 32) };
static struct ralink_pmx_func i2c_grp[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 7, 8) };
static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func sdram_grp[] = { FUNC("sdram", 0, 24, 16) };
static struct ralink_pmx_func pci_grp[] = { FUNC("pci", 0, 40, 32) };
static struct ralink_pmx_group rt2880_pinmux_data_act[] = {
GRP("i2c", i2c_func, 1, RT2880_GPIO_MODE_I2C),
GRP("spi", spi_func, 1, RT2880_GPIO_MODE_SPI),
GRP("uartlite", uartlite_func, 1, RT2880_GPIO_MODE_UART0),
GRP("jtag", jtag_func, 1, RT2880_GPIO_MODE_JTAG),
GRP("mdio", mdio_func, 1, RT2880_GPIO_MODE_MDIO),
GRP("sdram", sdram_func, 1, RT2880_GPIO_MODE_SDRAM),
GRP("pci", pci_func, 1, RT2880_GPIO_MODE_PCI),
GRP("i2c", i2c_grp, 1, RT2880_GPIO_MODE_I2C),
GRP("spi", spi_grp, 1, RT2880_GPIO_MODE_SPI),
GRP("uartlite", uartlite_grp, 1, RT2880_GPIO_MODE_UART0),
GRP("jtag", jtag_grp, 1, RT2880_GPIO_MODE_JTAG),
GRP("mdio", mdio_grp, 1, RT2880_GPIO_MODE_MDIO),
GRP("sdram", sdram_grp, 1, RT2880_GPIO_MODE_SDRAM),
GRP("pci", pci_grp, 1, RT2880_GPIO_MODE_PCI),
{ 0 }
};
......
......@@ -31,9 +31,9 @@
#define RT3352_GPIO_MODE_LNA 18
#define RT3352_GPIO_MODE_PA 20
static struct ralink_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_func[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartf_func[] = {
static struct ralink_pmx_func i2c_grp[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartf_grp[] = {
FUNC("uartf", RT305X_GPIO_MODE_UARTF, 7, 8),
FUNC("pcm uartf", RT305X_GPIO_MODE_PCM_UARTF, 7, 8),
FUNC("pcm i2s", RT305X_GPIO_MODE_PCM_I2S, 7, 8),
......@@ -42,65 +42,65 @@ static struct ralink_pmx_func uartf_func[] = {
FUNC("gpio uartf", RT305X_GPIO_MODE_GPIO_UARTF, 7, 4),
FUNC("gpio i2s", RT305X_GPIO_MODE_GPIO_I2S, 7, 4),
};
static struct ralink_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 15, 2) };
static struct ralink_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func rt5350_led_func[] = { FUNC("led", 0, 22, 5) };
static struct ralink_pmx_func rt5350_cs1_func[] = {
static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func rt5350_led_grp[] = { FUNC("led", 0, 22, 5) };
static struct ralink_pmx_func rt5350_cs1_grp[] = {
FUNC("spi_cs1", 0, 27, 1),
FUNC("wdg_cs1", 1, 27, 1),
};
static struct ralink_pmx_func sdram_func[] = { FUNC("sdram", 0, 24, 16) };
static struct ralink_pmx_func rt3352_rgmii_func[] = {
static struct ralink_pmx_func sdram_grp[] = { FUNC("sdram", 0, 24, 16) };
static struct ralink_pmx_func rt3352_rgmii_grp[] = {
FUNC("rgmii", 0, 24, 12)
};
static struct ralink_pmx_func rgmii_func[] = { FUNC("rgmii", 0, 40, 12) };
static struct ralink_pmx_func rt3352_lna_func[] = { FUNC("lna", 0, 36, 2) };
static struct ralink_pmx_func rt3352_pa_func[] = { FUNC("pa", 0, 38, 2) };
static struct ralink_pmx_func rt3352_led_func[] = { FUNC("led", 0, 40, 5) };
static struct ralink_pmx_func rt3352_cs1_func[] = {
static struct ralink_pmx_func rgmii_grp[] = { FUNC("rgmii", 0, 40, 12) };
static struct ralink_pmx_func rt3352_lna_grp[] = { FUNC("lna", 0, 36, 2) };
static struct ralink_pmx_func rt3352_pa_grp[] = { FUNC("pa", 0, 38, 2) };
static struct ralink_pmx_func rt3352_led_grp[] = { FUNC("led", 0, 40, 5) };
static struct ralink_pmx_func rt3352_cs1_grp[] = {
FUNC("spi_cs1", 0, 45, 1),
FUNC("wdg_cs1", 1, 45, 1),
};
static struct ralink_pmx_group rt3050_pinmux_data[] = {
GRP("i2c", i2c_func, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_func, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_func, RT305X_GPIO_MODE_UART0_MASK,
GRP("i2c", i2c_grp, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_grp, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_grp, RT305X_GPIO_MODE_UART0_MASK,
RT305X_GPIO_MODE_UART0_SHIFT),
GRP("uartlite", uartlite_func, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_func, 1, RT305X_GPIO_MODE_JTAG),
GRP("mdio", mdio_func, 1, RT305X_GPIO_MODE_MDIO),
GRP("rgmii", rgmii_func, 1, RT305X_GPIO_MODE_RGMII),
GRP("sdram", sdram_func, 1, RT305X_GPIO_MODE_SDRAM),
GRP("uartlite", uartlite_grp, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_grp, 1, RT305X_GPIO_MODE_JTAG),
GRP("mdio", mdio_grp, 1, RT305X_GPIO_MODE_MDIO),
GRP("rgmii", rgmii_grp, 1, RT305X_GPIO_MODE_RGMII),
GRP("sdram", sdram_grp, 1, RT305X_GPIO_MODE_SDRAM),
{ 0 }
};
static struct ralink_pmx_group rt3352_pinmux_data[] = {
GRP("i2c", i2c_func, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_func, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_func, RT305X_GPIO_MODE_UART0_MASK,
GRP("i2c", i2c_grp, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_grp, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_grp, RT305X_GPIO_MODE_UART0_MASK,
RT305X_GPIO_MODE_UART0_SHIFT),
GRP("uartlite", uartlite_func, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_func, 1, RT305X_GPIO_MODE_JTAG),
GRP("mdio", mdio_func, 1, RT305X_GPIO_MODE_MDIO),
GRP("rgmii", rt3352_rgmii_func, 1, RT305X_GPIO_MODE_RGMII),
GRP("lna", rt3352_lna_func, 1, RT3352_GPIO_MODE_LNA),
GRP("pa", rt3352_pa_func, 1, RT3352_GPIO_MODE_PA),
GRP("led", rt3352_led_func, 1, RT5350_GPIO_MODE_PHY_LED),
GRP("spi_cs1", rt3352_cs1_func, 2, RT5350_GPIO_MODE_SPI_CS1),
GRP("uartlite", uartlite_grp, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_grp, 1, RT305X_GPIO_MODE_JTAG),
GRP("mdio", mdio_grp, 1, RT305X_GPIO_MODE_MDIO),
GRP("rgmii", rt3352_rgmii_grp, 1, RT305X_GPIO_MODE_RGMII),
GRP("lna", rt3352_lna_grp, 1, RT3352_GPIO_MODE_LNA),
GRP("pa", rt3352_pa_grp, 1, RT3352_GPIO_MODE_PA),
GRP("led", rt3352_led_grp, 1, RT5350_GPIO_MODE_PHY_LED),
GRP("spi_cs1", rt3352_cs1_grp, 2, RT5350_GPIO_MODE_SPI_CS1),
{ 0 }
};
static struct ralink_pmx_group rt5350_pinmux_data[] = {
GRP("i2c", i2c_func, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_func, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_func, RT305X_GPIO_MODE_UART0_MASK,
GRP("i2c", i2c_grp, 1, RT305X_GPIO_MODE_I2C),
GRP("spi", spi_grp, 1, RT305X_GPIO_MODE_SPI),
GRP("uartf", uartf_grp, RT305X_GPIO_MODE_UART0_MASK,
RT305X_GPIO_MODE_UART0_SHIFT),
GRP("uartlite", uartlite_func, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_func, 1, RT305X_GPIO_MODE_JTAG),
GRP("led", rt5350_led_func, 1, RT5350_GPIO_MODE_PHY_LED),
GRP("spi_cs1", rt5350_cs1_func, 2, RT5350_GPIO_MODE_SPI_CS1),
GRP("uartlite", uartlite_grp, 1, RT305X_GPIO_MODE_UART1),
GRP("jtag", jtag_grp, 1, RT305X_GPIO_MODE_JTAG),
GRP("led", rt5350_led_grp, 1, RT5350_GPIO_MODE_PHY_LED),
GRP("spi_cs1", rt5350_cs1_grp, 2, RT5350_GPIO_MODE_SPI_CS1),
{ 0 }
};
......
......@@ -39,9 +39,9 @@
#define RT3883_GPIO_MODE_LNA_G_GPIO 0x3
#define RT3883_GPIO_MODE_LNA_G _RT3883_GPIO_MODE_LNA_G(RT3883_GPIO_MODE_LNA_G_MASK)
static struct ralink_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_func[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartf_func[] = {
static struct ralink_pmx_func i2c_grp[] = { FUNC("i2c", 0, 1, 2) };
static struct ralink_pmx_func spi_grp[] = { FUNC("spi", 0, 3, 4) };
static struct ralink_pmx_func uartf_grp[] = {
FUNC("uartf", RT3883_GPIO_MODE_UARTF, 7, 8),
FUNC("pcm uartf", RT3883_GPIO_MODE_PCM_UARTF, 7, 8),
FUNC("pcm i2s", RT3883_GPIO_MODE_PCM_I2S, 7, 8),
......@@ -50,34 +50,34 @@ static struct ralink_pmx_func uartf_func[] = {
FUNC("gpio uartf", RT3883_GPIO_MODE_GPIO_UARTF, 7, 4),
FUNC("gpio i2s", RT3883_GPIO_MODE_GPIO_I2S, 7, 4),
};
static struct ralink_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 15, 2) };
static struct ralink_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func lna_a_func[] = { FUNC("lna a", 0, 32, 3) };
static struct ralink_pmx_func lna_g_func[] = { FUNC("lna g", 0, 35, 3) };
static struct ralink_pmx_func pci_func[] = {
static struct ralink_pmx_func uartlite_grp[] = { FUNC("uartlite", 0, 15, 2) };
static struct ralink_pmx_func jtag_grp[] = { FUNC("jtag", 0, 17, 5) };
static struct ralink_pmx_func mdio_grp[] = { FUNC("mdio", 0, 22, 2) };
static struct ralink_pmx_func lna_a_grp[] = { FUNC("lna a", 0, 32, 3) };
static struct ralink_pmx_func lna_g_grp[] = { FUNC("lna g", 0, 35, 3) };
static struct ralink_pmx_func pci_grp[] = {
FUNC("pci-dev", 0, 40, 32),
FUNC("pci-host2", 1, 40, 32),
FUNC("pci-host1", 2, 40, 32),
FUNC("pci-fnc", 3, 40, 32)
};
static struct ralink_pmx_func ge1_func[] = { FUNC("ge1", 0, 72, 12) };
static struct ralink_pmx_func ge2_func[] = { FUNC("ge2", 0, 84, 12) };
static struct ralink_pmx_func ge1_grp[] = { FUNC("ge1", 0, 72, 12) };
static struct ralink_pmx_func ge2_grp[] = { FUNC("ge2", 0, 84, 12) };
static struct ralink_pmx_group rt3883_pinmux_data[] = {
GRP("i2c", i2c_func, 1, RT3883_GPIO_MODE_I2C),
GRP("spi", spi_func, 1, RT3883_GPIO_MODE_SPI),
GRP("uartf", uartf_func, RT3883_GPIO_MODE_UART0_MASK,
GRP("i2c", i2c_grp, 1, RT3883_GPIO_MODE_I2C),
GRP("spi", spi_grp, 1, RT3883_GPIO_MODE_SPI),
GRP("uartf", uartf_grp, RT3883_GPIO_MODE_UART0_MASK,
RT3883_GPIO_MODE_UART0_SHIFT),
GRP("uartlite", uartlite_func, 1, RT3883_GPIO_MODE_UART1),
GRP("jtag", jtag_func, 1, RT3883_GPIO_MODE_JTAG),
GRP("mdio", mdio_func, 1, RT3883_GPIO_MODE_MDIO),
GRP("lna a", lna_a_func, 1, RT3883_GPIO_MODE_LNA_A),
GRP("lna g", lna_g_func, 1, RT3883_GPIO_MODE_LNA_G),
GRP("pci", pci_func, RT3883_GPIO_MODE_PCI_MASK,
GRP("uartlite", uartlite_grp, 1, RT3883_GPIO_MODE_UART1),
GRP("jtag", jtag_grp, 1, RT3883_GPIO_MODE_JTAG),
GRP("mdio", mdio_grp, 1, RT3883_GPIO_MODE_MDIO),
GRP("lna a", lna_a_grp, 1, RT3883_GPIO_MODE_LNA_A),
GRP("lna g", lna_g_grp, 1, RT3883_GPIO_MODE_LNA_G),
GRP("pci", pci_grp, RT3883_GPIO_MODE_PCI_MASK,
RT3883_GPIO_MODE_PCI_SHIFT),
GRP("ge1", ge1_func, 1, RT3883_GPIO_MODE_GE1),
GRP("ge2", ge2_func, 1, RT3883_GPIO_MODE_GE2),
GRP("ge1", ge1_grp, 1, RT3883_GPIO_MODE_GE1),
GRP("ge2", ge2_grp, 1, RT3883_GPIO_MODE_GE2),
{ 0 }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment