All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv6 0/2] Motorola Droid 4 Audio Support
@ 2018-03-30 12:58 Sebastian Reichel
  2018-03-30 12:58 ` [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec Sebastian Reichel
  2018-03-30 12:58 ` [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support Sebastian Reichel
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Reichel @ 2018-03-30 12:58 UTC (permalink / raw)
  To: Sebastian Reichel, Lee Jones, Rob Herring
  Cc: Tony Lindgren, Pavel Machek, linux-omap, devicetree,
	linux-kernel, kernel, Sebastian Reichel

Hi,

This adds audio support to Motorola Droid 4. I dropped
all patches, that have been applied and collected all
Reviewed-by & Acked-by for the remaining ones. Also I
changed the binding to use relative paths.

-- Sebastian

Sebastian Reichel (2):
  dt-bindings: mfd: motorola-cpcap: document audio-codec
  mfd: motorola-cpcap: Add audio-codec support

 .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++
 drivers/mfd/motorola-cpcap.c                       | 51 +++++++++++++++++++++-
 2 files changed, 92 insertions(+), 1 deletion(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec
  2018-03-30 12:58 [PATCHv6 0/2] Motorola Droid 4 Audio Support Sebastian Reichel
@ 2018-03-30 12:58 ` Sebastian Reichel
  2018-04-03  8:51   ` Pavel Machek
  2018-04-16 12:58   ` Lee Jones
  2018-03-30 12:58 ` [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support Sebastian Reichel
  1 sibling, 2 replies; 6+ messages in thread
From: Sebastian Reichel @ 2018-03-30 12:58 UTC (permalink / raw)
  To: Sebastian Reichel, Lee Jones, Rob Herring
  Cc: Tony Lindgren, Pavel Machek, linux-omap, devicetree,
	linux-kernel, kernel, Sebastian Reichel

This adds the DT binding for the audio-codec sub-module found
inside the Motorola CPCAP PMIC.

Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
index 15bc885f9df4..c639705a98ef 100644
--- a/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
+++ b/Documentation/devicetree/bindings/mfd/motorola-cpcap.txt
@@ -12,6 +12,30 @@ Required properties:
 - spi-max-frequency	: Typically set to 3000000
 - spi-cs-high		: SPI chip select direction
 
+Optional subnodes:
+
+The sub-functions of CPCAP get their own node with their own compatible values,
+which are described in the following files:
+
+- ../power/supply/cpcap-battery.txt
+- ../power/supply/cpcap-charger.txt
+- ../regulator/cpcap-regulator.txt
+- ../phy/phy-cpcap-usb.txt
+- ../input/cpcap-pwrbutton.txt
+- ../rtc/cpcap-rtc.txt
+- ../leds/leds-cpcap.txt
+- ../iio/adc/cpcap-adc.txt
+
+The only exception is the audio codec. Instead of a compatible value its
+node must be named "audio-codec".
+
+Required properties for the audio-codec subnode:
+
+- #sound-dai-cells = <1>;
+
+The audio-codec provides two DAIs. The first one is connected to the
+Stereo HiFi DAC and the second one is connected to the Voice DAC.
+
 Example:
 
 &mcspi1 {
@@ -26,6 +50,24 @@ Example:
 		#size-cells = <0>;
 		spi-max-frequency = <3000000>;
 		spi-cs-high;
+
+		audio-codec {
+			#sound-dai-cells = <1>;
+
+			/* HiFi */
+			port@0 {
+				endpoint {
+					remote-endpoint = <&cpu_dai1>;
+				};
+			};
+
+			/* Voice */
+			port@1 {
+				endpoint {
+					remote-endpoint = <&cpu_dai2>;
+				};
+			};
+		};
 	};
 };
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support
  2018-03-30 12:58 [PATCHv6 0/2] Motorola Droid 4 Audio Support Sebastian Reichel
  2018-03-30 12:58 ` [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec Sebastian Reichel
@ 2018-03-30 12:58 ` Sebastian Reichel
  2018-04-16 12:58   ` Lee Jones
  1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Reichel @ 2018-03-30 12:58 UTC (permalink / raw)
  To: Sebastian Reichel, Lee Jones, Rob Herring
  Cc: Tony Lindgren, Pavel Machek, linux-omap, devicetree,
	linux-kernel, kernel, Sebastian Reichel

From: Sebastian Reichel <sre@kernel.org>

Add support for the audio-codec node by converting from
devm_of_platform_populate() to devm_mfd_add_devices().

Tested-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 drivers/mfd/motorola-cpcap.c | 51 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
index d2cc1eabac05..f6c79a4ccb55 100644
--- a/drivers/mfd/motorola-cpcap.c
+++ b/drivers/mfd/motorola-cpcap.c
@@ -18,6 +18,7 @@
 #include <linux/regmap.h>
 #include <linux/sysfs.h>
 
+#include <linux/mfd/core.h>
 #include <linux/mfd/motorola-cpcap.h>
 #include <linux/spi/spi.h>
 
@@ -216,6 +217,53 @@ static const struct regmap_config cpcap_regmap_config = {
 	.val_format_endian = REGMAP_ENDIAN_LITTLE,
 };
 
+static const struct mfd_cell cpcap_mfd_devices[] = {
+	{
+		.name          = "cpcap_adc",
+		.of_compatible = "motorola,mapphone-cpcap-adc",
+	}, {
+		.name          = "cpcap_battery",
+		.of_compatible = "motorola,cpcap-battery",
+	}, {
+		.name          = "cpcap-charger",
+		.of_compatible = "motorola,mapphone-cpcap-charger",
+	}, {
+		.name          = "cpcap-regulator",
+		.of_compatible = "motorola,mapphone-cpcap-regulator",
+	}, {
+		.name          = "cpcap-rtc",
+		.of_compatible = "motorola,cpcap-rtc",
+	}, {
+		.name          = "cpcap-pwrbutton",
+		.of_compatible = "motorola,cpcap-pwrbutton",
+	}, {
+		.name          = "cpcap-usb-phy",
+		.of_compatible = "motorola,mapphone-cpcap-usb-phy",
+	}, {
+		.name          = "cpcap-led",
+		.id            = 0,
+		.of_compatible = "motorola,cpcap-led-red",
+	}, {
+		.name          = "cpcap-led",
+		.id            = 1,
+		.of_compatible = "motorola,cpcap-led-green",
+	}, {
+		.name          = "cpcap-led",
+		.id            = 2,
+		.of_compatible = "motorola,cpcap-led-blue",
+	}, {
+		.name          = "cpcap-led",
+		.id            = 3,
+		.of_compatible = "motorola,cpcap-led-adl",
+	}, {
+		.name          = "cpcap-led",
+		.id            = 4,
+		.of_compatible = "motorola,cpcap-led-cp",
+	}, {
+		.name          = "cpcap-codec",
+	}
+};
+
 static int cpcap_probe(struct spi_device *spi)
 {
 	const struct of_device_id *match;
@@ -260,7 +308,8 @@ static int cpcap_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
-	return devm_of_platform_populate(&cpcap->spi->dev);
+	return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices,
+				    ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL);
 }
 
 static struct spi_driver cpcap_driver = {
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec
  2018-03-30 12:58 ` [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec Sebastian Reichel
@ 2018-04-03  8:51   ` Pavel Machek
  2018-04-16 12:58   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2018-04-03  8:51 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sebastian Reichel, Lee Jones, Rob Herring, Tony Lindgren,
	linux-omap, devicetree, linux-kernel, kernel

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Fri 2018-03-30 14:58:23, Sebastian Reichel wrote:
> This adds the DT binding for the audio-codec sub-module found
> inside the Motorola CPCAP PMIC.
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> Acked-by: Tony Lindgren <tony@atomide.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

Reviewed-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec
  2018-03-30 12:58 ` [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec Sebastian Reichel
  2018-04-03  8:51   ` Pavel Machek
@ 2018-04-16 12:58   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2018-04-16 12:58 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sebastian Reichel, Rob Herring, Tony Lindgren, Pavel Machek,
	linux-omap, devicetree, linux-kernel, kernel

On Fri, 30 Mar 2018, Sebastian Reichel wrote:

> This adds the DT binding for the audio-codec sub-module found
> inside the Motorola CPCAP PMIC.
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> Acked-by: Tony Lindgren <tony@atomide.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  .../devicetree/bindings/mfd/motorola-cpcap.txt     | 42 ++++++++++++++++++++++
>  1 file changed, 42 insertions(+)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support
  2018-03-30 12:58 ` [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support Sebastian Reichel
@ 2018-04-16 12:58   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2018-04-16 12:58 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Sebastian Reichel, Rob Herring, Tony Lindgren, Pavel Machek,
	linux-omap, devicetree, linux-kernel, kernel

On Fri, 30 Mar 2018, Sebastian Reichel wrote:

> From: Sebastian Reichel <sre@kernel.org>
> 
> Add support for the audio-codec node by converting from
> devm_of_platform_populate() to devm_mfd_add_devices().
> 
> Tested-by: Pavel Machek <pavel@ucw.cz>
> Acked-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> ---
>  drivers/mfd/motorola-cpcap.c | 51 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 50 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-16 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 12:58 [PATCHv6 0/2] Motorola Droid 4 Audio Support Sebastian Reichel
2018-03-30 12:58 ` [PATCHv6 1/2] dt-bindings: mfd: motorola-cpcap: document audio-codec Sebastian Reichel
2018-04-03  8:51   ` Pavel Machek
2018-04-16 12:58   ` Lee Jones
2018-03-30 12:58 ` [PATCHv6 2/2] mfd: motorola-cpcap: Add audio-codec support Sebastian Reichel
2018-04-16 12:58   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.