irqchip support for Cirrus Logic Madera codecs
Richard Fitzgerald
maintainerv13 cover irqchip support for Cirrus Logic Madera codecs
This adds the support for the interrupt controller on the Cirrus Logic Madera codecs. The irqchip patch has dependencies on the MFD tree.
Lee - can you take both these through the MFD tree? The irqchip patch has dependencies on headers in MFD that aren't upstream yet so submitting it to the irqchip tree breaks that tree.
Richard Fitzgerald (2):
mfd: madera: Add irqchip data pointer into struct madera
irqchip: Add driver for Cirrus Logic Madera codecs
MAINTAINERS | 2 + drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-madera.c | 256 +++++++++++++++++++++++++++++++++++++ include/linux/irqchip/irq-madera.h | 132 +++++++++++++++++++ include/linux/mfd/madera/core.h | 2 + 6 files changed, 396 insertions(+) create mode 100644 drivers/irqchip/irq-madera.c create mode 100644 include/linux/irqchip/irq-madera.h
Signature · 1 line
2.11.0
Richard Fitzgerald
maintainerPATCH RESEND v13 1/2 mfd: madera: Add irqchip data pointer into struct madera
Put the pointer to struct regmap_irq_chip_data into the parent mfd structure so that the child irqchip driver does not need a trivial private structure to store only this pointer. As the irqchip child driver already has a pointer to the parent struct madera it can use that to store the pointer. This also means that the irqchip driver does not need a double-indirection from its local struct to get at the parent struct madera.
--- include/linux/mfd/madera/core.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/mfd/madera/core.h +2 -0
@@ -148,6 +148,7 @@ struct snd_soc_dapm_context;* @internal_dcvdd: true if DCVDD is supplied from the internal LDO1 * @pdata: our pdata * @irq_dev: the irqchip child driver device +* @irq_data: pointer to irqchip data for the child irqchip driver * @irq: host irq number from SPI or I2C configuration * @out_clamp: indicates output clamp state for each analogue output * @out_shorted: indicates short circuit state for each analogue output
@@ -175,6 +176,7 @@ struct madera {struct madera_pdata pdata;struct device *irq_dev; +struct regmap_irq_chip_data *irq_data;int irq;unsigned int num_micbias;
Signature · 1 line
2.11.0
Re: [PATCH v13 RESEND 1/2] mfd: madera: Add irqchip data pointer into struct madera
Quoted 8 lines · Richard Fitzgerald
Put the pointer to struct
regmap_irq_chip_datainto the parent mfd structure so that the child irqchip driver does not need a trivial private structure to store only this pointer. As the irqchip child driver already has a pointer to the parent struct madera it can use that to store the pointer. This also means that the irqchip driver does not need a double-indirection from its local struct to get at the parent struct madera.
Quoted 4 lines
Signed-off-by Richard Fitzgerald <[email protected]>--- include/linux/mfd/madera/core.h | 2 ++ 1 file changed, 2 insertions(+)
For my own reference:
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Richard Fitzgerald
maintainerPATCH RESEND v13 2/2 irqchip: Add driver for Cirrus Logic Madera codecs
In reply to Richard FitzgeraldThe Cirrus Logic Madera codecs (Cirrus Logic CS47L35/85/90/91 and WM1840) are highly complex devices containing up to 7 programmable DSPs and many other internal sources of interrupts plus a number of GPIOs that can be used as interrupt inputs. The large number (>150) of internal interrupt sources are managed by an on-board interrupt controller.
This driver provides the handling for the interrupt controller. As the codec is accessed via regmap, we can make use of the generic IRQ functionality from regmap to do most of the work. Only around half of the possible interrupt source are currently of interest from the driver so only this subset is defined. Others can be added in future if needed.
The KConfig options are not user-configurable because this driver is mandatory so is automatically included when the parent MFD driver is selected.
---
Can this patch go through the MFD tree? It has dependencies on headers from MFD that aren't upstream yet.
--- MAINTAINERS | 2 + drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-madera.c | 256 +++++++++++++++++++++++++++++++++++++ include/linux/irqchip/irq-madera.h | 132 +++++++++++++++++++ 5 files changed, 394 insertions(+) create mode 100644 drivers/irqchip/irq-madera.c create mode 100644 include/linux/irqchip/irq-madera.h
MAINTAINERS +2 -0
@@ -3594,8 +3594,10 @@ W: https://github.com/CirrusLogic/linux-drivers/wiki S: Supported F: Documentation/devicetree/bindings/mfd/madera.txt F: Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt +F: include/linux/irqchip/irq-madera* F: include/linux/mfd/madera/* F: drivers/gpio/gpio-madera* +F: drivers/irqchip/irq-madera* F: drivers/mfd/madera* F: drivers/mfd/cs47l* F: drivers/pinctrl/cirrus/*
drivers/irqchip/Kconfig +3 -0
@@ -150,6 +150,9 @@ config IMGPDC_IRQ select GENERIC_IRQ_CHIP select IRQ_DOMAIN +config MADERA_IRQ + tristate + config IRQ_MIPS_CPU bool select GENERIC_IRQ_CHIP
drivers/irqchip/Makefile +1 -0
@@ -89,3 +89,4 @@ obj-$(CONFIG_GOLDFISH_PIC) += irq-goldfish-pic.o obj-$(CONFIG_NDS32) += irq-ativic32.o obj-$(CONFIG_QCOM_PDC) += qcom-pdc.o obj-$(CONFIG_SIFIVE_PLIC) += irq-sifive-plic.o +obj-$(CONFIG_MADERA_IRQ) += irq-madera.o
drivers/irqchip/irq-madera.c new file +256 -0
256 lines not on this page · raw message
include/linux/irqchip/irq-madera.h new file +132 -0
132 lines not on this page · raw message
Signature · 1 line
2.11.0