2 * Exynos specific support for Samsung pinctrl/gpiolib driver with eint support.
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 * Copyright (c) 2012 Linaro Ltd
7 * http://www.linaro.org
9 * Author: Thomas Abraham <thomas.ab@samsung.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This file contains the Samsung Exynos specific information required by the
17 * the Samsung pinctrl/gpiolib driver. It also includes the implementation of
18 * external gpio and wakeup interrupt support.
21 #include <linux/module.h>
22 #include <linux/device.h>
23 #include <linux/interrupt.h>
24 #include <linux/irqdomain.h>
25 #include <linux/irq.h>
26 #include <linux/of_irq.h>
28 #include <linux/slab.h>
29 #include <linux/err.h>
31 #include <asm/mach/irq.h>
33 #include "pinctrl-samsung.h"
34 #include "pinctrl-exynos.h"
36 /* list of external wakeup controllers supported */
37 static const struct of_device_id exynos_wkup_irq_ids
[] = {
38 { .compatible
= "samsung,exynos4210-wakeup-eint", },
41 static void exynos_gpio_irq_unmask(struct irq_data
*irqd
)
43 struct samsung_pinctrl_drv_data
*d
= irqd
->domain
->host_data
;
44 struct exynos_geint_data
*edata
= irq_data_get_irq_handler_data(irqd
);
45 unsigned long reg_mask
= d
->ctrl
->geint_mask
+ edata
->eint_offset
;
48 mask
= readl(d
->virt_base
+ reg_mask
);
49 mask
&= ~(1 << edata
->pin
);
50 writel(mask
, d
->virt_base
+ reg_mask
);
53 static void exynos_gpio_irq_mask(struct irq_data
*irqd
)
55 struct samsung_pinctrl_drv_data
*d
= irqd
->domain
->host_data
;
56 struct exynos_geint_data
*edata
= irq_data_get_irq_handler_data(irqd
);
57 unsigned long reg_mask
= d
->ctrl
->geint_mask
+ edata
->eint_offset
;
60 mask
= readl(d
->virt_base
+ reg_mask
);
61 mask
|= 1 << edata
->pin
;
62 writel(mask
, d
->virt_base
+ reg_mask
);
65 static void exynos_gpio_irq_ack(struct irq_data
*irqd
)
67 struct samsung_pinctrl_drv_data
*d
= irqd
->domain
->host_data
;
68 struct exynos_geint_data
*edata
= irq_data_get_irq_handler_data(irqd
);
69 unsigned long reg_pend
= d
->ctrl
->geint_pend
+ edata
->eint_offset
;
71 writel(1 << edata
->pin
, d
->virt_base
+ reg_pend
);
74 static int exynos_gpio_irq_set_type(struct irq_data
*irqd
, unsigned int type
)
76 struct samsung_pinctrl_drv_data
*d
= irqd
->domain
->host_data
;
77 struct samsung_pin_ctrl
*ctrl
= d
->ctrl
;
78 struct exynos_geint_data
*edata
= irq_data_get_irq_handler_data(irqd
);
79 struct samsung_pin_bank
*bank
= edata
->bank
;
80 unsigned int shift
= EXYNOS_EINT_CON_LEN
* edata
->pin
;
81 unsigned int con
, trig_type
;
82 unsigned long reg_con
= ctrl
->geint_con
+ edata
->eint_offset
;
86 case IRQ_TYPE_EDGE_RISING
:
87 trig_type
= EXYNOS_EINT_EDGE_RISING
;
89 case IRQ_TYPE_EDGE_FALLING
:
90 trig_type
= EXYNOS_EINT_EDGE_FALLING
;
92 case IRQ_TYPE_EDGE_BOTH
:
93 trig_type
= EXYNOS_EINT_EDGE_BOTH
;
95 case IRQ_TYPE_LEVEL_HIGH
:
96 trig_type
= EXYNOS_EINT_LEVEL_HIGH
;
98 case IRQ_TYPE_LEVEL_LOW
:
99 trig_type
= EXYNOS_EINT_LEVEL_LOW
;
102 pr_err("unsupported external interrupt type\n");
106 if (type
& IRQ_TYPE_EDGE_BOTH
)
107 __irq_set_handler_locked(irqd
->irq
, handle_edge_irq
);
109 __irq_set_handler_locked(irqd
->irq
, handle_level_irq
);
111 con
= readl(d
->virt_base
+ reg_con
);
112 con
&= ~(EXYNOS_EINT_CON_MASK
<< shift
);
113 con
|= trig_type
<< shift
;
114 writel(con
, d
->virt_base
+ reg_con
);
116 reg_con
= bank
->pctl_offset
;
117 shift
= edata
->pin
* bank
->func_width
;
118 mask
= (1 << bank
->func_width
) - 1;
120 con
= readl(d
->virt_base
+ reg_con
);
121 con
&= ~(mask
<< shift
);
122 con
|= EXYNOS_EINT_FUNC
<< shift
;
123 writel(con
, d
->virt_base
+ reg_con
);
129 * irq_chip for gpio interrupts.
131 static struct irq_chip exynos_gpio_irq_chip
= {
132 .name
= "exynos_gpio_irq_chip",
133 .irq_unmask
= exynos_gpio_irq_unmask
,
134 .irq_mask
= exynos_gpio_irq_mask
,
135 .irq_ack
= exynos_gpio_irq_ack
,
136 .irq_set_type
= exynos_gpio_irq_set_type
,
140 * given a controller-local external gpio interrupt number, prepare the handler
143 static struct exynos_geint_data
*exynos_get_eint_data(irq_hw_number_t hw
,
144 struct samsung_pinctrl_drv_data
*d
)
146 struct samsung_pin_bank
*bank
= d
->ctrl
->pin_banks
;
147 struct exynos_geint_data
*eint_data
;
148 unsigned int nr_banks
= d
->ctrl
->nr_banks
, idx
;
149 unsigned int irq_base
= 0, eint_offset
= 0;
151 if (hw
>= d
->ctrl
->nr_gint
) {
152 dev_err(d
->dev
, "unsupported ext-gpio interrupt\n");
156 for (idx
= 0; idx
< nr_banks
; idx
++, bank
++) {
157 if (bank
->eint_type
!= EINT_TYPE_GPIO
)
159 if ((hw
>= irq_base
) && (hw
< (irq_base
+ bank
->nr_pins
)))
161 irq_base
+= bank
->nr_pins
;
165 if (idx
== nr_banks
) {
166 dev_err(d
->dev
, "pin bank not found for ext-gpio interrupt\n");
170 eint_data
= devm_kzalloc(d
->dev
, sizeof(*eint_data
), GFP_KERNEL
);
172 dev_err(d
->dev
, "no memory for eint-gpio data\n");
176 eint_data
->bank
= bank
;
177 eint_data
->pin
= hw
- irq_base
;
178 eint_data
->eint_offset
= eint_offset
;
182 static int exynos_gpio_irq_map(struct irq_domain
*h
, unsigned int virq
,
185 struct samsung_pinctrl_drv_data
*d
= h
->host_data
;
186 struct exynos_geint_data
*eint_data
;
188 eint_data
= exynos_get_eint_data(hw
, d
);
192 irq_set_handler_data(virq
, eint_data
);
193 irq_set_chip_data(virq
, h
->host_data
);
194 irq_set_chip_and_handler(virq
, &exynos_gpio_irq_chip
,
196 set_irq_flags(virq
, IRQF_VALID
);
200 static void exynos_gpio_irq_unmap(struct irq_domain
*h
, unsigned int virq
)
202 struct samsung_pinctrl_drv_data
*d
= h
->host_data
;
203 struct exynos_geint_data
*eint_data
;
205 eint_data
= irq_get_handler_data(virq
);
206 devm_kfree(d
->dev
, eint_data
);
210 * irq domain callbacks for external gpio interrupt controller.
212 static const struct irq_domain_ops exynos_gpio_irqd_ops
= {
213 .map
= exynos_gpio_irq_map
,
214 .unmap
= exynos_gpio_irq_unmap
,
215 .xlate
= irq_domain_xlate_twocell
,
218 static irqreturn_t
exynos_eint_gpio_irq(int irq
, void *data
)
220 struct samsung_pinctrl_drv_data
*d
= data
;
221 struct samsung_pin_ctrl
*ctrl
= d
->ctrl
;
222 struct samsung_pin_bank
*bank
= ctrl
->pin_banks
;
223 unsigned int svc
, group
, pin
, virq
;
225 svc
= readl(d
->virt_base
+ ctrl
->svc
);
226 group
= EXYNOS_SVC_GROUP(svc
);
227 pin
= svc
& EXYNOS_SVC_NUM_MASK
;
233 virq
= irq_linear_revmap(d
->gpio_irqd
, bank
->irq_base
+ pin
);
236 generic_handle_irq(virq
);
241 * exynos_eint_gpio_init() - setup handling of external gpio interrupts.
242 * @d: driver data of samsung pinctrl driver.
244 static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data
*d
)
246 struct device
*dev
= d
->dev
;
250 dev_err(dev
, "irq number not available\n");
254 ret
= devm_request_irq(dev
, d
->irq
, exynos_eint_gpio_irq
,
255 0, dev_name(dev
), d
);
257 dev_err(dev
, "irq request failed\n");
261 d
->gpio_irqd
= irq_domain_add_linear(dev
->of_node
, d
->ctrl
->nr_gint
,
262 &exynos_gpio_irqd_ops
, d
);
264 dev_err(dev
, "gpio irq domain allocation failed\n");
271 static void exynos_wkup_irq_unmask(struct irq_data
*irqd
)
273 struct samsung_pinctrl_drv_data
*d
= irq_data_get_irq_chip_data(irqd
);
274 unsigned int bank
= irqd
->hwirq
/ EXYNOS_EINT_MAX_PER_BANK
;
275 unsigned int pin
= irqd
->hwirq
& (EXYNOS_EINT_MAX_PER_BANK
- 1);
276 unsigned long reg_mask
= d
->ctrl
->weint_mask
+ (bank
<< 2);
279 mask
= readl(d
->virt_base
+ reg_mask
);
281 writel(mask
, d
->virt_base
+ reg_mask
);
284 static void exynos_wkup_irq_mask(struct irq_data
*irqd
)
286 struct samsung_pinctrl_drv_data
*d
= irq_data_get_irq_chip_data(irqd
);
287 unsigned int bank
= irqd
->hwirq
/ EXYNOS_EINT_MAX_PER_BANK
;
288 unsigned int pin
= irqd
->hwirq
& (EXYNOS_EINT_MAX_PER_BANK
- 1);
289 unsigned long reg_mask
= d
->ctrl
->weint_mask
+ (bank
<< 2);
292 mask
= readl(d
->virt_base
+ reg_mask
);
294 writel(mask
, d
->virt_base
+ reg_mask
);
297 static void exynos_wkup_irq_ack(struct irq_data
*irqd
)
299 struct samsung_pinctrl_drv_data
*d
= irq_data_get_irq_chip_data(irqd
);
300 unsigned int bank
= irqd
->hwirq
/ EXYNOS_EINT_MAX_PER_BANK
;
301 unsigned int pin
= irqd
->hwirq
& (EXYNOS_EINT_MAX_PER_BANK
- 1);
302 unsigned long pend
= d
->ctrl
->weint_pend
+ (bank
<< 2);
304 writel(1 << pin
, d
->virt_base
+ pend
);
307 static int exynos_wkup_irq_set_type(struct irq_data
*irqd
, unsigned int type
)
309 struct samsung_pinctrl_drv_data
*d
= irq_data_get_irq_chip_data(irqd
);
310 unsigned int bank
= irqd
->hwirq
/ EXYNOS_EINT_MAX_PER_BANK
;
311 unsigned int pin
= irqd
->hwirq
& (EXYNOS_EINT_MAX_PER_BANK
- 1);
312 unsigned long reg_con
= d
->ctrl
->weint_con
+ (bank
<< 2);
313 unsigned long shift
= EXYNOS_EINT_CON_LEN
* pin
;
314 unsigned long con
, trig_type
;
317 case IRQ_TYPE_EDGE_RISING
:
318 trig_type
= EXYNOS_EINT_EDGE_RISING
;
320 case IRQ_TYPE_EDGE_FALLING
:
321 trig_type
= EXYNOS_EINT_EDGE_FALLING
;
323 case IRQ_TYPE_EDGE_BOTH
:
324 trig_type
= EXYNOS_EINT_EDGE_BOTH
;
326 case IRQ_TYPE_LEVEL_HIGH
:
327 trig_type
= EXYNOS_EINT_LEVEL_HIGH
;
329 case IRQ_TYPE_LEVEL_LOW
:
330 trig_type
= EXYNOS_EINT_LEVEL_LOW
;
333 pr_err("unsupported external interrupt type\n");
337 if (type
& IRQ_TYPE_EDGE_BOTH
)
338 __irq_set_handler_locked(irqd
->irq
, handle_edge_irq
);
340 __irq_set_handler_locked(irqd
->irq
, handle_level_irq
);
342 con
= readl(d
->virt_base
+ reg_con
);
343 con
&= ~(EXYNOS_EINT_CON_MASK
<< shift
);
344 con
|= trig_type
<< shift
;
345 writel(con
, d
->virt_base
+ reg_con
);
350 * irq_chip for wakeup interrupts
352 static struct irq_chip exynos_wkup_irq_chip
= {
353 .name
= "exynos_wkup_irq_chip",
354 .irq_unmask
= exynos_wkup_irq_unmask
,
355 .irq_mask
= exynos_wkup_irq_mask
,
356 .irq_ack
= exynos_wkup_irq_ack
,
357 .irq_set_type
= exynos_wkup_irq_set_type
,
360 /* interrupt handler for wakeup interrupts 0..15 */
361 static void exynos_irq_eint0_15(unsigned int irq
, struct irq_desc
*desc
)
363 struct exynos_weint_data
*eintd
= irq_get_handler_data(irq
);
364 struct irq_chip
*chip
= irq_get_chip(irq
);
367 chained_irq_enter(chip
, desc
);
368 chip
->irq_mask(&desc
->irq_data
);
371 chip
->irq_ack(&desc
->irq_data
);
373 eint_irq
= irq_linear_revmap(eintd
->domain
, eintd
->irq
);
374 generic_handle_irq(eint_irq
);
375 chip
->irq_unmask(&desc
->irq_data
);
376 chained_irq_exit(chip
, desc
);
379 static inline void exynos_irq_demux_eint(int irq_base
, unsigned long pend
,
380 struct irq_domain
*domain
)
386 generic_handle_irq(irq_find_mapping(domain
, irq_base
+ irq
));
391 /* interrupt handler for wakeup interrupt 16 */
392 static void exynos_irq_demux_eint16_31(unsigned int irq
, struct irq_desc
*desc
)
394 struct irq_chip
*chip
= irq_get_chip(irq
);
395 struct exynos_weint_data
*eintd
= irq_get_handler_data(irq
);
396 struct samsung_pinctrl_drv_data
*d
= eintd
->domain
->host_data
;
400 chained_irq_enter(chip
, desc
);
401 pend
= readl(d
->virt_base
+ d
->ctrl
->weint_pend
+ 0x8);
402 mask
= readl(d
->virt_base
+ d
->ctrl
->weint_mask
+ 0x8);
403 exynos_irq_demux_eint(16, pend
& ~mask
, eintd
->domain
);
404 pend
= readl(d
->virt_base
+ d
->ctrl
->weint_pend
+ 0xC);
405 mask
= readl(d
->virt_base
+ d
->ctrl
->weint_mask
+ 0xC);
406 exynos_irq_demux_eint(24, pend
& ~mask
, eintd
->domain
);
407 chained_irq_exit(chip
, desc
);
410 static int exynos_wkup_irq_map(struct irq_domain
*h
, unsigned int virq
,
413 irq_set_chip_and_handler(virq
, &exynos_wkup_irq_chip
, handle_level_irq
);
414 irq_set_chip_data(virq
, h
->host_data
);
415 set_irq_flags(virq
, IRQF_VALID
);
420 * irq domain callbacks for external wakeup interrupt controller.
422 static const struct irq_domain_ops exynos_wkup_irqd_ops
= {
423 .map
= exynos_wkup_irq_map
,
424 .xlate
= irq_domain_xlate_twocell
,
428 * exynos_eint_wkup_init() - setup handling of external wakeup interrupts.
429 * @d: driver data of samsung pinctrl driver.
431 static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data
*d
)
433 struct device
*dev
= d
->dev
;
434 struct device_node
*wkup_np
= NULL
;
435 struct device_node
*np
;
436 struct exynos_weint_data
*weint_data
;
439 for_each_child_of_node(dev
->of_node
, np
) {
440 if (of_match_node(exynos_wkup_irq_ids
, np
)) {
448 d
->wkup_irqd
= irq_domain_add_linear(wkup_np
, d
->ctrl
->nr_wint
,
449 &exynos_wkup_irqd_ops
, d
);
451 dev_err(dev
, "wakeup irq domain allocation failed\n");
455 weint_data
= devm_kzalloc(dev
, sizeof(*weint_data
) * 17, GFP_KERNEL
);
457 dev_err(dev
, "could not allocate memory for weint_data\n");
461 irq
= irq_of_parse_and_map(wkup_np
, 16);
463 weint_data
[16].domain
= d
->wkup_irqd
;
464 irq_set_chained_handler(irq
, exynos_irq_demux_eint16_31
);
465 irq_set_handler_data(irq
, &weint_data
[16]);
467 dev_err(dev
, "irq number for EINT16-32 not found\n");
470 for (idx
= 0; idx
< 16; idx
++) {
471 weint_data
[idx
].domain
= d
->wkup_irqd
;
472 weint_data
[idx
].irq
= idx
;
474 irq
= irq_of_parse_and_map(wkup_np
, idx
);
476 irq_set_handler_data(irq
, &weint_data
[idx
]);
477 irq_set_chained_handler(irq
, exynos_irq_eint0_15
);
479 dev_err(dev
, "irq number for eint-%x not found\n", idx
);
485 /* pin banks of exynos4210 pin-controller 0 */
486 static struct samsung_pin_bank exynos4210_pin_banks0
[] = {
487 EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_A0
, "gpa0"),
488 EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_A1
, "gpa1"),
489 EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_B
, "gpb"),
490 EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_C0
, "gpc0"),
491 EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_C1
, "gpc1"),
492 EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_D0
, "gpd0"),
493 EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_D1
, "gpd1"),
494 EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_E0
, "gpe0"),
495 EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_E1
, "gpe1"),
496 EXYNOS_PIN_BANK_EINTG(0x120, EXYNOS4210_GPIO_E2
, "gpe2"),
497 EXYNOS_PIN_BANK_EINTG(0x140, EXYNOS4210_GPIO_E3
, "gpe3"),
498 EXYNOS_PIN_BANK_EINTG(0x160, EXYNOS4210_GPIO_E4
, "gpe4"),
499 EXYNOS_PIN_BANK_EINTG(0x180, EXYNOS4210_GPIO_F0
, "gpf0"),
500 EXYNOS_PIN_BANK_EINTG(0x1A0, EXYNOS4210_GPIO_F1
, "gpf1"),
501 EXYNOS_PIN_BANK_EINTG(0x1C0, EXYNOS4210_GPIO_F2
, "gpf2"),
502 EXYNOS_PIN_BANK_EINTG(0x1E0, EXYNOS4210_GPIO_F3
, "gpf3"),
505 /* pin banks of exynos4210 pin-controller 1 */
506 static struct samsung_pin_bank exynos4210_pin_banks1
[] = {
507 EXYNOS_PIN_BANK_EINTG(0x000, EXYNOS4210_GPIO_J0
, "gpj0"),
508 EXYNOS_PIN_BANK_EINTG(0x020, EXYNOS4210_GPIO_J1
, "gpj1"),
509 EXYNOS_PIN_BANK_EINTG(0x040, EXYNOS4210_GPIO_K0
, "gpk0"),
510 EXYNOS_PIN_BANK_EINTG(0x060, EXYNOS4210_GPIO_K1
, "gpk1"),
511 EXYNOS_PIN_BANK_EINTG(0x080, EXYNOS4210_GPIO_K2
, "gpk2"),
512 EXYNOS_PIN_BANK_EINTG(0x0A0, EXYNOS4210_GPIO_K3
, "gpk3"),
513 EXYNOS_PIN_BANK_EINTG(0x0C0, EXYNOS4210_GPIO_L0
, "gpl0"),
514 EXYNOS_PIN_BANK_EINTG(0x0E0, EXYNOS4210_GPIO_L1
, "gpl1"),
515 EXYNOS_PIN_BANK_EINTG(0x100, EXYNOS4210_GPIO_L2
, "gpl2"),
516 EXYNOS_PIN_BANK_EINTN(0x120, EXYNOS4210_GPIO_Y0
, "gpy0"),
517 EXYNOS_PIN_BANK_EINTN(0x140, EXYNOS4210_GPIO_Y1
, "gpy1"),
518 EXYNOS_PIN_BANK_EINTN(0x160, EXYNOS4210_GPIO_Y2
, "gpy2"),
519 EXYNOS_PIN_BANK_EINTN(0x180, EXYNOS4210_GPIO_Y3
, "gpy3"),
520 EXYNOS_PIN_BANK_EINTN(0x1A0, EXYNOS4210_GPIO_Y4
, "gpy4"),
521 EXYNOS_PIN_BANK_EINTN(0x1C0, EXYNOS4210_GPIO_Y5
, "gpy5"),
522 EXYNOS_PIN_BANK_EINTN(0x1E0, EXYNOS4210_GPIO_Y6
, "gpy6"),
523 EXYNOS_PIN_BANK_EINTN(0xC00, EXYNOS4210_GPIO_X0
, "gpx0"),
524 EXYNOS_PIN_BANK_EINTN(0xC20, EXYNOS4210_GPIO_X1
, "gpx1"),
525 EXYNOS_PIN_BANK_EINTN(0xC40, EXYNOS4210_GPIO_X2
, "gpx2"),
526 EXYNOS_PIN_BANK_EINTN(0xC60, EXYNOS4210_GPIO_X3
, "gpx3"),
529 /* pin banks of exynos4210 pin-controller 2 */
530 static struct samsung_pin_bank exynos4210_pin_banks2
[] = {
531 EXYNOS_PIN_BANK_EINTN(0x000, EXYNOS4210_GPIO_Z
, "gpz"),
535 * Samsung pinctrl driver data for Exynos4210 SoC. Exynos4210 SoC includes
536 * three gpio/pin-mux/pinconfig controllers.
538 struct samsung_pin_ctrl exynos4210_pin_ctrl
[] = {
540 /* pin-controller instance 0 data */
541 .pin_banks
= exynos4210_pin_banks0
,
542 .nr_banks
= ARRAY_SIZE(exynos4210_pin_banks0
),
543 .base
= EXYNOS4210_GPIO_A0_START
,
544 .nr_pins
= EXYNOS4210_GPIOA_NR_PINS
,
545 .nr_gint
= EXYNOS4210_GPIOA_NR_GINT
,
546 .geint_con
= EXYNOS_GPIO_ECON_OFFSET
,
547 .geint_mask
= EXYNOS_GPIO_EMASK_OFFSET
,
548 .geint_pend
= EXYNOS_GPIO_EPEND_OFFSET
,
549 .svc
= EXYNOS_SVC_OFFSET
,
550 .eint_gpio_init
= exynos_eint_gpio_init
,
551 .label
= "exynos4210-gpio-ctrl0",
553 /* pin-controller instance 1 data */
554 .pin_banks
= exynos4210_pin_banks1
,
555 .nr_banks
= ARRAY_SIZE(exynos4210_pin_banks1
),
556 .base
= EXYNOS4210_GPIOA_NR_PINS
,
557 .nr_pins
= EXYNOS4210_GPIOB_NR_PINS
,
558 .nr_gint
= EXYNOS4210_GPIOB_NR_GINT
,
560 .geint_con
= EXYNOS_GPIO_ECON_OFFSET
,
561 .geint_mask
= EXYNOS_GPIO_EMASK_OFFSET
,
562 .geint_pend
= EXYNOS_GPIO_EPEND_OFFSET
,
563 .weint_con
= EXYNOS_WKUP_ECON_OFFSET
,
564 .weint_mask
= EXYNOS_WKUP_EMASK_OFFSET
,
565 .weint_pend
= EXYNOS_WKUP_EPEND_OFFSET
,
566 .svc
= EXYNOS_SVC_OFFSET
,
567 .eint_gpio_init
= exynos_eint_gpio_init
,
568 .eint_wkup_init
= exynos_eint_wkup_init
,
569 .label
= "exynos4210-gpio-ctrl1",
571 /* pin-controller instance 2 data */
572 .pin_banks
= exynos4210_pin_banks2
,
573 .nr_banks
= ARRAY_SIZE(exynos4210_pin_banks2
),
574 .base
= EXYNOS4210_GPIOA_NR_PINS
+
575 EXYNOS4210_GPIOB_NR_PINS
,
576 .nr_pins
= EXYNOS4210_GPIOC_NR_PINS
,
577 .label
= "exynos4210-gpio-ctrl2",