[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131017114208.595a4224@ipc1.ka-ro>
Date: Thu, 17 Oct 2013 11:42:08 +0200
From: Lothar Waßmann <LW@...O-electronics.de>
To: Xiubo Li <Li.Xiubo@...escale.com>
Cc: <r65073@...escale.com>, <timur@...i.org>, <lgirdwood@...il.com>,
<broonie@...nel.org>, <r64188@...escale.com>,
<rob.herring@...xeda.com>, <pawel.moll@....com>,
<mark.rutland@....com>, <swarren@...dotorg.org>,
<ian.campbell@...rix.com>, <rob@...dley.net>,
<linux@....linux.org.uk>, <perex@...ex.cz>, <tiwai@...e.de>,
<grant.likely@...aro.org>, <fabio.estevam@...escale.com>,
<oskar@...ra.com>, <shawn.guo@...aro.org>, <b42378@...escale.com>,
<b18965@...escale.com>, <devicetree@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<alsa-devel@...a-project.org>, <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.
Hi,
Xiubo Li <Li.Xiubo@...escale.com> wrote:
[...]
> diff --git a/sound/soc/fsl/fsl-pcm-dma.c b/sound/soc/fsl/fsl-pcm-dma.c
> new file mode 100644
> index 0000000..c4d925e
> --- /dev/null
> +++ b/sound/soc/fsl/fsl-pcm-dma.c
> @@ -0,0 +1,51 @@
[...]
> +
> +static int fsl_sai_probe(struct platform_device *pdev)
> +{
> + struct of_phandle_args dma_args;
> + int index;
> + struct resource *res;
> + struct fsl_sai *sai;
> + int ret = 0;
> + struct device_node *np = pdev->dev.of_node;
> +
> + sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL);
> + if (!sai)
> + return -ENOMEM;
> +
> + sai->fbt = FSL_SAI_FBT_MSB;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + sai->base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(sai->base)) {
> + ret = PTR_ERR(sai->base);
> + return ret;
>
could be:
return PTR_ERR(sai->base);
[...]
> +static const struct of_device_id fsl_sai_ids[] = {
> + { .compatible = "fsl,vf610-sai", },
> + { /*sentinel*/ },
>
The comma after the last entry in a struct initializer is there to make
patches that append another entry cleaner. Since this entry is and
always must be the last entry, the comma is useless here.
> diff --git a/sound/soc/fsl/fsl-sai.h b/sound/soc/fsl/fsl-sai.h
> new file mode 100644
> index 0000000..ab76a8e
> --- /dev/null
> +++ b/sound/soc/fsl/fsl-sai.h
> @@ -0,0 +1,127 @@
> +/*
> + * Copyright 2012-2013 Freescale Semiconductor, Inc.
> + *
> + * 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 __FSL_SAI_H
> +#define __FSL_SAI_H
> +
> +#include <sound/dmaengine_pcm.h>
> +
> +#define FSL_SAI_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
> + SNDRV_PCM_FMTBIT_S20_3LE |\
> + SNDRV_PCM_FMTBIT_S24_LE)
> +
> +#define FSL_SAI_DMABUF_SIZE (32 * 1024)
> +#define TCD_NUMBER 4
> +#define EDMA_PRIO_HIGH 6
> +
strange indentation with mixed spaces and tabs.
> +/* SAI Transmit and Recieve Configuration 2 Register */
> +#define SAI_TCR2 0x08
> +#define SAI_RCR2 0x88
> +#define SAI_CR2_SYNC BIT(30)
> +#define SAI_CR2_MSEL_MASK (0xff << 26)
> +#define SAI_CR2_MSEL_BUS 0
> +#define SAI_CR2_MSEL_MCLK1 BIT(26)
> +#define SAI_CR2_MSEL_MCLK2 BIT(27)
> +#define SAI_CR2_MSEL_MCLK3 (BIT(26)|BIT(27))
>
spaces around '|'?
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@...o-electronics.de
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists