Re: [PATCH v3 2/2] ASoC: fsl: add imx-es8328 machine driver
From: Mark Rutland <hidden>
Date: 2014-06-17 16:07:00
Also in:
alsa-devel
On Tue, Jun 17, 2014 at 10:32:51AM +0100, Sean Cross wrote:
quoted hunk
This adds an initial machine driver for the ES8328 audio codec. The driver supports headphones, an audio regulator for both the codec itself and a speaker amp, and supports reparenting and adjusting clocks to supply the audio codec with the unusual frequency it requires. Signed-off-by: Sean Cross <redacted> --- .../devicetree/bindings/sound/imx-audio-es8328.txt | 60 ++++ sound/soc/fsl/Kconfig | 14 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/imx-es8328.c | 359 +++++++++++++++++++++ 4 files changed, 435 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/imx-audio-es8328.txt create mode 100644 sound/soc/fsl/imx-es8328.cdiff --git a/Documentation/devicetree/bindings/sound/imx-audio-es8328.txt b/Documentation/devicetree/bindings/sound/imx-audio-es8328.txt new file mode 100644 index 0000000..bd614a6 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audio-es8328.txt@@ -0,0 +1,60 @@ +Freescale i.MX audio complex with ES8328 codec + +Required properties: +- compatible : "fsl,imx-audio-es8328" +- model : The user-visible name of this sound complex +- clocks : A list of clocks required to run the codec at 22.5792 MHz
The driver seems to acquire these by name. Please document the names you expect. [...]
+static int imx_es8328_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ struct device_node *ssi_np, *codec_np;
+ struct platform_device *ssi_pdev;
+ struct imx_es8328_data *data;
+ int int_port, ext_port;
+ int ret;
+ struct device *dev = &pdev->dev;
+
+ ret = of_property_read_u32(np, "mux-int-port", &int_port);I see int_port is defined as an int; please make it a u32 to match the prototype of of_property_read_u32.
+ if (ret) {
+ dev_err(&pdev->dev, "mux-int-port missing or invalid\n");
+ return ret;
+ }
+ ret = of_property_read_u32(np, "mux-ext-port", &ext_port);
+ if (ret) {
+ dev_err(&pdev->dev, "mux-ext-port missing or invalid\n");
+ return ret;
+ }As with int_port, please define ext_port as a u32. Cheers, Mark. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html