Commit c7fea5e0 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

regmap: ipipe: enable interrupt pipelining

parent f7e48727
......@@ -215,6 +215,7 @@ static void regmap_irq_enable(struct irq_data *data)
struct regmap *map = d->map;
const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->hwirq);
unsigned int mask, type;
unsigned long flags;
type = irq_data->type.type_falling_val | irq_data->type.type_rising_val;
......@@ -237,7 +238,9 @@ static void regmap_irq_enable(struct irq_data *data)
if (d->chip->clear_on_unmask)
d->clear_status = true;
flags = hard_cond_local_irq_save();
d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~mask;
hard_cond_local_irq_restore(flags);
}
static void regmap_irq_disable(struct irq_data *data)
......@@ -245,8 +248,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)
......@@ -324,6 +330,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 inline int read_sub_irq_data(struct regmap_irq_chip_data *data,
......
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