aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-01 15:12:44 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:42:00 -0400
commitf624effb7354814d062f149c8a1e2c46a44acb1f (patch)
tree58493cabd507622cf92f1e0683fc48a120043f0e /drivers/mfd
parent0070bddfe7275e5bc763884a8ac59651f4e79eab (diff)
mfd: Convert WM831x interrupt masking to enable/disable operations
The WM831x interrupt masking support is a much better match for the genirq enable and disable operations than for the mask and unmask operations. The latter are intended to used during interrupt handling for temporary changes which isn't really practical on a slow bus. Convert the operations over to match this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/wm831x-irq.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index 2e45f60d01a7..a5cd17e18d09 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -352,6 +352,10 @@ static void wm831x_irq_sync_unlock(struct irq_data *data)
352 /* If there's been a change in the mask write it back 352 /* If there's been a change in the mask write it back
353 * to the hardware. */ 353 * to the hardware. */
354 if (wm831x->irq_masks_cur[i] != wm831x->irq_masks_cache[i]) { 354 if (wm831x->irq_masks_cur[i] != wm831x->irq_masks_cache[i]) {
355 dev_dbg(wm831x->dev, "IRQ mask sync: %x = %x\n",
356 WM831X_INTERRUPT_STATUS_1_MASK + i,
357 wm831x->irq_masks_cur[i]);
358
355 wm831x->irq_masks_cache[i] = wm831x->irq_masks_cur[i]; 359 wm831x->irq_masks_cache[i] = wm831x->irq_masks_cur[i];
356 wm831x_reg_write(wm831x, 360 wm831x_reg_write(wm831x,
357 WM831X_INTERRUPT_STATUS_1_MASK + i, 361 WM831X_INTERRUPT_STATUS_1_MASK + i,
@@ -362,7 +366,7 @@ static void wm831x_irq_sync_unlock(struct irq_data *data)
362 mutex_unlock(&wm831x->irq_lock); 366 mutex_unlock(&wm831x->irq_lock);
363} 367}
364 368
365static void wm831x_irq_unmask(struct irq_data *data) 369static void wm831x_irq_enable(struct irq_data *data)
366{ 370{
367 struct wm831x *wm831x = irq_data_get_irq_chip_data(data); 371 struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
368 struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, 372 struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x,
@@ -371,7 +375,7 @@ static void wm831x_irq_unmask(struct irq_data *data)
371 wm831x->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask; 375 wm831x->irq_masks_cur[irq_data->reg - 1] &= ~irq_data->mask;
372} 376}
373 377
374static void wm831x_irq_mask(struct irq_data *data) 378static void wm831x_irq_disable(struct irq_data *data)
375{ 379{
376 struct wm831x *wm831x = irq_data_get_irq_chip_data(data); 380 struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
377 struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, 381 struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x,
@@ -417,8 +421,8 @@ static struct irq_chip wm831x_irq_chip = {
417 .name = "wm831x", 421 .name = "wm831x",
418 .irq_bus_lock = wm831x_irq_lock, 422 .irq_bus_lock = wm831x_irq_lock,
419 .irq_bus_sync_unlock = wm831x_irq_sync_unlock, 423 .irq_bus_sync_unlock = wm831x_irq_sync_unlock,
420 .irq_mask = wm831x_irq_mask, 424 .irq_disable = wm831x_irq_disable,
421 .irq_unmask = wm831x_irq_unmask, 425 .irq_enable = wm831x_irq_enable,
422 .irq_set_type = wm831x_irq_set_type, 426 .irq_set_type = wm831x_irq_set_type,
423}; 427};
424 428