Skip to content

Commit

Permalink
gpio: tegra186: Use TEGRA186_ prefix for GPIO names
Browse files Browse the repository at this point in the history
The new prefix allows the GPIOs to be uniquely identified on a per-chip
basis, which makes it easier to distinguish Tegra186 specific GPIOs from
those of later chips such as Tegra194 which supports a very different
set of GPIOs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
  • Loading branch information
Thierry Reding authored and Bartosz Golaszewski committed Feb 14, 2019
1 parent f3463da commit 6911845
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions drivers/gpio/gpio-tegra186.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,38 +529,38 @@ static int tegra186_gpio_remove(struct platform_device *pdev)
return 0;
}

#define TEGRA_MAIN_GPIO_PORT(port, base, count, controller) \
[TEGRA_MAIN_GPIO_PORT_##port] = { \
#define TEGRA186_MAIN_GPIO_PORT(port, base, count, controller) \
[TEGRA186_MAIN_GPIO_PORT_##port] = { \
.name = #port, \
.offset = base, \
.pins = count, \
.irq = controller, \
}

static const struct tegra_gpio_port tegra186_main_ports[] = {
TEGRA_MAIN_GPIO_PORT( A, 0x2000, 7, 2),
TEGRA_MAIN_GPIO_PORT( B, 0x3000, 7, 3),
TEGRA_MAIN_GPIO_PORT( C, 0x3200, 7, 3),
TEGRA_MAIN_GPIO_PORT( D, 0x3400, 6, 3),
TEGRA_MAIN_GPIO_PORT( E, 0x2200, 8, 2),
TEGRA_MAIN_GPIO_PORT( F, 0x2400, 6, 2),
TEGRA_MAIN_GPIO_PORT( G, 0x4200, 6, 4),
TEGRA_MAIN_GPIO_PORT( H, 0x1000, 7, 1),
TEGRA_MAIN_GPIO_PORT( I, 0x0800, 8, 0),
TEGRA_MAIN_GPIO_PORT( J, 0x5000, 8, 5),
TEGRA_MAIN_GPIO_PORT( K, 0x5200, 1, 5),
TEGRA_MAIN_GPIO_PORT( L, 0x1200, 8, 1),
TEGRA_MAIN_GPIO_PORT( M, 0x5600, 6, 5),
TEGRA_MAIN_GPIO_PORT( N, 0x0000, 7, 0),
TEGRA_MAIN_GPIO_PORT( O, 0x0200, 4, 0),
TEGRA_MAIN_GPIO_PORT( P, 0x4000, 7, 4),
TEGRA_MAIN_GPIO_PORT( Q, 0x0400, 6, 0),
TEGRA_MAIN_GPIO_PORT( R, 0x0a00, 6, 0),
TEGRA_MAIN_GPIO_PORT( T, 0x0600, 4, 0),
TEGRA_MAIN_GPIO_PORT( X, 0x1400, 8, 1),
TEGRA_MAIN_GPIO_PORT( Y, 0x1600, 7, 1),
TEGRA_MAIN_GPIO_PORT(BB, 0x2600, 2, 2),
TEGRA_MAIN_GPIO_PORT(CC, 0x5400, 4, 5),
TEGRA186_MAIN_GPIO_PORT( A, 0x2000, 7, 2),
TEGRA186_MAIN_GPIO_PORT( B, 0x3000, 7, 3),
TEGRA186_MAIN_GPIO_PORT( C, 0x3200, 7, 3),
TEGRA186_MAIN_GPIO_PORT( D, 0x3400, 6, 3),
TEGRA186_MAIN_GPIO_PORT( E, 0x2200, 8, 2),
TEGRA186_MAIN_GPIO_PORT( F, 0x2400, 6, 2),
TEGRA186_MAIN_GPIO_PORT( G, 0x4200, 6, 4),
TEGRA186_MAIN_GPIO_PORT( H, 0x1000, 7, 1),
TEGRA186_MAIN_GPIO_PORT( I, 0x0800, 8, 0),
TEGRA186_MAIN_GPIO_PORT( J, 0x5000, 8, 5),
TEGRA186_MAIN_GPIO_PORT( K, 0x5200, 1, 5),
TEGRA186_MAIN_GPIO_PORT( L, 0x1200, 8, 1),
TEGRA186_MAIN_GPIO_PORT( M, 0x5600, 6, 5),
TEGRA186_MAIN_GPIO_PORT( N, 0x0000, 7, 0),
TEGRA186_MAIN_GPIO_PORT( O, 0x0200, 4, 0),
TEGRA186_MAIN_GPIO_PORT( P, 0x4000, 7, 4),
TEGRA186_MAIN_GPIO_PORT( Q, 0x0400, 6, 0),
TEGRA186_MAIN_GPIO_PORT( R, 0x0a00, 6, 0),
TEGRA186_MAIN_GPIO_PORT( T, 0x0600, 4, 0),
TEGRA186_MAIN_GPIO_PORT( X, 0x1400, 8, 1),
TEGRA186_MAIN_GPIO_PORT( Y, 0x1600, 7, 1),
TEGRA186_MAIN_GPIO_PORT(BB, 0x2600, 2, 2),
TEGRA186_MAIN_GPIO_PORT(CC, 0x5400, 4, 5),
};

static const struct tegra_gpio_soc tegra186_main_soc = {
Expand All @@ -569,23 +569,23 @@ static const struct tegra_gpio_soc tegra186_main_soc = {
.name = "tegra186-gpio",
};

#define TEGRA_AON_GPIO_PORT(port, base, count, controller) \
[TEGRA_AON_GPIO_PORT_##port] = { \
#define TEGRA186_AON_GPIO_PORT(port, base, count, controller) \
[TEGRA186_AON_GPIO_PORT_##port] = { \
.name = #port, \
.offset = base, \
.pins = count, \
.irq = controller, \
}

static const struct tegra_gpio_port tegra186_aon_ports[] = {
TEGRA_AON_GPIO_PORT( S, 0x0200, 5, 0),
TEGRA_AON_GPIO_PORT( U, 0x0400, 6, 0),
TEGRA_AON_GPIO_PORT( V, 0x0800, 8, 0),
TEGRA_AON_GPIO_PORT( W, 0x0a00, 8, 0),
TEGRA_AON_GPIO_PORT( Z, 0x0e00, 4, 0),
TEGRA_AON_GPIO_PORT(AA, 0x0c00, 8, 0),
TEGRA_AON_GPIO_PORT(EE, 0x0600, 3, 0),
TEGRA_AON_GPIO_PORT(FF, 0x0000, 5, 0),
TEGRA186_AON_GPIO_PORT( S, 0x0200, 5, 0),
TEGRA186_AON_GPIO_PORT( U, 0x0400, 6, 0),
TEGRA186_AON_GPIO_PORT( V, 0x0800, 8, 0),
TEGRA186_AON_GPIO_PORT( W, 0x0a00, 8, 0),
TEGRA186_AON_GPIO_PORT( Z, 0x0e00, 4, 0),
TEGRA186_AON_GPIO_PORT(AA, 0x0c00, 8, 0),
TEGRA186_AON_GPIO_PORT(EE, 0x0600, 3, 0),
TEGRA186_AON_GPIO_PORT(FF, 0x0000, 5, 0),
};

static const struct tegra_gpio_soc tegra186_aon_soc = {
Expand Down

0 comments on commit 6911845

Please sign in to comment.