Commit 45f27a27 authored by Philippe Gerum's avatar Philippe Gerum

regmap: ipipe: enable interrupt pipelining

parent 0d4ec692
......@@ -194,8 +194,11 @@ static void regmap_irq_enable(struct irq_data *data)
struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
struct regmap *map = d->map;
const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->hwirq);
unsigned long flags;
flags = hard_cond_local_irq_save();
d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~irq_data->mask;
hard_cond_local_irq_restore(flags);
}
static void regmap_irq_disable(struct irq_data *data)
......@@ -203,8 +206,11 @@ static void regmap_irq_disable(struct irq_data *data)
struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
struct regmap *map = d->map;
const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->hwirq);
unsigned long flags;
flags = hard_cond_local_irq_save();
d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask;
hard_cond_local_irq_restore(flags);
}
static int regmap_irq_set_type(struct irq_data *data, unsigned int type)
......@@ -267,6 +273,7 @@ static const struct irq_chip regmap_irq_chip = {
.irq_enable = regmap_irq_enable,
.irq_set_type = regmap_irq_set_type,
.irq_set_wake = regmap_irq_set_wake,
.flags = IRQCHIP_PIPELINE_SAFE,
};
static irqreturn_t regmap_irq_thread(int irq, void *d)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment