diff options
Diffstat (limited to 'drivers/gpio/vr41xx_giu.c')
-rw-r--r-- | drivers/gpio/vr41xx_giu.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/gpio/vr41xx_giu.c b/drivers/gpio/vr41xx_giu.c index b16c9a8c03f5..a365be040b36 100644 --- a/drivers/gpio/vr41xx_giu.c +++ b/drivers/gpio/vr41xx_giu.c | |||
@@ -111,69 +111,69 @@ static inline u16 giu_clear(u16 offset, u16 clear) | |||
111 | return data; | 111 | return data; |
112 | } | 112 | } |
113 | 113 | ||
114 | static void ack_giuint_low(unsigned int irq) | 114 | static void ack_giuint_low(struct irq_data *d) |
115 | { | 115 | { |
116 | giu_write(GIUINTSTATL, 1 << GPIO_PIN_OF_IRQ(irq)); | 116 | giu_write(GIUINTSTATL, 1 << GPIO_PIN_OF_IRQ(d->irq)); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void mask_giuint_low(unsigned int irq) | 119 | static void mask_giuint_low(struct irq_data *d) |
120 | { | 120 | { |
121 | giu_clear(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq)); | 121 | giu_clear(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(d->irq)); |
122 | } | 122 | } |
123 | 123 | ||
124 | static void mask_ack_giuint_low(unsigned int irq) | 124 | static void mask_ack_giuint_low(struct irq_data *d) |
125 | { | 125 | { |
126 | unsigned int pin; | 126 | unsigned int pin; |
127 | 127 | ||
128 | pin = GPIO_PIN_OF_IRQ(irq); | 128 | pin = GPIO_PIN_OF_IRQ(d->irq); |
129 | giu_clear(GIUINTENL, 1 << pin); | 129 | giu_clear(GIUINTENL, 1 << pin); |
130 | giu_write(GIUINTSTATL, 1 << pin); | 130 | giu_write(GIUINTSTATL, 1 << pin); |
131 | } | 131 | } |
132 | 132 | ||
133 | static void unmask_giuint_low(unsigned int irq) | 133 | static void unmask_giuint_low(struct irq_data *d) |
134 | { | 134 | { |
135 | giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq)); | 135 | giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(d->irq)); |
136 | } | 136 | } |
137 | 137 | ||
138 | static struct irq_chip giuint_low_irq_chip = { | 138 | static struct irq_chip giuint_low_irq_chip = { |
139 | .name = "GIUINTL", | 139 | .name = "GIUINTL", |
140 | .ack = ack_giuint_low, | 140 | .irq_ack = ack_giuint_low, |
141 | .mask = mask_giuint_low, | 141 | .irq_mask = mask_giuint_low, |
142 | .mask_ack = mask_ack_giuint_low, | 142 | .irq_mask_ack = mask_ack_giuint_low, |
143 | .unmask = unmask_giuint_low, | 143 | .irq_unmask = unmask_giuint_low, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static void ack_giuint_high(unsigned int irq) | 146 | static void ack_giuint_high(struct irq_data *d) |
147 | { | 147 | { |
148 | giu_write(GIUINTSTATH, | 148 | giu_write(GIUINTSTATH, |
149 | 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET)); | 149 | 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET)); |
150 | } | 150 | } |
151 | 151 | ||
152 | static void mask_giuint_high(unsigned int irq) | 152 | static void mask_giuint_high(struct irq_data *d) |
153 | { | 153 | { |
154 | giu_clear(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET)); | 154 | giu_clear(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET)); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void mask_ack_giuint_high(unsigned int irq) | 157 | static void mask_ack_giuint_high(struct irq_data *d) |
158 | { | 158 | { |
159 | unsigned int pin; | 159 | unsigned int pin; |
160 | 160 | ||
161 | pin = GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET; | 161 | pin = GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET; |
162 | giu_clear(GIUINTENH, 1 << pin); | 162 | giu_clear(GIUINTENH, 1 << pin); |
163 | giu_write(GIUINTSTATH, 1 << pin); | 163 | giu_write(GIUINTSTATH, 1 << pin); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void unmask_giuint_high(unsigned int irq) | 166 | static void unmask_giuint_high(struct irq_data *d) |
167 | { | 167 | { |
168 | giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET)); | 168 | giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET)); |
169 | } | 169 | } |
170 | 170 | ||
171 | static struct irq_chip giuint_high_irq_chip = { | 171 | static struct irq_chip giuint_high_irq_chip = { |
172 | .name = "GIUINTH", | 172 | .name = "GIUINTH", |
173 | .ack = ack_giuint_high, | 173 | .irq_ack = ack_giuint_high, |
174 | .mask = mask_giuint_high, | 174 | .irq_mask = mask_giuint_high, |
175 | .mask_ack = mask_ack_giuint_high, | 175 | .irq_mask_ack = mask_ack_giuint_high, |
176 | .unmask = unmask_giuint_high, | 176 | .irq_unmask = unmask_giuint_high, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static int giu_get_irq(unsigned int irq) | 179 | static int giu_get_irq(unsigned int irq) |
@@ -238,13 +238,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, | |||
238 | break; | 238 | break; |
239 | } | 239 | } |
240 | } | 240 | } |
241 | set_irq_chip_and_handler(GIU_IRQ(pin), | 241 | irq_set_chip_and_handler(GIU_IRQ(pin), |
242 | &giuint_low_irq_chip, | 242 | &giuint_low_irq_chip, |
243 | handle_edge_irq); | 243 | handle_edge_irq); |
244 | } else { | 244 | } else { |
245 | giu_clear(GIUINTTYPL, mask); | 245 | giu_clear(GIUINTTYPL, mask); |
246 | giu_clear(GIUINTHTSELL, mask); | 246 | giu_clear(GIUINTHTSELL, mask); |
247 | set_irq_chip_and_handler(GIU_IRQ(pin), | 247 | irq_set_chip_and_handler(GIU_IRQ(pin), |
248 | &giuint_low_irq_chip, | 248 | &giuint_low_irq_chip, |
249 | handle_level_irq); | 249 | handle_level_irq); |
250 | } | 250 | } |
@@ -273,13 +273,13 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, | |||
273 | break; | 273 | break; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | set_irq_chip_and_handler(GIU_IRQ(pin), | 276 | irq_set_chip_and_handler(GIU_IRQ(pin), |
277 | &giuint_high_irq_chip, | 277 | &giuint_high_irq_chip, |
278 | handle_edge_irq); | 278 | handle_edge_irq); |
279 | } else { | 279 | } else { |
280 | giu_clear(GIUINTTYPH, mask); | 280 | giu_clear(GIUINTTYPH, mask); |
281 | giu_clear(GIUINTHTSELH, mask); | 281 | giu_clear(GIUINTHTSELH, mask); |
282 | set_irq_chip_and_handler(GIU_IRQ(pin), | 282 | irq_set_chip_and_handler(GIU_IRQ(pin), |
283 | &giuint_high_irq_chip, | 283 | &giuint_high_irq_chip, |
284 | handle_level_irq); | 284 | handle_level_irq); |
285 | } | 285 | } |
@@ -539,9 +539,9 @@ static int __devinit giu_probe(struct platform_device *pdev) | |||
539 | chip = &giuint_high_irq_chip; | 539 | chip = &giuint_high_irq_chip; |
540 | 540 | ||
541 | if (trigger & (1 << pin)) | 541 | if (trigger & (1 << pin)) |
542 | set_irq_chip_and_handler(i, chip, handle_edge_irq); | 542 | irq_set_chip_and_handler(i, chip, handle_edge_irq); |
543 | else | 543 | else |
544 | set_irq_chip_and_handler(i, chip, handle_level_irq); | 544 | irq_set_chip_and_handler(i, chip, handle_level_irq); |
545 | 545 | ||
546 | } | 546 | } |
547 | 547 | ||