aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-samsung.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-samsung.h')
-rw-r--r--drivers/pinctrl/pinctrl-samsung.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h
index 7c7f9ebcd05b..26d3519240c9 100644
--- a/drivers/pinctrl/pinctrl-samsung.h
+++ b/drivers/pinctrl/pinctrl-samsung.h
@@ -127,6 +127,7 @@ struct samsung_pin_bank_type {
127 * @gpio_chip: GPIO chip of the bank. 127 * @gpio_chip: GPIO chip of the bank.
128 * @grange: linux gpio pin range supported by this bank. 128 * @grange: linux gpio pin range supported by this bank.
129 * @slock: spinlock protecting bank registers 129 * @slock: spinlock protecting bank registers
130 * @pm_save: saved register values during suspend
130 */ 131 */
131struct samsung_pin_bank { 132struct samsung_pin_bank {
132 struct samsung_pin_bank_type *type; 133 struct samsung_pin_bank_type *type;
@@ -138,12 +139,15 @@ struct samsung_pin_bank {
138 u32 eint_mask; 139 u32 eint_mask;
139 u32 eint_offset; 140 u32 eint_offset;
140 char *name; 141 char *name;
142 void *soc_priv;
141 struct device_node *of_node; 143 struct device_node *of_node;
142 struct samsung_pinctrl_drv_data *drvdata; 144 struct samsung_pinctrl_drv_data *drvdata;
143 struct irq_domain *irq_domain; 145 struct irq_domain *irq_domain;
144 struct gpio_chip gpio_chip; 146 struct gpio_chip gpio_chip;
145 struct pinctrl_gpio_range grange; 147 struct pinctrl_gpio_range grange;
146 spinlock_t slock; 148 spinlock_t slock;
149
150 u32 pm_save[PINCFG_TYPE_NUM + 1]; /* +1 to handle double CON registers*/
147}; 151};
148 152
149/** 153/**
@@ -184,11 +188,15 @@ struct samsung_pin_ctrl {
184 188
185 int (*eint_gpio_init)(struct samsung_pinctrl_drv_data *); 189 int (*eint_gpio_init)(struct samsung_pinctrl_drv_data *);
186 int (*eint_wkup_init)(struct samsung_pinctrl_drv_data *); 190 int (*eint_wkup_init)(struct samsung_pinctrl_drv_data *);
191 void (*suspend)(struct samsung_pinctrl_drv_data *);
192 void (*resume)(struct samsung_pinctrl_drv_data *);
193
187 char *label; 194 char *label;
188}; 195};
189 196
190/** 197/**
191 * struct samsung_pinctrl_drv_data: wrapper for holding driver data together. 198 * struct samsung_pinctrl_drv_data: wrapper for holding driver data together.
199 * @node: global list node
192 * @virt_base: register base address of the controller. 200 * @virt_base: register base address of the controller.
193 * @dev: device instance representing the controller. 201 * @dev: device instance representing the controller.
194 * @irq: interrpt number used by the controller to notify gpio interrupts. 202 * @irq: interrpt number used by the controller to notify gpio interrupts.
@@ -201,6 +209,7 @@ struct samsung_pin_ctrl {
201 * @nr_function: number of such pin functions. 209 * @nr_function: number of such pin functions.
202 */ 210 */
203struct samsung_pinctrl_drv_data { 211struct samsung_pinctrl_drv_data {
212 struct list_head node;
204 void __iomem *virt_base; 213 void __iomem *virt_base;
205 struct device *dev; 214 struct device *dev;
206 int irq; 215 int irq;