diff options
Diffstat (limited to 'arch/arm/plat-samsung/include/plat/gpio-core.h')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-core.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index e358c7da848..13a22b8861e 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h | |||
@@ -43,6 +43,8 @@ struct s3c_gpio_cfg; | |||
43 | * struct s3c_gpio_chip - wrapper for specific implementation of gpio | 43 | * struct s3c_gpio_chip - wrapper for specific implementation of gpio |
44 | * @chip: The chip structure to be exported via gpiolib. | 44 | * @chip: The chip structure to be exported via gpiolib. |
45 | * @base: The base pointer to the gpio configuration registers. | 45 | * @base: The base pointer to the gpio configuration registers. |
46 | * @group: The group register number for gpio interrupt support. | ||
47 | * @irq_base: The base irq number. | ||
46 | * @config: special function and pull-resistor control information. | 48 | * @config: special function and pull-resistor control information. |
47 | * @lock: Lock for exclusive access to this gpio bank. | 49 | * @lock: Lock for exclusive access to this gpio bank. |
48 | * @pm_save: Save information for suspend/resume support. | 50 | * @pm_save: Save information for suspend/resume support. |
@@ -63,6 +65,8 @@ struct s3c_gpio_chip { | |||
63 | struct s3c_gpio_cfg *config; | 65 | struct s3c_gpio_cfg *config; |
64 | struct s3c_gpio_pm *pm; | 66 | struct s3c_gpio_pm *pm; |
65 | void __iomem *base; | 67 | void __iomem *base; |
68 | int irq_base; | ||
69 | int group; | ||
66 | spinlock_t lock; | 70 | spinlock_t lock; |
67 | #ifdef CONFIG_PM | 71 | #ifdef CONFIG_PM |
68 | u32 pm_save[4]; | 72 | u32 pm_save[4]; |
@@ -118,6 +122,17 @@ extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, | |||
118 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); | 122 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); |
119 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); | 123 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); |
120 | 124 | ||
125 | |||
126 | /** | ||
127 | * samsung_gpiolib_to_irq - convert gpio pin to irq number | ||
128 | * @chip: The gpio chip that the pin belongs to. | ||
129 | * @offset: The offset of the pin in the chip. | ||
130 | * | ||
131 | * This helper returns the irq number calculated from the chip->irq_base and | ||
132 | * the provided offset. | ||
133 | */ | ||
134 | extern int samsung_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset); | ||
135 | |||
121 | /* exported for core SoC support to change */ | 136 | /* exported for core SoC support to change */ |
122 | extern struct s3c_gpio_cfg s3c24xx_gpiocfg_default; | 137 | extern struct s3c_gpio_cfg s3c24xx_gpiocfg_default; |
123 | 138 | ||