Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754097AbdDJRxb (ORCPT ); Mon, 10 Apr 2017 13:53:31 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34314 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753572AbdDJRx2 (ORCPT ); Mon, 10 Apr 2017 13:53:28 -0400 Date: Mon, 10 Apr 2017 12:53:26 -0500 From: Rob Herring To: Richard Fitzgerald Cc: linus.walleij@linaro.org, gnurou@gmail.com, tglx@linutronix.de, jason@lakedaemon.net, lee.jones@linaro.org, broonie@kernel.org, alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/16] irqchip: Add driver for Cirrus Logic Madera codecs Message-ID: <20170410175326.tyz5djxrk3o3xjtr@rob-hp-laptop> References: <1491386884-30689-1-git-send-email-rf@opensource.wolfsonmicro.com> <1491386884-30689-9-git-send-email-rf@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491386884-30689-9-git-send-email-rf@opensource.wolfsonmicro.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3246 Lines: 73 On Wed, Apr 05, 2017 at 11:07:56AM +0100, Richard Fitzgerald wrote: > The 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. > > Signed-off-by: Richard Fitzgerald > Signed-off-by: Charles Keepax > --- > .../interrupt-controller/cirrus,madera.txt | 31 ++ > MAINTAINERS | 3 + > drivers/irqchip/Kconfig | 5 + > drivers/irqchip/Makefile | 1 + > drivers/irqchip/irq-madera.c | 349 +++++++++++++++++++++ > include/linux/irqchip/irq-madera-pdata.h | 19 ++ > include/linux/irqchip/irq-madera.h | 96 ++++++ > 7 files changed, 504 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/cirrus,madera.txt > create mode 100644 drivers/irqchip/irq-madera.c > create mode 100644 include/linux/irqchip/irq-madera-pdata.h > create mode 100644 include/linux/irqchip/irq-madera.h > > diff --git a/Documentation/devicetree/bindings/interrupt-controller/cirrus,madera.txt b/Documentation/devicetree/bindings/interrupt-controller/cirrus,madera.txt > new file mode 100644 > index 0000000..4505315 > --- /dev/null > +++ b/Documentation/devicetree/bindings/interrupt-controller/cirrus,madera.txt > @@ -0,0 +1,31 @@ > +Cirrus Logic Madera class audio codec IRQ driver > + > +The IRQ properties are members of the parent MFD node. Just document them in the MFD binding. > + > +See also the core bindings for the parent MFD driver: > +See Documentation/devicetree/bindings/mfd/madera.txt > + > +Required properties: > + - interrupt-controller : Madera class devices contain interrupt controllers > + and may provide interrupt services to other devices. > + > + - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. > + The first cell is the IRQ number. > + The second cell is the flags, encoded as the trigger masks from > + bindings/interrupt-controller/interrupts.txt > + > + - interrupts : The interrupt line the /IRQ signal for the device is > + connected to. > + > + - interrupt-parent : The parent interrupt controller. > + > +Example: > + > +codec: cs47l85@0 { > + compatible = "cirrus,cs47l85"; > + > + interrupt-controller; > + #interrupt-cells = <2>; > + interrupts = <&host_irq1>; > + interrupt-parent = <&gic>; > +};