Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 209a6006 authored by Mark Brown's avatar Mark Brown
Browse files

regmap: Add irq_base accessor to regmap_irq



Allows devices to discover their own interrupt without having to remember
it themselves.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent d23511f9
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -287,3 +287,16 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
	kfree(d);
	kfree(d);
}
}
EXPORT_SYMBOL_GPL(regmap_del_irq_chip);
EXPORT_SYMBOL_GPL(regmap_del_irq_chip);

/**
 * regmap_irq_chip_get_base(): Retrieve interrupt base for a regmap IRQ chip
 *
 * Useful for drivers to request their own IRQs.
 *
 * @data: regmap_irq controller to operate on.
 */
int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data)
{
	return data->irq_base;
}
EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base);
+1 −0
Original line number Original line Diff line number Diff line
@@ -190,5 +190,6 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
			int irq_base, struct regmap_irq_chip *chip,
			int irq_base, struct regmap_irq_chip *chip,
			struct regmap_irq_chip_data **data);
			struct regmap_irq_chip_data **data);
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);


#endif
#endif