aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/board-trout-gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/board-trout-gpio.c')
-rw-r--r--arch/arm/mach-msm/board-trout-gpio.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c
index f8c09ef6666f..a604ec1e44bf 100644
--- a/arch/arm/mach-msm/board-trout-gpio.c
+++ b/arch/arm/mach-msm/board-trout-gpio.c
@@ -113,52 +113,52 @@ static struct msm_gpio_chip msm_gpio_banks[] = {
113 TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0), 113 TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0),
114}; 114};
115 115
116static void trout_gpio_irq_ack(unsigned int irq) 116static void trout_gpio_irq_ack(struct irq_data *d)
117{ 117{
118 int bank = TROUT_INT_TO_BANK(irq); 118 int bank = TROUT_INT_TO_BANK(d->irq);
119 uint8_t mask = TROUT_INT_TO_MASK(irq); 119 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
120 int reg = TROUT_BANK_TO_STAT_REG(bank); 120 int reg = TROUT_BANK_TO_STAT_REG(bank);
121 /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", irq);*/ 121 /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", d->irq);*/
122 writeb(mask, TROUT_CPLD_BASE + reg); 122 writeb(mask, TROUT_CPLD_BASE + reg);
123} 123}
124 124
125static void trout_gpio_irq_mask(unsigned int irq) 125static void trout_gpio_irq_mask(struct irq_data *d)
126{ 126{
127 unsigned long flags; 127 unsigned long flags;
128 uint8_t reg_val; 128 uint8_t reg_val;
129 int bank = TROUT_INT_TO_BANK(irq); 129 int bank = TROUT_INT_TO_BANK(d->irq);
130 uint8_t mask = TROUT_INT_TO_MASK(irq); 130 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
131 int reg = TROUT_BANK_TO_MASK_REG(bank); 131 int reg = TROUT_BANK_TO_MASK_REG(bank);
132 132
133 local_irq_save(flags); 133 local_irq_save(flags);
134 reg_val = trout_int_mask[bank] |= mask; 134 reg_val = trout_int_mask[bank] |= mask;
135 /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n", 135 /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n",
136 irq, bank, reg_val);*/ 136 d->irq, bank, reg_val);*/
137 writeb(reg_val, TROUT_CPLD_BASE + reg); 137 writeb(reg_val, TROUT_CPLD_BASE + reg);
138 local_irq_restore(flags); 138 local_irq_restore(flags);
139} 139}
140 140
141static void trout_gpio_irq_unmask(unsigned int irq) 141static void trout_gpio_irq_unmask(struct irq_data *d)
142{ 142{
143 unsigned long flags; 143 unsigned long flags;
144 uint8_t reg_val; 144 uint8_t reg_val;
145 int bank = TROUT_INT_TO_BANK(irq); 145 int bank = TROUT_INT_TO_BANK(d->irq);
146 uint8_t mask = TROUT_INT_TO_MASK(irq); 146 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
147 int reg = TROUT_BANK_TO_MASK_REG(bank); 147 int reg = TROUT_BANK_TO_MASK_REG(bank);
148 148
149 local_irq_save(flags); 149 local_irq_save(flags);
150 reg_val = trout_int_mask[bank] &= ~mask; 150 reg_val = trout_int_mask[bank] &= ~mask;
151 /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n", 151 /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n",
152 irq, bank, reg_val);*/ 152 d->irq, bank, reg_val);*/
153 writeb(reg_val, TROUT_CPLD_BASE + reg); 153 writeb(reg_val, TROUT_CPLD_BASE + reg);
154 local_irq_restore(flags); 154 local_irq_restore(flags);
155} 155}
156 156
157int trout_gpio_irq_set_wake(unsigned int irq, unsigned int on) 157int trout_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
158{ 158{
159 unsigned long flags; 159 unsigned long flags;
160 int bank = TROUT_INT_TO_BANK(irq); 160 int bank = TROUT_INT_TO_BANK(d->irq);
161 uint8_t mask = TROUT_INT_TO_MASK(irq); 161 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
162 162
163 local_irq_save(flags); 163 local_irq_save(flags);
164 if(on) 164 if(on)
@@ -198,15 +198,15 @@ static void trout_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
198 } 198 }
199 int_base += TROUT_INT_BANK0_COUNT; 199 int_base += TROUT_INT_BANK0_COUNT;
200 } 200 }
201 desc->chip->ack(irq); 201 desc->irq_data.chip->irq_ack(&desc->irq_data);
202} 202}
203 203
204static struct irq_chip trout_gpio_irq_chip = { 204static struct irq_chip trout_gpio_irq_chip = {
205 .name = "troutgpio", 205 .name = "troutgpio",
206 .ack = trout_gpio_irq_ack, 206 .irq_ack = trout_gpio_irq_ack,
207 .mask = trout_gpio_irq_mask, 207 .irq_mask = trout_gpio_irq_mask,
208 .unmask = trout_gpio_irq_unmask, 208 .irq_unmask = trout_gpio_irq_unmask,
209 .set_wake = trout_gpio_irq_set_wake, 209 .irq_set_wake = trout_gpio_irq_set_wake,
210}; 210};
211 211
212/* 212/*