aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-samsung.h
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2012-10-11 04:11:16 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-10-15 03:10:12 -0400
commit595be7268a85735d229451821b56f122d09d7bdc (patch)
treeeefa13ddc638a1fc5e987dee179ac951aea7b90b /drivers/pinctrl/pinctrl-samsung.h
parent1b6056d6db2426cd612f03dabacf655ecb6a27ae (diff)
pinctrl: exynos: Use one IRQ domain per pin bank
Instead of registering one IRQ domain for all pin banks of a pin controller, this patch implements registration of per-bank domains. At a cost of a little memory overhead (~2.5KiB for all GPIO interrupts of Exynos4x12) it simplifies driver code and device tree sources, because GPIO interrupts can be now specified per banks. Example: device { /* ... */ interrupt-parent = <&gpa1>; interrupts = <3 0>; /* ... */ }; Signed-off-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-samsung.h')
-rw-r--r--drivers/pinctrl/pinctrl-samsung.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h
index d77d9bcc5d7d..e56be22302cd 100644
--- a/drivers/pinctrl/pinctrl-samsung.h
+++ b/drivers/pinctrl/pinctrl-samsung.h
@@ -109,10 +109,10 @@ struct samsung_pinctrl_drv_data;
109 * @conpdn_width: width of the sleep mode function selector bin field. 109 * @conpdn_width: width of the sleep mode function selector bin field.
110 * @pudpdn_width: width of the sleep mode pull up/down selector bit field. 110 * @pudpdn_width: width of the sleep mode pull up/down selector bit field.
111 * @eint_type: type of the external interrupt supported by the bank. 111 * @eint_type: type of the external interrupt supported by the bank.
112 * @irq_base: starting controller local irq number of the bank.
113 * @name: name to be prefixed for each pin in this pin bank. 112 * @name: name to be prefixed for each pin in this pin bank.
114 * @of_node: OF node of the bank. 113 * @of_node: OF node of the bank.
115 * @drvdata: link to controller driver data 114 * @drvdata: link to controller driver data
115 * @irq_domain: IRQ domain of the bank.
116 */ 116 */
117struct samsung_pin_bank { 117struct samsung_pin_bank {
118 u32 pctl_offset; 118 u32 pctl_offset;
@@ -125,10 +125,10 @@ struct samsung_pin_bank {
125 u8 pudpdn_width; 125 u8 pudpdn_width;
126 enum eint_type eint_type; 126 enum eint_type eint_type;
127 u32 eint_offset; 127 u32 eint_offset;
128 u32 irq_base;
129 char *name; 128 char *name;
130 struct device_node *of_node; 129 struct device_node *of_node;
131 struct samsung_pinctrl_drv_data *drvdata; 130 struct samsung_pinctrl_drv_data *drvdata;
131 struct irq_domain *irq_domain;
132}; 132};
133 133
134/** 134/**
@@ -137,7 +137,6 @@ struct samsung_pin_bank {
137 * @nr_banks: number of pin banks. 137 * @nr_banks: number of pin banks.
138 * @base: starting system wide pin number. 138 * @base: starting system wide pin number.
139 * @nr_pins: number of pins supported by the controller. 139 * @nr_pins: number of pins supported by the controller.
140 * @nr_gint: number of external gpio interrupts supported.
141 * @nr_wint: number of external wakeup interrupts supported. 140 * @nr_wint: number of external wakeup interrupts supported.
142 * @geint_con: offset of the ext-gpio controller registers. 141 * @geint_con: offset of the ext-gpio controller registers.
143 * @geint_mask: offset of the ext-gpio interrupt mask registers. 142 * @geint_mask: offset of the ext-gpio interrupt mask registers.
@@ -158,7 +157,6 @@ struct samsung_pin_ctrl {
158 157
159 u32 base; 158 u32 base;
160 u32 nr_pins; 159 u32 nr_pins;
161 u32 nr_gint;
162 u32 nr_wint; 160 u32 nr_wint;
163 161
164 u32 geint_con; 162 u32 geint_con;
@@ -205,7 +203,6 @@ struct samsung_pinctrl_drv_data {
205 const struct samsung_pmx_func *pmx_functions; 203 const struct samsung_pmx_func *pmx_functions;
206 unsigned int nr_functions; 204 unsigned int nr_functions;
207 205
208 struct irq_domain *gpio_irqd;
209 struct irq_domain *wkup_irqd; 206 struct irq_domain *wkup_irqd;
210 207
211 struct gpio_chip *gc; 208 struct gpio_chip *gc;