Skip to contentSkip to conversation

Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs

PATCH Superseded Richard Fitzgerald 3 participants 29 messages Nov 23, 2017 – Dec 12, 2017

Subsystems (11)
Device tree bindings Sound ASoC GPIO +7 more subsystems

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v6 cover Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs

The Cirrus Logic CS47L35, CS47L85, CS47L90/91 codecs are complex audio SoC devices. In addition to the core audio capability they have onboard GPIO, regulators, DSPs and interrupt controller and a large register map space accessed over SPI or I2C. This family of codecs is based around common IP blocks and they are managed by a set of common drivers referred to as "Madera".

Patches still waiting for review/ack:
#8 regulator
#9 irqchip
#14-17 ASoC

Richard Fitzgerald (17):
mfd: madera: Add register definitions for Cirrus Logic Madera codecs
mfd: madera: Add DT bindings for Cirrus Logic Madera codecs
mfd: madera: Add common support for Cirrus Logic Madera codecs
mfd: madera: Register map tables for Cirrus Logic CS47L35
mfd: madera: Register map tables for Cirrus Logic CS47L85
mfd: madera: Register map tables for Cirrus Logic CS47L90/91
regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs
regulator: arizona-ldo1: Add support for Cirrus Logic Madera codecs
irqchip: Add driver for Cirrus Logic Madera codecs
pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs
pinctrl: madera: Add driver for Cirrus Logic Madera codecs
gpio: madera: Support Cirrus Logic Madera class codecs
ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs
ASoC: madera: Add common support for Cirrus Logic Madera codecs
ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35
ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85
ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90

 Documentation/devicetree/bindings/mfd/madera.txt   |  102 +
 .../bindings/pinctrl/cirrus,madera-pinctrl.txt     |   99 +
 .../bindings/regulator/arizona-regulator.txt       |    3 +-
 Documentation/devicetree/bindings/sound/madera.txt |   67 +
 MAINTAINERS                                        |   23 +
 drivers/gpio/Kconfig                               |    6 +
 drivers/gpio/Makefile                              |    1 +
 drivers/gpio/gpio-madera.c                         |  196 +
 drivers/irqchip/Kconfig                            |    3 +
 drivers/irqchip/Makefile                           |    1 +
 drivers/irqchip/irq-madera.c                       |  301 ++
 drivers/mfd/Kconfig                                |   48 +
 drivers/mfd/Makefile                               |   13 +
 drivers/mfd/cs47l35-tables.c                       | 1610 +++++++
 drivers/mfd/cs47l85-tables.c                       | 3010 +++++++++++++
 drivers/mfd/cs47l90-tables.c                       | 2675 ++++++++++++
 drivers/mfd/madera-core.c                          |  599 +++
 drivers/mfd/madera-i2c.c                           |  140 +
 drivers/mfd/madera-spi.c                           |  139 +
 drivers/mfd/madera.h                               |   44 +
 drivers/pinctrl/Kconfig                            |    1 +
 drivers/pinctrl/Makefile                           |    1 +
 drivers/pinctrl/cirrus/Kconfig                     |   15 +
 drivers/pinctrl/cirrus/Makefile                    |   11 +
 drivers/pinctrl/cirrus/pinctrl-cs47l35.c           |   46 +
 drivers/pinctrl/cirrus/pinctrl-cs47l85.c           |   60 +
 drivers/pinctrl/cirrus/pinctrl-cs47l90.c           |   58 +
 drivers/pinctrl/cirrus/pinctrl-madera.c            | 1074 +++++
 drivers/pinctrl/cirrus/pinctrl-madera.h            |   40 +
 drivers/regulator/Kconfig                          |   15 +-
 drivers/regulator/arizona-ldo1.c                   |   82 +-
 drivers/regulator/arizona-micsupp.c                |   71 +-
 include/dt-bindings/sound/madera.h                 |   27 +
 include/linux/irqchip/irq-madera-pdata.h           |   23 +
 include/linux/irqchip/irq-madera.h                 |   98 +
 include/linux/mfd/madera/core.h                    |  196 +
 include/linux/mfd/madera/pdata.h                   |   61 +
 include/linux/mfd/madera/registers.h               | 3987 ++++++++++++++++++
 include/sound/madera-pdata.h                       |   61 +
 sound/soc/codecs/Kconfig                           |   23 +
 sound/soc/codecs/Makefile                          |    8 +
 sound/soc/codecs/cs47l35.c                         | 1748 ++++++++
 sound/soc/codecs/cs47l85.c                         | 2722 ++++++++++++
 sound/soc/codecs/cs47l90.c                         | 2661 ++++++++++++
 sound/soc/codecs/madera.c                          | 4439 ++++++++++++++++++++
 sound/soc/codecs/madera.h                          |  470 +++
 46 files changed, 27068 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/madera.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
 create mode 100644 Documentation/devicetree/bindings/sound/madera.txt
 create mode 100644 drivers/gpio/gpio-madera.c
 create mode 100644 drivers/irqchip/irq-madera.c
 create mode 100644 drivers/mfd/cs47l35-tables.c
 create mode 100644 drivers/mfd/cs47l85-tables.c
 create mode 100644 drivers/mfd/cs47l90-tables.c
 create mode 100644 drivers/mfd/madera-core.c
 create mode 100644 drivers/mfd/madera-i2c.c
 create mode 100644 drivers/mfd/madera-spi.c
 create mode 100644 drivers/mfd/madera.h
 create mode 100644 drivers/pinctrl/cirrus/Kconfig
 create mode 100644 drivers/pinctrl/cirrus/Makefile
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l35.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l85.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l90.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-madera.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-madera.h
 create mode 100644 include/dt-bindings/sound/madera.h
 create mode 100644 include/linux/irqchip/irq-madera-pdata.h
 create mode 100644 include/linux/irqchip/irq-madera.h
 create mode 100644 include/linux/mfd/madera/core.h
 create mode 100644 include/linux/mfd/madera/pdata.h
 create mode 100644 include/linux/mfd/madera/registers.h
 create mode 100644 include/sound/madera-pdata.h
 create mode 100644 sound/soc/codecs/cs47l35.c
 create mode 100644 sound/soc/codecs/cs47l85.c
 create mode 100644 sound/soc/codecs/cs47l90.c
 create mode 100644 sound/soc/codecs/madera.c
 create mode 100644 sound/soc/codecs/madera.h
Signature · 1 line
2.11.0
#1 lore raw

PATCH v6 1/17 mfd: madera: Add register definitions for Cirrus Logic Madera codecs

This patch adds a header file of register definitions for Cirrus Logic "Madera" class codecs. These codecs are all based off a common set of hardware IP so have a common register map (with a few minor device-to-device variations).

The registers.h file is tool-generated directly from the hardware design but has been manually stripped down to reduce size (full register map is >44000 lines). All names are kept the same as datasheet names so that they can be cross-referenced between source and datasheet without confusion.

The register map layout is kept fully-defined rather than factored into macros and/or block-indexing code. The major reasons for this are:

- #1 is that it makes the source highly greppable, which is important. "What does the driver do with register bits XYZ" or "Where does it use register bits XYZ" are commonly types of questions. These can be quickly answered by a grep. Squashing definitions into generator macros or block- indexing code is a way of defeating grep.

- most of the register definitions are used in tables, so a constant value is required. Using generator macros make the table definition clunky and obscure.

- the code is clearer when it's there in the source exactly what register and field it is using

- it is easier to diff the register map of a new (unsupported) codec against what is already supported and merge in differences

- it makes the register map available in source for maintenance/debugging instead of having to refer back to the datasheet for a register map

---
 MAINTAINERS                          |   10 +
 include/linux/mfd/madera/registers.h | 3987 ++++++++++++++++++++++++++++++++++
 2 files changed, 3997 insertions(+)
 create mode 100644 include/linux/mfd/madera/registers.h
MAINTAINERS +10 -0
index aa71ab52fd76..6346cc326cec 100644
@@ -3478,6 +3478,16 @@ M:	Dave Goodell <[email protected]>
 S:	Supported
 F:	drivers/infiniband/hw/usnic/
 
+CIRRUS LOGIC MADERA CODEC DRIVERS
+M:	Charles Keepax <[email protected]>
+M:	Richard Fitzgerald <[email protected]>
+L:	[email protected] (moderated for non-subscribers)
+L:	[email protected]
+T:	git https://github.com/CirrusLogic/linux-drivers.git
+W:	https://github.com/CirrusLogic/linux-drivers/wiki
+S:	Supported
+F:	include/linux/mfd/madera/*
+
 CLEANCACHE API
 M:	Konrad Rzeszutek Wilk <[email protected]>
 L:	[email protected]
include/linux/mfd/madera/registers.h new file +3987 -0

2,984 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v6 2/17 mfd: madera: Add DT bindings for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

Specification of the bindings for the parent MFD driver component of the Cirrus Logic Madera codec drivers.

Note that although the interrupt controller and GPIO are child drivers their required bindings are trivial, mandatory, and exist within the parent MFD node so are documented here.

---
 Documentation/devicetree/bindings/mfd/madera.txt | 102 +++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/madera.txt
Documentation/devicetree/bindings/mfd/madera.txt new file +102 -0
new file mode 100644
index 000000000000..db3266088386
@@ -0,0 +1,102 @@
+Cirrus Logic Madera class audio codecs Multi-Functional Device
+
+These devices are audio SoCs with extensive digital capabilities and a range
+of analogue I/O.
+
+See also the child driver bindings in:
+bindings/pinctrl/cirrus,madera-pinctrl.txt
+bindings/regulator/arizona-regulator.txt
+bindings/sound/madera.txt
+
+Required properties:
+
+  - compatible : One of the following chip-specific strings:
+        "cirrus,cs47l35"
+        "cirrus,cs47l85"
+        "cirrus,cs47l90"
+        "cirrus,cs47l91"
+        "cirrus,wm1840"
+
+  - reg : I2C slave address when connected using I2C, chip select number when
+    using SPI.
+
+  - DCVDD-supply : Power supply for the device as defined in
+    bindings/regulator/regulator.txt
+    Mandatory on CS47L35, CS47L90, CS47L91
+    Optional on CS47L85, WM1840
+
+  - AVDD-supply, DBVDD1-supply, DBVDD2-supply, CPVDD1-supply, CPVDD2-supply :
+    Power supplies for the device
+
+  - DBVDD3-supply, DBVDD4-supply : Power supplies for the device
+    (CS47L85, CS47L90, CS47L91, WM1840)
+
+  - SPKVDDL-supply, SPKVDDR-supply : Power supplies for the device
+    (CS47L85, WM1840)
+
+  - SPKVDD-supply : Power supply for the device
+    (CS47L35)
+
+  - interrupt-controller : Indicates that this device is an interrupt controller
+
+  - #interrupt-cells: the number of cells to describe an IRQ, must 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
+
+  - gpio-controller : Indicates this device is a GPIO controller.
+
+  - #gpio-cells : Must be 2. The first cell is the pin number. The second cell
+    is reserved for future use and must be zero
+
+  - interrupt-parent : The parent interrupt controller.
+
+  - interrupts : The interrupt line the /IRQ signal for the device is
+    connected to.
+
+Optional properties:
+
+  - MICVDD-supply : Power supply, only need to be specified if
+    powered externally
+
+  - reset-gpios : One entry specifying the GPIO controlling /RESET.
+    As defined in bindings/gpio.txt.
+    Although optional, it is strongly recommended to use a hardware reset
+
+  - MICBIASx : Initial data for the MICBIAS regulators, as covered in
+    Documentation/devicetree/bindings/regulator/regulator.txt.
+    One for each MICBIAS generator (MICBIAS1, MICBIAS2, ...)
+    (all codecs)
+
+    One for each output pin (MICBIAS1A, MIBCIAS1B, MICBIAS2A, ...)
+    (all except CS47L85, WM1840)
+
+    The following following additional property is supported for the generator
+    nodes:
+      - cirrus,ext-cap : Set to 1 if the MICBIAS has external decoupling
+        capacitors attached.
+
+Optional child nodes:
+    micvdd : Node containing initialization data for the micvdd regulator
+    See bindings/regulator/arizona-regulator.txt
+
+    ldo1 : Node containing initialization data for the LDO1 regulator
+    See bindings/regulator/arizona-regulator.txt
+    (cs47l85, wm1840)
+
+Example:
+
+cs47l85@0 {
+	compatible = "cirrus,cs47l85";
+	reg = <0>;
+
+	reset-gpios = <&gpio 0>;
+
+	interrupt-controller;
+	#interrupt-cells = <2>;
+	interrupts = <&host_irq1>;
+	interrupt-parent = <&gic>;
+
+	gpio-controller;
+	#gpio-cells = <2>;
+};
Signature · 1 line
2.11.0
#3 lore raw

PATCH v6 3/17 mfd: madera: Add common support for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

This adds the generic core support for Cirrus Logic "Madera" class codecs. These are complex audio codec SoCs with a variety of digital and analogue I/O, onboard audio processing and DSPs, and other features.

These codecs are all based off a common set of hardware IP so can be supported by a core of common code (with a few minor device-to-device variations).

---
 MAINTAINERS                      |   3 +
 drivers/mfd/Kconfig              |  27 ++
 drivers/mfd/Makefile             |   4 +
 drivers/mfd/madera-core.c        | 599 +++++++++++++++++++++++++++++++++++++++
 drivers/mfd/madera-i2c.c         | 140 +++++++++
 drivers/mfd/madera-spi.c         | 139 +++++++++
 drivers/mfd/madera.h             |  44 +++
 include/linux/mfd/madera/core.h  | 196 +++++++++++++
 include/linux/mfd/madera/pdata.h |  61 ++++
 9 files changed, 1213 insertions(+)
 create mode 100644 drivers/mfd/madera-core.c
 create mode 100644 drivers/mfd/madera-i2c.c
 create mode 100644 drivers/mfd/madera-spi.c
 create mode 100644 drivers/mfd/madera.h
 create mode 100644 include/linux/mfd/madera/core.h
 create mode 100644 include/linux/mfd/madera/pdata.h
MAINTAINERS +3 -0
index 6346cc326cec..510ca722cc27 100644
@@ -3486,7 +3486,10 @@ L:	[email protected]
 T:	git https://github.com/CirrusLogic/linux-drivers.git
 W:	https://github.com/CirrusLogic/linux-drivers/wiki
 S:	Supported
+F:	Documentation/devicetree/bindings/mfd/madera.txt
 F:	include/linux/mfd/madera/*
+F:	drivers/mfd/madera*
+F:	drivers/mfd/cs47l*
 
 CLEANCACHE API
 M:	Konrad Rzeszutek Wilk <[email protected]>
drivers/mfd/Kconfig +27 -0
index 1d20a800e967..7c47dd79cbaa 100644
@@ -222,6 +222,33 @@ config MFD_CROS_EC_SPI
 	  response time cannot be guaranteed, we support ignoring
 	  'pre-amble' bytes before the response actually starts.
 
+config MFD_MADERA
+	bool
+	select MFD_CORE
+	select REGMAP
+	select REGMAP_IRQ
+	select MADERA_IRQ
+
+config MFD_MADERA_I2C
+	bool "Cirrus Logic Madera codecs with I2C"
+	select MFD_MADERA
+	select REGMAP_I2C
+	depends on I2C
+	depends on PINCTRL
+	help
+	  Support for the Cirrus Logic Madera platform audio SoC
+	  core functionality controlled via I2C.
+
+config MFD_MADERA_SPI
+	bool "Cirrus Logic Madera codecs with SPI"
+	select MFD_MADERA
+	select REGMAP_SPI
+	depends on SPI_MASTER
+	depends on PINCTRL
+	help
+	  Support for the Cirrus Logic Madera platform audio SoC
+	  core functionality controlled via SPI.
+
 config MFD_ASIC3
 	bool "Compaq ASIC3"
 	depends on GPIOLIB && ARM
drivers/mfd/Makefile +4 -0
index d9474ade32e6..bcff419deab9 100644
@@ -76,6 +76,10 @@ wm8994-objs			:= wm8994-core.o wm8994-irq.o wm8994-regmap.o
 obj-$(CONFIG_MFD_WM8994)	+= wm8994.o
 obj-$(CONFIG_MFD_WM97xx)	+= wm97xx-core.o
 
+obj-$(CONFIG_MFD_MADERA)	+= madera-core.o
+obj-$(CONFIG_MFD_MADERA_I2C)	+= madera-i2c.o
+obj-$(CONFIG_MFD_MADERA_SPI)	+= madera-spi.o
+
 obj-$(CONFIG_TPS6105X)		+= tps6105x.o
 obj-$(CONFIG_TPS65010)		+= tps65010.o
 obj-$(CONFIG_TPS6507X)		+= tps6507x.o
drivers/mfd/madera-core.c new file +599 -0

599 lines not on this page · raw message

drivers/mfd/madera-i2c.c new file +140 -0

140 lines not on this page · raw message

drivers/mfd/madera-spi.c new file +139 -0

139 lines not on this page · raw message

drivers/mfd/madera.h new file +44 -0

44 lines not on this page · raw message

include/linux/mfd/madera/core.h new file +196 -0

196 lines not on this page · raw message

include/linux/mfd/madera/pdata.h new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.11.0
#4 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

They sure don't seem to be using any pinctrl-specific APIs.

Yours,
Linus Walleij

#5 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 25 lines · Linus Walleij
Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

Quoted 2 lines

They sure don't seem to be using any pinctrl-specific APIs.

They require PINCTRL even if they don't call any functions on it because the chip won't work correctly if there isn't a PINCTRL driver to apply the correct pinmux configuration.

Quoted 3 lines

Yours,
Linus Walleij

#6 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 28 lines · Richard Fitzgerald
Quoted 27 lines · Linus Walleij
Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

Quoted 6 lines
Quoted 2 lines

They sure don't seem to be using any pinctrl-specific APIs.

They require PINCTRL even if they don't call any functions on it because the chip won't work correctly if there isn't a PINCTRL driver to apply the correct pinmux configuration.

Apply the configuration to what? Sorry I don't get it.

You can't be referring to the internal pin controller of the Madera, since that has to come up before its pin controller can even be communicated with.

If you mean it is to apply the configuration to the system SoC where this coded is connected, this is wrong. There may very well be systems which have dedicated pins for the codec, atleast in theory. The fact that your reference board needs this is not a universal requirement, it should be set up in the machine-specific Kconfig for the reference board in that case.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 33 lines · Linus Walleij
Quoted 31 lines · Richard Fitzgerald
Quoted 29 lines · Linus Walleij
Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

They sure don't seem to be using any pinctrl-specific APIs.

Quoted 7 lines
Quoted 3 lines

They require PINCTRL even if they don't call any functions on it because the chip won't work correctly if there isn't a PINCTRL driver to apply the correct pinmux configuration.

Apply the configuration to what? Sorry I don't get it.

You can't be referring to the internal pin controller of the Madera, since

Yes I am

Quoted 2 lines

that has to come up before its pin controller can even be communicated with.

So?

The MFD driver powers up the chip before registering child drivers.

Also that's not entirely relevant, the pinctrl settings can still be written with the chip off because they will go into the regmap cache and be applied when the chip is next resumed.

Quoted 11 lines

If you mean it is to apply the configuration to the system SoC where this coded is connected, this is wrong. There may very well be systems which have dedicated pins for the codec, atleast in theory. The fact that your reference board needs this is not a universal requirement, it should be set up in the machine-specific Kconfig for the reference board in that case.

Yours,
Linus Walleij

#8 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 40 lines · Richard Fitzgerald
Quoted 39 lines · Linus Walleij
Quoted 35 lines · Richard Fitzgerald
Quoted 27 lines · Linus Walleij
Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

Quoted 2 lines

They sure don't seem to be using any pinctrl-specific APIs.

They require PINCTRL even if they don't call any functions on it because the
chip won't work correctly if there isn't a PINCTRL driver to apply the correct pinmux configuration.

Quoted 5 lines
Quoted 3 lines

Apply the configuration to what? Sorry I don't get it.

You can't be referring to the internal pin controller of the Madera, since

Yes I am

You are saying that the I2C and SPI interface to the Madera codec depends on pin control.

It does not.

You can most certainly talk I2C and SPI to the coded without any pin control. Probably the MFD driver can come up without it.

If what you want is unconditional pin control enabled for this circuit, then have MFD_MADERA select PINCTRL.

Quoted 7 lines
Quoted 2 lines

that has to come up before its pin controller can even be communicated with.

So?

The MFD driver powers up the chip before registering child drivers.

Including the pin controller. You just confirmed what I said: the I2C and SPI interfaces do not require pin control to talk to the chip.

Quoted 3 lines

Also that's not entirely relevant, the pinctrl settings can still be written with the chip off because they will go into the regmap cache and be applied when the chip is next resumed.

You still have the dependencies wrong.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 71 lines · Linus Walleij
Quoted 40 lines · Richard Fitzgerald
Quoted 39 lines · Linus Walleij
Quoted 35 lines · Richard Fitzgerald
Quoted 27 lines · Linus Walleij
Quoted 9 lines · Richard Fitzgerald
drivers/mfd/Kconfig +9 -0
+config MFD_MADERA_I2C
+       bool "Cirrus Logic Madera codecs with I2C"
+       select MFD_MADERA
+       select REGMAP_I2C
+       depends on I2C
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via I2C.

drivers/mfd/Kconfig config MFD_CROS_EC_SPI · line 250

Quoted 10 lines
drivers/mfd/Kconfig +10 -0
+
+config MFD_MADERA_SPI
+       bool "Cirrus Logic Madera codecs with SPI"
+       select MFD_MADERA
+       select REGMAP_SPI
+       depends on SPI_MASTER
+       depends on PINCTRL
+       help
+         Support for the Cirrus Logic Madera platform audio SoC
+         core functionality controlled via SPI.

Why do the I2C and SPI subdrivers depend on PINCTRL?

Quoted 2 lines

They sure don't seem to be using any pinctrl-specific APIs.

They require PINCTRL even if they don't call any functions on it because the
chip won't work correctly if there isn't a PINCTRL driver to apply the correct pinmux configuration.

Quoted 5 lines
Quoted 3 lines

Apply the configuration to what? Sorry I don't get it.

You can't be referring to the internal pin controller of the Madera, since

Yes I am

You are saying that the I2C and SPI interface to the Madera codec depends on pin control.

It does not.

You can most certainly talk I2C and SPI to the coded without any pin control. Probably the MFD driver can come up without it.

If what you want is unconditional pin control enabled for this circuit, then have MFD_MADERA select PINCTRL.

Quoted 7 lines
Quoted 2 lines

that has to come up before its pin controller can even be communicated with.

So?

The MFD driver powers up the chip before registering child drivers.

Including the pin controller. You just confirmed what I said: the I2C and SPI interfaces do not require pin control to talk to the chip.

Quoted 9 lines
Quoted 3 lines

Also that's not entirely relevant, the pinctrl settings can still be written with the chip off because they will go into the regmap cache and be applied when the chip is next resumed.

You still have the dependencies wrong.

Yours,
Linus Walleij

So the short version of this email thread is that it should be "select PINCTRL" ?

#10 lore raw

Re: [PATCH v6 03/17] mfd: madera: Add common support for Cirrus Logic Madera codecs

Quoted 7 lines · Richard Fitzgerald
Quoted 2 lines · Linus Walleij

If what you want is unconditional pin control enabled for this circuit, then have MFD_MADERA select PINCTRL.

So the short version of this email thread is that it should be "select PINCTRL" ?

If by "it" you mean MFD_MADERA tne I guess yes :D

I was just confused because I couldn't figure out what you were trying to do.

Yours,
Linus Walleij

#11 lore raw

PATCH v6 4/17 mfd: madera: Register map tables for Cirrus Logic CS47L35

In reply to Richard Fitzgerald

Regmap configuration tables for Cirrus Logic CS47L35 codecs.

---
 drivers/mfd/Kconfig          |    7 +
 drivers/mfd/Makefile         |    3 +
 drivers/mfd/cs47l35-tables.c | 1610 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1620 insertions(+)
 create mode 100644 drivers/mfd/cs47l35-tables.c
drivers/mfd/Kconfig +7 -0
index 7c47dd79cbaa..0cfdf14b2925 100644
@@ -249,6 +249,13 @@ config MFD_MADERA_SPI
 	  Support for the Cirrus Logic Madera platform audio SoC
 	  core functionality controlled via SPI.
 
+config MFD_CS47L35
+	bool "Cirrus Logic CS47L35"
+	select PINCTRL_CS47L35
+	depends on MFD_MADERA
+	help
+	  Support for Cirrus Logic CS47L35 Smart Codec
+
 config MFD_ASIC3
 	bool "Compaq ASIC3"
 	depends on GPIOLIB && ARM
drivers/mfd/Makefile +3 -0
index bcff419deab9..024a297ff1e2 100644
@@ -77,6 +77,9 @@ obj-$(CONFIG_MFD_WM8994)	+= wm8994.o
 obj-$(CONFIG_MFD_WM97xx)	+= wm97xx-core.o
 
 obj-$(CONFIG_MFD_MADERA)	+= madera-core.o
+ifeq ($(CONFIG_MFD_CS47L35),y)
+obj-$(CONFIG_MFD_MADERA)	+= cs47l35-tables.o
+endif
 obj-$(CONFIG_MFD_MADERA_I2C)	+= madera-i2c.o
 obj-$(CONFIG_MFD_MADERA_SPI)	+= madera-spi.o
 
drivers/mfd/cs47l35-tables.c new file +1610 -0

1,610 lines not on this page · raw message

Signature · 1 line
2.11.0
#12 lore raw

PATCH v6 5/17 mfd: madera: Register map tables for Cirrus Logic CS47L85

In reply to Richard Fitzgerald

Regmap configuration tables for Cirrus Logic CS47L85 codecs.

---
 drivers/mfd/Kconfig          |    7 +
 drivers/mfd/Makefile         |    3 +
 drivers/mfd/cs47l85-tables.c | 3010 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 3020 insertions(+)
 create mode 100644 drivers/mfd/cs47l85-tables.c
drivers/mfd/Kconfig +7 -0
index 0cfdf14b2925..aac89cf4d827 100644
@@ -256,6 +256,13 @@ config MFD_CS47L35
 	help
 	  Support for Cirrus Logic CS47L35 Smart Codec
 
+config MFD_CS47L85
+	bool "Cirrus Logic CS47L85"
+	select PINCTRL_CS47L85
+	depends on MFD_MADERA
+	help
+	  Support for Cirrus Logic CS47L85 Smart Codec
+
 config MFD_ASIC3
 	bool "Compaq ASIC3"
 	depends on GPIOLIB && ARM
drivers/mfd/Makefile +3 -0
index 024a297ff1e2..09d829f938a6 100644
@@ -80,6 +80,9 @@ obj-$(CONFIG_MFD_MADERA)	+= madera-core.o
 ifeq ($(CONFIG_MFD_CS47L35),y)
 obj-$(CONFIG_MFD_MADERA)	+= cs47l35-tables.o
 endif
+ifeq ($(CONFIG_MFD_CS47L85),y)
+obj-$(CONFIG_MFD_MADERA)	+= cs47l85-tables.o
+endif
 obj-$(CONFIG_MFD_MADERA_I2C)	+= madera-i2c.o
 obj-$(CONFIG_MFD_MADERA_SPI)	+= madera-spi.o
 
drivers/mfd/cs47l85-tables.c new file +3010 -0

2,978 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.

#13 lore raw

PATCH v6 6/17 mfd: madera: Register map tables for Cirrus Logic CS47L90/91

In reply to Richard Fitzgerald

Regmap configuration tables for Cirrus Logic CS47L90 and CS47L91 codecs.

---
 drivers/mfd/Kconfig          |    7 +
 drivers/mfd/Makefile         |    3 +
 drivers/mfd/cs47l90-tables.c | 2675 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2685 insertions(+)
 create mode 100644 drivers/mfd/cs47l90-tables.c
drivers/mfd/Kconfig +7 -0
index aac89cf4d827..aad818614b3d 100644
@@ -263,6 +263,13 @@ config MFD_CS47L85
 	help
 	  Support for Cirrus Logic CS47L85 Smart Codec
 
+config MFD_CS47L90
+	bool "Cirrus Logic CS47L90/91"
+	select PINCTRL_CS47L90
+	depends on MFD_MADERA
+	help
+	  Support for Cirrus Logic CS47L90 and CS47L91 Smart Codecs
+
 config MFD_ASIC3
 	bool "Compaq ASIC3"
 	depends on GPIOLIB && ARM
drivers/mfd/Makefile +3 -0
index 09d829f938a6..2c07de3ad575 100644
@@ -83,6 +83,9 @@ endif
 ifeq ($(CONFIG_MFD_CS47L85),y)
 obj-$(CONFIG_MFD_MADERA)	+= cs47l85-tables.o
 endif
+ifeq ($(CONFIG_MFD_CS47L90),y)
+obj-$(CONFIG_MFD_MADERA)	+= cs47l90-tables.o
+endif
 obj-$(CONFIG_MFD_MADERA_I2C)	+= madera-i2c.o
 obj-$(CONFIG_MFD_MADERA_SPI)	+= madera-spi.o
 
drivers/mfd/cs47l90-tables.c new file +2675 -0

2,675 lines not on this page · raw message

Signature · 1 line
2.11.0
#14 lore raw

PATCH v6 7/17 regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

This adds a new driver identity "madera-micsupp" and probe function so that this driver can be used to control the micsupp regulator on Cirrus Logic Madera codecs.

---
 .../bindings/regulator/arizona-regulator.txt       |  3 +-
 drivers/regulator/Kconfig                          |  7 ++-
 drivers/regulator/arizona-micsupp.c                | 71 +++++++++++++++++++++-
 3 files changed, 76 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/regulator/arizona-regulator.txt +2 -1
index 443564d7784f..91b00f9f06d5 100644
@@ -5,7 +5,8 @@ of analogue I/O.
 
 This document lists regulator specific bindings, see the primary binding
 document:
-  ../mfd/arizona.txt
+  For Wolfson Arizona codecs: ../mfd/arizona.txt
+  For Cirrus Logic Madera codecs: ../mfd/madera.txt
 
 Optional properties:
   - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
drivers/regulator/Kconfig +4 -3
index 96cd55f9e3c5..53639a6bd888 100644
@@ -134,11 +134,12 @@ config REGULATOR_ARIZONA_LDO1
 	  devices.
 
 config REGULATOR_ARIZONA_MICSUPP
-	tristate "Wolfson Arizona class devices MICSUPP"
-	depends on MFD_ARIZONA
+	tristate "Cirrus Madera and Wolfson Arizona class devices MICSUPP"
+	depends on MFD_ARIZONA || MFD_MADERA
 	depends on SND_SOC
 	help
-	  Support for the MICSUPP regulators found on Wolfson Arizona class
+	  Support for the MICSUPP regulators found on Cirrus Logic Madera codecs
+	  and Wolfson Arizona codecs
 	  devices.
 
 config REGULATOR_AS3711
drivers/regulator/arizona-micsupp.c +70 -1

98 lines not on this page · raw message

Signature · 1 line
2.11.0
#15 lore raw

PATCH v6 8/17 regulator: arizona-ldo1: Add support for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

This adds a new driver identity "madera-ldo1" and probe function so that this driver can be used to control the LDO1 regulator on some Cirrus Logic Madera codecs.

---
 drivers/regulator/Kconfig        |  8 ++--
 drivers/regulator/arizona-ldo1.c | 82 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 85 insertions(+), 5 deletions(-)
drivers/regulator/Kconfig +4 -4
index 53639a6bd888..3db4f994aea8 100644
@@ -126,12 +126,12 @@ config REGULATOR_AB8500
 	  signal AB8500 PMIC
 
 config REGULATOR_ARIZONA_LDO1
-	tristate "Wolfson Arizona class devices LDO1"
-	depends on MFD_ARIZONA
+	tristate "Cirrus Madera and Wolfson Arizona class devices LDO1"
+	depends on MFD_ARIZONA || MFD_MADERA
 	depends on SND_SOC
 	help
-	  Support for the LDO1 regulators found on Wolfson Arizona class
-	  devices.
+	  Support for the LDO1 regulators found on Cirrus Logic Madera codecs
+	  and Wolfson Arizona codecs.
 
 config REGULATOR_ARIZONA_MICSUPP
 	tristate "Cirrus Madera and Wolfson Arizona class devices MICSUPP"
drivers/regulator/arizona-ldo1.c +81 -1

109 lines not on this page · raw message

Signature · 1 line
2.11.0
#16 lore raw

PATCH v6 9/17 irqchip: Add driver for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

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.

---
 MAINTAINERS                              |   2 +
 drivers/irqchip/Kconfig                  |   3 +
 drivers/irqchip/Makefile                 |   1 +
 drivers/irqchip/irq-madera.c             | 301 +++++++++++++++++++++++++++++++
 include/linux/irqchip/irq-madera-pdata.h |  23 +++
 include/linux/irqchip/irq-madera.h       |  98 ++++++++++
 6 files changed, 428 insertions(+)
 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
MAINTAINERS +2 -0
index 510ca722cc27..f0ae363fbcee 100644
@@ -3487,7 +3487,9 @@ T:	git https://github.com/CirrusLogic/linux-drivers.git
 W:	https://github.com/CirrusLogic/linux-drivers/wiki
 S:	Supported
 F:	Documentation/devicetree/bindings/mfd/madera.txt
+F:	include/linux/irqchip/irq-madera*
 F:	include/linux/mfd/madera/*
+F:	drivers/irqchip/irq-madera*
 F:	drivers/mfd/madera*
 F:	drivers/mfd/cs47l*
 
drivers/irqchip/Kconfig +3 -0
index 53380bd72ea4..961e90558433 100644
@@ -137,6 +137,9 @@ config IMGPDC_IRQ
 	select GENERIC_IRQ_CHIP
 	select IRQ_DOMAIN
 
+config MADERA_IRQ
+	bool
+
 config IRQ_MIPS_CPU
 	bool
 	select GENERIC_IRQ_CHIP
drivers/irqchip/Makefile +1 -0
index dae7282bfdef..88e41fa81118 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_S3C24XX)		+= irq-s3c24xx.o
 obj-$(CONFIG_DW_APB_ICTL)		+= irq-dw-apb-ictl.o
 obj-$(CONFIG_METAG)			+= irq-metag-ext.o
 obj-$(CONFIG_METAG_PERFCOUNTER_IRQS)	+= irq-metag.o
+obj-$(CONFIG_MADERA_IRQ)		+= irq-madera.o
 obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OMPIC)			+= irq-ompic.o
 obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
drivers/irqchip/irq-madera.c new file +301 -0

301 lines not on this page · raw message

include/linux/irqchip/irq-madera-pdata.h new file +23 -0
new file mode 100644
index 000000000000..1b6cc31d5980
@@ -0,0 +1,23 @@
+/*
+ * Platform data for Cirrus Logic Madera codecs irqchip driver
+ *
+ * Copyright 2016-2017 Cirrus Logic
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef IRQCHIP_MADERA_PDATA_H
+#define IRQCHIP_MADERA_PDATA_H
+
+/**
+ * struct madera_irqchip_pdata - Configuration for Madera devices IRQ driver
+ *
+ * @irq_flags: Mode for primary IRQ (defaults to active low)
+ */
+struct madera_irqchip_pdata {
+	unsigned int irq_flags;
+};
+
+#endif
include/linux/irqchip/irq-madera.h new file +98 -0

98 lines not on this page · raw message

Signature · 1 line
2.11.0
#17 lore raw

Re: [PATCH v6 09/17] irqchip: Add driver for Cirrus Logic Madera codecs

I love your patch! Yet something to improve:

Hi Richard,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.14 next-20171124]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: i386-randconfig-a1-201748 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824 HEAD 7f8a24863888ec8cffb97f9849b2d22564f564fb builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

In file included from include/linux/mfd/madera/core.h:17:0,
from drivers/regulator/arizona-ldo1.c:34:

>> include/linux/mfd/madera/pdata.h:19:32: fatal error: sound/madera-pdata.h: No such file or directory
    #include <sound/madera-pdata.h>
                                   ^

compilation terminated.

vim +19 include/linux/mfd/madera/pdata.h

0d9fb60e Richard Fitzgerald 2017-11-23  13  
0d9fb60e Richard Fitzgerald 2017-11-23  14  #include <linux/irqchip/irq-madera-pdata.h>
0d9fb60e Richard Fitzgerald 2017-11-23  15  #include <linux/kernel.h>
0d9fb60e Richard Fitzgerald 2017-11-23  16  #include <linux/regulator/arizona-ldo1.h>
0d9fb60e Richard Fitzgerald 2017-11-23  17  #include <linux/regulator/arizona-micsupp.h>
0d9fb60e Richard Fitzgerald 2017-11-23  18  #include <linux/regulator/machine.h>

0d9fb60e Richard Fitzgerald 2017-11-23 @19 #include <sound/madera-pdata.h> 0d9fb60e Richard Fitzgerald 2017-11-23 20

:::::: The code at line 19 was first introduced by commit
:::::: 0d9fb60e7fd7381d8adc6c16ea0b78ee9668a565 mfd: madera: Add common support for Cirrus Logic Madera codecs

:::::: TO: Richard Fitzgerald <rf-yzvPICuk2AATkU/[email protected]> :::::: CC: 0day robot <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#18 lore raw

PATCH v6 10/17 pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

This is the binding description of the pinctrl driver for Cirru Logic Madera codecs. The binding uses the generic pinctrl binding so the main purpose here is to describe the device-specific names for groups and functions.

---
 .../bindings/pinctrl/cirrus,madera-pinctrl.txt     | 99 ++++++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/cirrus,madera-pinctrl.txt new file +99 -0
new file mode 100644
index 000000000000..b0e36cf0d289
@@ -0,0 +1,99 @@
+Cirrus Logic Madera class audio codecs pinctrl driver
+
+The Cirrus Logic Madera codecs provide a number of GPIO functions for
+interfacing to external hardware and to provide logic outputs to other devices.
+Certain groups of GPIO pins also have an alternate function, normally as an
+audio interface.
+
+The set of available GPIOs, functions and alternate function groups differs
+between codecs so refer to the datasheet for the codec for further information
+on what is supported on that device.
+
+The properties for this driver exist within the parent MFD driver node.
+
+See also
+  the core bindings for the parent MFD driver:
+    Documentation/devicetree/bindings/mfd/madera.txt
+
+  the generic pinmix bindings:
+    Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+
+Required properties of parent mfd node:
+  - pinctrl-names : must be "default"
+  - pinctrl-0 : a phandle to the node containing the subnodes containing default
+      configurations
+
+Required subnodes:
+  One subnode is required to contain the default settings. It contains an
+  arbitrary number of configuration subnodes, one for each group or pin
+  configuration you want to apply as a default.
+
+Required properties of configuration subnodes:
+  - groups : name of one pin group to configure. One of:
+	aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
+	dmic4, dmic5, dmic6,
+	gpio1, gpio2, ..., gpio40
+    The gpioN groups select the single pin of this name for configuration
+
+Optional properties of configuration subnodes:
+  Any configuration option not explicitly listed in the dts will be left at
+  chip default setting.
+
+  - function : name of function to assign to this group. One of:
+	aif1, aif2, aif3, aif4, mif1, mif2, mif3, pdmspk1, pdmspk2,
+	dmic3, dmic4, dmic5, dmic6,
+	io, dsp-gpio, irq1, irq2,
+	fll1-clk, fll1-lock, fll2-clk, fll2-lock, fll3-clk, fll3-lock,
+	fllao-clk, fllao-lock,
+	opclk, opclk-async, pwm1, pwm2, spdif,
+	asrc1-in1-lock, asrc1-in2-lock, asrc2-in1-lock, asrc2-in2-lock,
+	spkl-short-circuit, spkr-short-circuit, spk-shutdown,
+	spk-overheat-shutdown, spk-overheat-warn,
+	timer1-sts, timer2-sts, timer3-sts, timer4-sts, timer5-sts, timer6-sts,
+	timer7-sts, timer8-sts,
+	log1-fifo-ne, log2-fifo-ne, log3-fifo-ne, log4-fifo-ne, log5-fifo-ne,
+	log6-fifo-ne, log7-fifo-ne, log8-fifo-ne,
+
+  - bias-disable : disable pull-up and pull-down
+  - bias-bus-hold : enable buskeeper
+  - bias-pull-up : output is pulled-up
+  - bias-pull-down : output is pulled-down
+  - drive-push-pull : CMOS output
+  - drive-open-drain : open-drain output
+  - drive-strength : drive strength in mA. Valid values are 4 or 8
+  - input-schmitt-enable : enable schmitt-trigger mode
+  - input-schmitt-disable : disable schmitt-trigger mode
+  - input-debounce : A value of 0 disables debounce, a value !=0 enables
+	debounce
+  - output-low : set the pin to output mode with low level
+  - output-high : set the pin to output mode with high level
+
+Example:
+
+cs47l85@0 {
+	compatible = "cirrus,cs47l85";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&cs47l85_defaults>;
+
+	cs47l85_defaults: cs47l85-gpio-defaults {
+		aif1 {
+			groups = "aif1";
+			function = "aif1";
+			bias-bus-hold;
+		};
+
+		aif2 {
+			groups = "aif2";
+			function = "aif2";
+			bias-bus-hold;
+		};
+
+		opclk {
+			groups = "gpio1";
+			function = "opclk";
+			bias-pull-up;
+			drive-strength = <8>;
+		};
+	};
+};
Signature · 1 line
2.11.0
Reviewed-by on v6 10/17
#19 lore raw

Re: [PATCH v6 10/17] pinctrl: madera: Add DT bindings for Cirrus Logic Madera codecs

Quoted 7 lines · Richard Fitzgerald

This is the binding description of the pinctrl driver for Cirru Logic Madera codecs. The binding uses the generic pinctrl binding so the main purpose here is to describe the device-specific names for groups and functions.

Yours,
Linus Walleij

#20 lore raw

PATCH v6 11/17 pinctrl: madera: Add driver for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

These codecs have a variable number of I/O lines each of which is individually selectable to a wide range of possible functions.

The functionality is slightly different from the traditional muxed GPIO since most of the functions can be mapped to any pin (and even the same function to multiple pins). Most pins have a dedicated "alternate" function that is only available on that pin. The alternate functions are usually a group of signals, though it is not always necessary to enable the full group, depending on the alternate function and how it is to be used. The mapping between alternate functions and GPIO pins varies between codecs depending on the number of alternate functions and available pins.

Note on the Kconfig options:
The formula "default y if..." is used for PINCTRL_MADERA so that its select options will be processed, allowing us to group selects for pinctrl into the pinctrl Kconfig where they logically belong instead of accumulating under the parent MFD Kconfig.

---
 MAINTAINERS                              |    2 +
 drivers/pinctrl/Kconfig                  |    1 +
 drivers/pinctrl/Makefile                 |    1 +
 drivers/pinctrl/cirrus/Kconfig           |   15 +
 drivers/pinctrl/cirrus/Makefile          |   11 +
 drivers/pinctrl/cirrus/pinctrl-cs47l35.c |   46 ++
 drivers/pinctrl/cirrus/pinctrl-cs47l85.c |   60 ++
 drivers/pinctrl/cirrus/pinctrl-cs47l90.c |   58 ++
 drivers/pinctrl/cirrus/pinctrl-madera.c  | 1074 ++++++++++++++++++++++++++++++
 drivers/pinctrl/cirrus/pinctrl-madera.h  |   40 ++
 10 files changed, 1308 insertions(+)
 create mode 100644 drivers/pinctrl/cirrus/Kconfig
 create mode 100644 drivers/pinctrl/cirrus/Makefile
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l35.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l85.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l90.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-madera.c
 create mode 100644 drivers/pinctrl/cirrus/pinctrl-madera.h
MAINTAINERS +2 -0
index f0ae363fbcee..2c6772f81d88 100644
@@ -3487,11 +3487,13 @@ T:	git https://github.com/CirrusLogic/linux-drivers.git
 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/irqchip/irq-madera*
 F:	drivers/mfd/madera*
 F:	drivers/mfd/cs47l*
+F:	drivers/pinctrl/cirrus/*
 
 CLEANCACHE API
 M:	Konrad Rzeszutek Wilk <[email protected]>
drivers/pinctrl/Kconfig +1 -0
index 4571cc098b76..fba6986772c2 100644
@@ -365,6 +365,7 @@ source "drivers/pinctrl/vt8500/Kconfig"
 source "drivers/pinctrl/mediatek/Kconfig"
 source "drivers/pinctrl/zte/Kconfig"
 source "drivers/pinctrl/meson/Kconfig"
+source "drivers/pinctrl/cirrus/Kconfig"
 
 config PINCTRL_XWAY
 	bool
drivers/pinctrl/Makefile +1 -0
index d0d4844f8022..d3b932695e68 100644
@@ -66,3 +66,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER)	+= uniphier/
 obj-$(CONFIG_ARCH_VT8500)	+= vt8500/
 obj-$(CONFIG_PINCTRL_MTK)	+= mediatek/
 obj-$(CONFIG_PINCTRL_ZX)	+= zte/
+obj-y				+= cirrus/
drivers/pinctrl/cirrus/Kconfig new file +15 -0
new file mode 100644
index 000000000000..093527eaf2eb
@@ -0,0 +1,15 @@
+config PINCTRL_MADERA
+	bool
+	select PINMUX
+	select GENERIC_PINCONF
+	default y if MFD_MADERA=y
+
+config PINCTRL_CS47L35
+	bool
+
+config PINCTRL_CS47L85
+	bool
+
+config PINCTRL_CS47L90
+	bool
+
drivers/pinctrl/cirrus/Makefile new file +11 -0
new file mode 100644
index 000000000000..b34473c5c53f
@@ -0,0 +1,11 @@
+# Cirrus Logic pinctrl drivers
+obj-$(CONFIG_PINCTRL_MADERA)	+= pinctrl-madera.o
+ifeq ($(CONFIG_PINCTRL_CS47L35),y)
+obj-$(CONFIG_PINCTRL_MADERA)	+= pinctrl-cs47l35.o
+endif
+ifeq ($(CONFIG_PINCTRL_CS47L85),y)
+obj-$(CONFIG_PINCTRL_MADERA)	+= pinctrl-cs47l85.o
+endif
+ifeq ($(CONFIG_PINCTRL_CS47L90),y)
+obj-$(CONFIG_PINCTRL_MADERA)	+= pinctrl-cs47l90.o
+endif
drivers/pinctrl/cirrus/pinctrl-cs47l35.c new file +46 -0

46 lines not on this page · raw message

drivers/pinctrl/cirrus/pinctrl-cs47l85.c new file +60 -0

60 lines not on this page · raw message

drivers/pinctrl/cirrus/pinctrl-cs47l90.c new file +58 -0

58 lines not on this page · raw message

drivers/pinctrl/cirrus/pinctrl-madera.c new file +1074 -0

1,074 lines not on this page · raw message

drivers/pinctrl/cirrus/pinctrl-madera.h new file +40 -0
new file mode 100644
index 000000000000..7b55e226e7a6
@@ -0,0 +1,40 @@
+/*
+ * Pinctrl for Cirrus Logic Madera codecs
+ *
+ * Copyright 2016-2017 Cirrus Logic
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef PINCTRL_MADERA_H
+#define PINCTRL_MADERA_H
+
+struct madera_pin_groups {
+	const char *name;
+	const unsigned int *pins;
+	unsigned int n_pins;
+};
+
+struct madera_pin_chip {
+	unsigned int n_pins;
+
+	const struct madera_pin_groups *pin_groups;
+	unsigned int n_pin_groups;
+};
+
+struct madera_pin_private {
+	struct madera *madera;
+
+	const struct madera_pin_chip *chip; /* chip-specific groups */
+
+	struct device *dev;
+	struct pinctrl_dev *pctl;
+};
+
+extern const struct madera_pin_chip cs47l35_pin_chip;
+extern const struct madera_pin_chip cs47l85_pin_chip;
+extern const struct madera_pin_chip cs47l90_pin_chip;
+
+#endif
Signature · 1 line
2.11.0
#21 lore raw

PATCH v6 12/17 gpio: madera: Support Cirrus Logic Madera class codecs

In reply to Richard Fitzgerald

This adds support for the GPIOs on Cirrus Logic Madera class codecs. Any pins not used for special functions (see the pinctrl driver) can be used as general single-bit input or output lines. The number of available GPIOs varies between codecs.

---
 MAINTAINERS                |   1 +
 drivers/gpio/Kconfig       |   6 ++
 drivers/gpio/Makefile      |   1 +
 drivers/gpio/gpio-madera.c | 196 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 204 insertions(+)
 create mode 100644 drivers/gpio/gpio-madera.c
MAINTAINERS +1 -0
index 2c6772f81d88..7f3f2de4cc44 100644
@@ -3490,6 +3490,7 @@ 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*
drivers/gpio/Kconfig +6 -0
index d6a8e851ad13..95e4bbcf9bf7 100644
@@ -993,6 +993,12 @@ config GPIO_LP87565
 	  This driver can also be built as a module. If so, the module will be
 	  called gpio-lp87565.
 
+config GPIO_MADERA
+	bool "Cirrus Logic Madera class codecs"
+	depends on PINCTRL_MADERA
+	help
+	  Support for GPIOs on Cirrus Logic Madera class codecs.
+
 config GPIO_MAX77620
 	tristate "GPIO support for PMIC MAX77620 and MAX20024"
 	depends on MFD_MAX77620
drivers/gpio/Makefile +1 -0
index 4bc24febb889..765125eb7d4c 100644
@@ -70,6 +70,7 @@ obj-$(CONFIG_ARCH_LPC32XX)	+= gpio-lpc32xx.o
 obj-$(CONFIG_GPIO_LP873X)	+= gpio-lp873x.o
 obj-$(CONFIG_GPIO_LP87565)	+= gpio-lp87565.o
 obj-$(CONFIG_GPIO_LYNXPOINT)	+= gpio-lynxpoint.o
+obj-$(CONFIG_GPIO_MADERA)	+= gpio-madera.o
 obj-$(CONFIG_GPIO_MAX3191X)	+= gpio-max3191x.o
 obj-$(CONFIG_GPIO_MAX730X)	+= gpio-max730x.o
 obj-$(CONFIG_GPIO_MAX7300)	+= gpio-max7300.o
drivers/gpio/gpio-madera.c new file +196 -0

196 lines not on this page · raw message

Signature · 1 line
2.11.0
#22 lore raw

PATCH v6 13/17 ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs.

---
 Documentation/devicetree/bindings/sound/madera.txt | 67 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 include/dt-bindings/sound/madera.h                 | 27 +++++++++
 3 files changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/madera.txt
 create mode 100644 include/dt-bindings/sound/madera.h
Documentation/devicetree/bindings/sound/madera.txt new file +67 -0
new file mode 100644
index 000000000000..1114fcf1aa4c
@@ -0,0 +1,67 @@
+Cirrus Logic Madera class audio codecs
+
+This describes audio configuration bindings for these codecs.
+
+See also the core bindings for the parent MFD driver:
+See Documentation/devicetree/bindings/mfd/madera.txt
+
+and defines for values used in these bindings:
+include/dt-bindings/sound/madera.h
+
+These properties are all contained in the parent MFD node.
+
+Optional properties:
+  - cirrus,dmic-ref : Indicates how the MICBIAS pins have been externally
+    connected to DMICs on each input, one cell per input.
+    <IN1 IN2 IN3 ...>
+    A value of 0 indicates MICVDD and is the default, other values depend on the
+    codec:
+    For CS47L35 one of the CS47L35_DMIC_REF_xxx values
+    For all other codecs one of the MADERA_DMIC_REF_xxx values
+    Also see the datasheet for a description of the INn_DMIC_SUP field.
+
+  - cirrus,inmode : A list of input mode settings for each input. A maximum of
+    16 cells, with four cells per input in the order INnAL, INnAR INnBL INnBR.
+    For non-muxed inputs the first two cells for that input set the mode for
+    the left and right channel and the second two cells must be 0.
+    For muxed inputs the first two cells for that input set the mode of the
+    left and right A inputs and the second two cells set the mode of the left
+    and right B inputs.
+    Valid mode values are one of the MADERA_INMODE_xxx. If the array is shorter
+    than the number of inputs the unspecified inputs default to
+    MADERA_INMODE_DIFF.
+
+  - cirrus,out-mono : Mono bit for each output, must contain six cells if
+    specified. A non-zero value indicates the corresponding output is mono.
+
+  - cirrus,max-channels-clocked : Maximum number of channels that I2S clocks
+    will be generated for. Useful when clock master for systems where the I2S
+    bus has multiple data lines.
+    One cell for each AIF, use a value of zero for AIFs that should be handled
+    normally.
+
+  - cirrus,pdm-fmt : PDM speaker data format, must contain 2 cells
+    (OUT5 and OUT6). See the PDM_SPKn_FMT field in the datasheet for a
+    description of this value.
+    The second cell is ignored for codecs that do not have OUT6.
+
+  - cirrus,pdm-mute : PDM mute format, must contain 2 cells
+    (OUT5 and OUT6). See the PDM_SPKn_CTRL_1 register in the datasheet for a
+    description of this value.
+    The second cell is ignored for codecs that do not have OUT6.
+
+Example:
+
+cs47l35@0 {
+	compatible = "cirrus,cs47l35";
+
+	cirrus,dmic-ref = <0 0 CS47L35_DMIC_REF_MICBIAS1B 0>;
+	cirrus,inmode = <
+		MADERA_INMODE_DMIC MADERA_INMODE_DMIC /* IN1A digital */
+		MADERA_INMODE_SE   MADERA_INMODE_SE   /* IN1B single-ended */
+		MADERA_INMODE_DIFF MADERA_INMODE_DIFF /* IN2 differential */
+		0 0 	/* not used on this codec */
+	>;
+	cirrus,out-mono = <0 0 0 0 0 0>;
+	cirrus,max-channels-clocked = <2 0 0>;
+};
MAINTAINERS +1 -0
index 7f3f2de4cc44..a336fde993f4 100644
@@ -3488,6 +3488,7 @@ 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/dt-bindings/sound/madera*
 F:	include/linux/irqchip/irq-madera*
 F:	include/linux/mfd/madera/*
 F:	drivers/gpio/gpio-madera*
include/dt-bindings/sound/madera.h new file +27 -0
new file mode 100644
index 000000000000..5c05b7a9bab8
@@ -0,0 +1,27 @@
+/*
+ * Device Tree defines for Madera codecs
+ *
+ * Copyright 2016-2017 Cirrus Logic
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef DT_BINDINGS_SOUND_MADERA_H
+#define DT_BINDINGS_SOUND_MADERA_H
+
+#define MADERA_INMODE_DIFF		0
+#define MADERA_INMODE_SE		1
+#define MADERA_INMODE_DMIC		2
+
+#define MADERA_DMIC_REF_MICVDD		0
+#define MADERA_DMIC_REF_MICBIAS1	1
+#define MADERA_DMIC_REF_MICBIAS2	2
+#define MADERA_DMIC_REF_MICBIAS3	3
+
+#define CS47L35_DMIC_REF_MICBIAS1B	1
+#define CS47L35_DMIC_REF_MICBIAS2A	2
+#define CS47L35_DMIC_REF_MICBIAS2B	3
+
+#endif
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#23 lore raw

PATCH v6 14/17 ASoC: madera: Add common support for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald

The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs.

This patch adds common support code shared by all Madera codecs.

---
 MAINTAINERS                  |    4 +
 include/sound/madera-pdata.h |   61 +
 sound/soc/codecs/Kconfig     |    5 +
 sound/soc/codecs/Makefile    |    2 +
 sound/soc/codecs/madera.c    | 4439 ++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/madera.h    |  470 +++++
 6 files changed, 4981 insertions(+)
 create mode 100644 include/sound/madera-pdata.h
 create mode 100644 sound/soc/codecs/madera.c
 create mode 100644 sound/soc/codecs/madera.h
MAINTAINERS +4 -0
index a336fde993f4..0c8f3a9a90b4 100644
@@ -3488,14 +3488,18 @@ 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:	Documentation/devicetree/bindings/sound/madera.txt
 F:	include/dt-bindings/sound/madera*
 F:	include/linux/irqchip/irq-madera*
 F:	include/linux/mfd/madera/*
+F:	include/sound/madera*
 F:	drivers/gpio/gpio-madera*
 F:	drivers/irqchip/irq-madera*
 F:	drivers/mfd/madera*
 F:	drivers/mfd/cs47l*
 F:	drivers/pinctrl/cirrus/*
+F:	sound/soc/codecs/cs47l*
+F:	sound/soc/codecs/madera*
 
 CLEANCACHE API
 M:	Konrad Rzeszutek Wilk <[email protected]>
include/sound/madera-pdata.h new file +61 -0

61 lines not on this page · raw message

sound/soc/codecs/Kconfig +5 -0
index a42ddbc93f3d..0462c4a79b28 100644
@@ -252,10 +252,12 @@ config SND_SOC_WM_HUBS
 config SND_SOC_WM_ADSP
 	tristate
 	select SND_SOC_COMPRESS
+	default y if SND_SOC_MADERA=y
 	default y if SND_SOC_CS47L24=y
 	default y if SND_SOC_WM5102=y
 	default y if SND_SOC_WM5110=y
 	default y if SND_SOC_WM2200=y
+	default m if SND_SOC_MADERA=m
 	default m if SND_SOC_CS47L24=m
 	default m if SND_SOC_WM5102=m
 	default m if SND_SOC_WM5110=m
@@ -591,6 +593,9 @@ config SND_SOC_ISABELLE
 config SND_SOC_LM49453
 	tristate
 
+config SND_SOC_MADERA
+	tristate
+
 config SND_SOC_MAX98088
        tristate
 
sound/soc/codecs/Makefile +2 -0
index 0001069ce2a7..6c3e5b094197 100644
@@ -80,6 +80,7 @@ snd-soc-jz4740-codec-objs := jz4740.o
 snd-soc-l3-objs := l3.o
 snd-soc-lm4857-objs := lm4857.o
 snd-soc-lm49453-objs := lm49453.o
+snd-soc-madera-objs := madera.o
 snd-soc-max9768-objs := max9768.o
 snd-soc-max98088-objs := max98088.o
 snd-soc-max98090-objs := max98090.o
@@ -320,6 +321,7 @@ obj-$(CONFIG_SND_SOC_JZ4740_CODEC)	+= snd-soc-jz4740-codec.o
 obj-$(CONFIG_SND_SOC_L3)	+= snd-soc-l3.o
 obj-$(CONFIG_SND_SOC_LM4857)	+= snd-soc-lm4857.o
 obj-$(CONFIG_SND_SOC_LM49453)   += snd-soc-lm49453.o
+obj-$(CONFIG_SND_SOC_MADERA)	+= snd-soc-madera.o
 obj-$(CONFIG_SND_SOC_MAX9768)	+= snd-soc-max9768.o
 obj-$(CONFIG_SND_SOC_MAX98088)	+= snd-soc-max98088.o
 obj-$(CONFIG_SND_SOC_MAX98090)	+= snd-soc-max98090.o
sound/soc/codecs/madera.c new file +4439 -0

2,886 lines not on this page · raw message

sound/soc/codecs/madera.h new file +470 -0

470 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.

#24 lore raw

Re: [PATCH v6 14/17] ASoC: madera: Add common support for Cirrus Logic Madera codecs

I love your patch! Yet something to improve:

Hi Richard,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64

All errors (new ones prefixed by >>):

drivers/mfd/madera-i2c.o: In function `madera_i2c_probe':

>> madera-i2c.c:(.text+0x208): undefined reference to `__devm_regmap_init_i2c'
   madera-i2c.c:(.text+0x24c): undefined reference to `__devm_regmap_init_i2c'
   drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_init':
>> madera-i2c.c:(.init.text+0x20): undefined reference to `i2c_register_driver'
   drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_exit':
>> madera-i2c.c:(.exit.text+0x14): undefined reference to `i2c_del_driver'

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#25 lore raw

Re: [PATCH v6 14/17] ASoC: madera: Add common support for Cirrus Logic Madera codecs

In reply to Richard Fitzgerald
I love your patch! Yet something to improve:

Hi Richard,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20171124]
[cannot apply to ljones-mfd/for-mfd-next asoc/for-next v4.14]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L35-L85-L90-L91-codecs/20171126-145824
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All errors (new ones prefixed by >>):

drivers/mfd/madera-i2c.o: In function `madera_i2c_probe':

>> (.text+0x1ac): undefined reference to `__devm_regmap_init_i2c'
   (.text+0x1c4): undefined reference to `__devm_regmap_init_i2c'
   (.text+0x210): undefined reference to `__devm_regmap_init_i2c'
   (.text+0x224): undefined reference to `__devm_regmap_init_i2c'
   drivers/mfd/madera-i2c.o: In function `madera_i2c_driver_init':
>> (.init.text+0x10): undefined reference to `i2c_register_driver'

(.init.text+0x20): undefined reference to `i2c_register_driver'

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#26 lore raw

PATCH v6 15/17 ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35

In reply to Richard Fitzgerald

Adds the codec driver for the CS47L35 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform.

---
 sound/soc/codecs/Kconfig   |    6 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/cs47l35.c | 1748 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1756 insertions(+)
 create mode 100644 sound/soc/codecs/cs47l35.c
sound/soc/codecs/Kconfig +6 -0
index 0462c4a79b28..6e78f3dd23b8 100644
@@ -63,6 +63,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_CS43130 if I2C
 	select SND_SOC_CS4349 if I2C
 	select SND_SOC_CS47L24 if MFD_CS47L24
+	select SND_SOC_CS47L35 if MFD_CS47L35
 	select SND_SOC_CS53L30 if I2C
 	select SND_SOC_CX20442 if TTY
 	select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
@@ -504,6 +505,9 @@ config SND_SOC_CS4349
 config SND_SOC_CS47L24
 	tristate
 
+config SND_SOC_CS47L35
+	tristate
+
 # Cirrus Logic Quad-Channel ADC
 config SND_SOC_CS53L30
 	tristate "Cirrus Logic CS53L30 CODEC"
@@ -595,6 +599,8 @@ config SND_SOC_LM49453
 
 config SND_SOC_MADERA
 	tristate
+	default y if SND_SOC_CS47L35=y
+	default m if SND_SOC_CS47L35=m
 
 config SND_SOC_MAX98088
        tristate
sound/soc/codecs/Makefile +2 -0
index 6c3e5b094197..8d0b6ed5cd46 100644
@@ -57,6 +57,7 @@ snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o
 snd-soc-cs43130-objs := cs43130.o
 snd-soc-cs4349-objs := cs4349.o
 snd-soc-cs47l24-objs := cs47l24.o
+snd-soc-cs47l35-objs := cs47l35.o
 snd-soc-cs53l30-objs := cs53l30.o
 snd-soc-cx20442-objs := cx20442.o
 snd-soc-da7210-objs := da7210.o
@@ -298,6 +299,7 @@ obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o
 obj-$(CONFIG_SND_SOC_CS43130)   += snd-soc-cs43130.o
 obj-$(CONFIG_SND_SOC_CS4349)	+= snd-soc-cs4349.o
 obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
+obj-$(CONFIG_SND_SOC_CS47L35)	+= snd-soc-cs47l35.o
 obj-$(CONFIG_SND_SOC_CS53L30)	+= snd-soc-cs53l30.o
 obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
 obj-$(CONFIG_SND_SOC_DA7210)	+= snd-soc-da7210.o
sound/soc/codecs/cs47l35.c new file +1748 -0

1,748 lines not on this page · raw message

Signature · 1 line
2.11.0
#27 lore raw

PATCH v6 16/17 ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85

In reply to Richard Fitzgerald

Adds the codec driver for the CS47L85 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform.

---
 sound/soc/codecs/Kconfig   |    6 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/cs47l85.c | 2722 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2730 insertions(+)
 create mode 100644 sound/soc/codecs/cs47l85.c
sound/soc/codecs/Kconfig +6 -0
index 6e78f3dd23b8..164666cf3957 100644
@@ -64,6 +64,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_CS4349 if I2C
 	select SND_SOC_CS47L24 if MFD_CS47L24
 	select SND_SOC_CS47L35 if MFD_CS47L35
+	select SND_SOC_CS47L85 if MFD_CS47L85
 	select SND_SOC_CS53L30 if I2C
 	select SND_SOC_CX20442 if TTY
 	select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
@@ -508,6 +509,9 @@ config SND_SOC_CS47L24
 config SND_SOC_CS47L35
 	tristate
 
+config SND_SOC_CS47L85
+	tristate
+
 # Cirrus Logic Quad-Channel ADC
 config SND_SOC_CS53L30
 	tristate "Cirrus Logic CS53L30 CODEC"
@@ -600,7 +604,9 @@ config SND_SOC_LM49453
 config SND_SOC_MADERA
 	tristate
 	default y if SND_SOC_CS47L35=y
+	default y if SND_SOC_CS47L85=y
 	default m if SND_SOC_CS47L35=m
+	default m if SND_SOC_CS47L85=m
 
 config SND_SOC_MAX98088
        tristate
sound/soc/codecs/Makefile +2 -0
index 8d0b6ed5cd46..122f6d004b20 100644
@@ -58,6 +58,7 @@ snd-soc-cs43130-objs := cs43130.o
 snd-soc-cs4349-objs := cs4349.o
 snd-soc-cs47l24-objs := cs47l24.o
 snd-soc-cs47l35-objs := cs47l35.o
+snd-soc-cs47l85-objs := cs47l85.o
 snd-soc-cs53l30-objs := cs53l30.o
 snd-soc-cx20442-objs := cx20442.o
 snd-soc-da7210-objs := da7210.o
@@ -300,6 +301,7 @@ obj-$(CONFIG_SND_SOC_CS43130)   += snd-soc-cs43130.o
 obj-$(CONFIG_SND_SOC_CS4349)	+= snd-soc-cs4349.o
 obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
 obj-$(CONFIG_SND_SOC_CS47L35)	+= snd-soc-cs47l35.o
+obj-$(CONFIG_SND_SOC_CS47L85)	+= snd-soc-cs47l85.o
 obj-$(CONFIG_SND_SOC_CS53L30)	+= snd-soc-cs53l30.o
 obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
 obj-$(CONFIG_SND_SOC_DA7210)	+= snd-soc-da7210.o
sound/soc/codecs/cs47l85.c new file +2722 -0

2,722 lines not on this page · raw message

Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#28 lore raw

PATCH v6 17/17 ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90

In reply to Richard Fitzgerald

Adds the codec driver for the CS47L90 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform.

---
 sound/soc/codecs/Kconfig   |    6 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/cs47l90.c | 2661 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2669 insertions(+)
 create mode 100644 sound/soc/codecs/cs47l90.c
sound/soc/codecs/Kconfig +6 -0
index 164666cf3957..5da9c109c76d 100644
@@ -65,6 +65,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_CS47L24 if MFD_CS47L24
 	select SND_SOC_CS47L35 if MFD_CS47L35
 	select SND_SOC_CS47L85 if MFD_CS47L85
+	select SND_SOC_CS47L90 if MFD_CS47L90
 	select SND_SOC_CS53L30 if I2C
 	select SND_SOC_CX20442 if TTY
 	select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
@@ -512,6 +513,9 @@ config SND_SOC_CS47L35
 config SND_SOC_CS47L85
 	tristate
 
+config SND_SOC_CS47L90
+	tristate
+
 # Cirrus Logic Quad-Channel ADC
 config SND_SOC_CS53L30
 	tristate "Cirrus Logic CS53L30 CODEC"
@@ -605,8 +609,10 @@ config SND_SOC_MADERA
 	tristate
 	default y if SND_SOC_CS47L35=y
 	default y if SND_SOC_CS47L85=y
+	default y if SND_SOC_CS47L90=y
 	default m if SND_SOC_CS47L35=m
 	default m if SND_SOC_CS47L85=m
+	default m if SND_SOC_CS47L90=m
 
 config SND_SOC_MAX98088
        tristate
sound/soc/codecs/Makefile +2 -0
index 122f6d004b20..12265d243405 100644
@@ -59,6 +59,7 @@ snd-soc-cs4349-objs := cs4349.o
 snd-soc-cs47l24-objs := cs47l24.o
 snd-soc-cs47l35-objs := cs47l35.o
 snd-soc-cs47l85-objs := cs47l85.o
+snd-soc-cs47l90-objs := cs47l90.o
 snd-soc-cs53l30-objs := cs53l30.o
 snd-soc-cx20442-objs := cx20442.o
 snd-soc-da7210-objs := da7210.o
@@ -302,6 +303,7 @@ obj-$(CONFIG_SND_SOC_CS4349)	+= snd-soc-cs4349.o
 obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
 obj-$(CONFIG_SND_SOC_CS47L35)	+= snd-soc-cs47l35.o
 obj-$(CONFIG_SND_SOC_CS47L85)	+= snd-soc-cs47l85.o
+obj-$(CONFIG_SND_SOC_CS47L90)	+= snd-soc-cs47l90.o
 obj-$(CONFIG_SND_SOC_CS53L30)	+= snd-soc-cs53l30.o
 obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
 obj-$(CONFIG_SND_SOC_DA7210)	+= snd-soc-da7210.o
sound/soc/codecs/cs47l90.c new file +2661 -0

2,661 lines not on this page · raw message

Signature · 1 line
2.11.0