diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-at91.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 354a81d40925..66db9849aca8 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c | |||
@@ -25,9 +25,7 @@ | |||
25 | /* Since we request GPIOs from ourself */ | 25 | /* Since we request GPIOs from ourself */ |
26 | #include <linux/pinctrl/consumer.h> | 26 | #include <linux/pinctrl/consumer.h> |
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include "pinctrl-at91.h" |
29 | #include <mach/at91_pio.h> | ||
30 | |||
31 | #include "core.h" | 29 | #include "core.h" |
32 | 30 | ||
33 | #define MAX_GPIO_BANKS 5 | 31 | #define MAX_GPIO_BANKS 5 |
@@ -1344,7 +1342,6 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
1344 | for (i = 0; i < chip->ngpio; i++) { | 1342 | for (i = 0; i < chip->ngpio; i++) { |
1345 | unsigned mask = pin_to_mask(i); | 1343 | unsigned mask = pin_to_mask(i); |
1346 | const char *gpio_label; | 1344 | const char *gpio_label; |
1347 | u32 pdsr; | ||
1348 | 1345 | ||
1349 | gpio_label = gpiochip_is_requested(chip, i); | 1346 | gpio_label = gpiochip_is_requested(chip, i); |
1350 | if (!gpio_label) | 1347 | if (!gpio_label) |
@@ -1353,11 +1350,13 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
1353 | seq_printf(s, "[%s] GPIO%s%d: ", | 1350 | seq_printf(s, "[%s] GPIO%s%d: ", |
1354 | gpio_label, chip->label, i); | 1351 | gpio_label, chip->label, i); |
1355 | if (mode == AT91_MUX_GPIO) { | 1352 | if (mode == AT91_MUX_GPIO) { |
1356 | pdsr = readl_relaxed(pio + PIO_PDSR); | 1353 | seq_printf(s, "[gpio] "); |
1357 | 1354 | seq_printf(s, "%s ", | |
1358 | seq_printf(s, "[gpio] %s\n", | 1355 | readl_relaxed(pio + PIO_OSR) & mask ? |
1359 | pdsr & mask ? | 1356 | "output" : "input"); |
1360 | "set" : "clear"); | 1357 | seq_printf(s, "%s\n", |
1358 | readl_relaxed(pio + PIO_PDSR) & mask ? | ||
1359 | "set" : "clear"); | ||
1361 | } else { | 1360 | } else { |
1362 | seq_printf(s, "[periph %c]\n", | 1361 | seq_printf(s, "[periph %c]\n", |
1363 | mode + 'A' - 1); | 1362 | mode + 'A' - 1); |