diff options
| author | Andrew F. Davis <afd@ti.com> | 2018-08-31 15:13:26 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-09-20 11:36:19 -0400 |
| commit | 79b73ff9b2a3ef312d8fa30894fd963c80ded466 (patch) | |
| tree | ea8b7779d33e9c856b47970abbdb1c7c4bd9d5dd /include/linux/platform_data | |
| parent | c36219d9d8df11641d28c6bd0698459485b1709b (diff) | |
gpio: davinci: Move driver local definitions to driver
These defines, structs and inline functions are used only internally by
the driver, they do not belong in platform_data. Move them.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/gpio-davinci.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h index 47695b342883..f92a47e18034 100644 --- a/include/linux/platform_data/gpio-davinci.h +++ b/include/linux/platform_data/gpio-davinci.h | |||
| @@ -16,40 +16,12 @@ | |||
| 16 | #ifndef __DAVINCI_GPIO_PLATFORM_H | 16 | #ifndef __DAVINCI_GPIO_PLATFORM_H |
| 17 | #define __DAVINCI_GPIO_PLATFORM_H | 17 | #define __DAVINCI_GPIO_PLATFORM_H |
| 18 | 18 | ||
| 19 | #include <linux/io.h> | ||
| 20 | #include <linux/spinlock.h> | ||
| 21 | |||
| 22 | #include <asm-generic/gpio.h> | ||
| 23 | |||
| 24 | #define MAX_REGS_BANKS 5 | ||
| 25 | #define MAX_INT_PER_BANK 32 | ||
| 26 | |||
| 27 | struct davinci_gpio_platform_data { | 19 | struct davinci_gpio_platform_data { |
| 28 | u32 ngpio; | 20 | u32 ngpio; |
| 29 | u32 gpio_unbanked; | 21 | u32 gpio_unbanked; |
| 30 | }; | 22 | }; |
| 31 | 23 | ||
| 32 | struct davinci_gpio_irq_data { | ||
| 33 | void __iomem *regs; | ||
| 34 | struct davinci_gpio_controller *chip; | ||
| 35 | int bank_num; | ||
| 36 | }; | ||
| 37 | |||
| 38 | struct davinci_gpio_controller { | ||
| 39 | struct gpio_chip chip; | ||
| 40 | struct irq_domain *irq_domain; | ||
| 41 | /* Serialize access to GPIO registers */ | ||
| 42 | spinlock_t lock; | ||
| 43 | void __iomem *regs[MAX_REGS_BANKS]; | ||
| 44 | int gpio_unbanked; | ||
| 45 | int irqs[MAX_INT_PER_BANK]; | ||
| 46 | }; | ||
| 47 | |||
| 48 | /* Convert GPIO signal to GPIO pin number */ | 24 | /* Convert GPIO signal to GPIO pin number */ |
| 49 | #define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) | 25 | #define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) |
| 50 | 26 | ||
| 51 | static inline u32 __gpio_mask(unsigned gpio) | ||
| 52 | { | ||
| 53 | return 1 << (gpio % 32); | ||
| 54 | } | ||
| 55 | #endif | 27 | #endif |
