提交 7ac140ec 编写于 作者: S Stephen Warren 提交者: Mark Brown

regmap: store irq_chip inside regmap_irq_chip_data

This will allow later patches to adjust portions of the irq_chip
individually for each regmap_irq_chip that is created.
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 0eb46ad0
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
struct regmap_irq_chip_data { struct regmap_irq_chip_data {
struct mutex lock; struct mutex lock;
struct irq_chip irq_chip;
struct regmap *map; struct regmap *map;
const struct regmap_irq_chip *chip; const struct regmap_irq_chip *chip;
...@@ -129,7 +130,7 @@ static int regmap_irq_set_wake(struct irq_data *data, unsigned int on) ...@@ -129,7 +130,7 @@ static int regmap_irq_set_wake(struct irq_data *data, unsigned int on)
return 0; return 0;
} }
static struct irq_chip regmap_irq_chip = { static const struct irq_chip regmap_irq_chip = {
.name = "regmap", .name = "regmap",
.irq_bus_lock = regmap_irq_lock, .irq_bus_lock = regmap_irq_lock,
.irq_bus_sync_unlock = regmap_irq_sync_unlock, .irq_bus_sync_unlock = regmap_irq_sync_unlock,
...@@ -197,7 +198,7 @@ static int regmap_irq_map(struct irq_domain *h, unsigned int virq, ...@@ -197,7 +198,7 @@ static int regmap_irq_map(struct irq_domain *h, unsigned int virq,
struct regmap_irq_chip_data *data = h->host_data; struct regmap_irq_chip_data *data = h->host_data;
irq_set_chip_data(virq, data); irq_set_chip_data(virq, data);
irq_set_chip_and_handler(virq, &regmap_irq_chip, handle_edge_irq); irq_set_chip_and_handler(virq, &data->irq_chip, handle_edge_irq);
irq_set_nested_thread(virq, 1); irq_set_nested_thread(virq, 1);
/* ARM needs us to explicitly flag the IRQ as valid /* ARM needs us to explicitly flag the IRQ as valid
...@@ -285,6 +286,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, ...@@ -285,6 +286,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
goto err_alloc; goto err_alloc;
} }
d->irq_chip = regmap_irq_chip;
d->irq = irq; d->irq = irq;
d->map = map; d->map = map;
d->chip = chip; d->chip = chip;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册