aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/vr41xx_giu.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2011-01-12 20:00:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:14 -0500
commit67d15ed7dfba8df6c723623a50a96ed1a08ba834 (patch)
treefd856e0b880c4dc680b27808a9bec610e008e773 /drivers/gpio/vr41xx_giu.c
parenta1f5f22adc3206c47e70652c12671666c65b579f (diff)
gpio: vr41xx_giu: irq_data conversion
Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Cc: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio/vr41xx_giu.c')
-rw-r--r--drivers/gpio/vr41xx_giu.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/gpio/vr41xx_giu.c b/drivers/gpio/vr41xx_giu.c
index b16c9a8c03f..cffa3bd7ad3 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
114static void ack_giuint_low(unsigned int irq) 114static 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
119static void mask_giuint_low(unsigned int irq) 119static 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
124static void mask_ack_giuint_low(unsigned int irq) 124static 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
133static void unmask_giuint_low(unsigned int irq) 133static 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
138static struct irq_chip giuint_low_irq_chip = { 138static 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
146static void ack_giuint_high(unsigned int irq) 146static 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
152static void mask_giuint_high(unsigned int irq) 152static 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
157static void mask_ack_giuint_high(unsigned int irq) 157static 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
166static void unmask_giuint_high(unsigned int irq) 166static 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
171static struct irq_chip giuint_high_irq_chip = { 171static 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
179static int giu_get_irq(unsigned int irq) 179static int giu_get_irq(unsigned int irq)