devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Russell King <linux@armlinux.org.uk>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Chancel Liu <chancel.liu@nxp.com>, Arnd Bergmann <arnd@arndb.de>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs
Date: Tue, 11 Jun 2024 12:15:31 +0200	[thread overview]
Message-ID: <6cd2897f-a61d-4351-abac-714bae2ab154@kernel.org> (raw)
In-Reply-To: <20240611094810.27475-1-piotr.wojtaszczyk@timesys.com>

On 11/06/2024 11:47, Piotr Wojtaszczyk wrote:
> This driver was ported from an old version in linux 2.6.27 and adjusted
> for the new ASoC framework and DMA API.
> 
> Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
> ---
> Changes for v2:
> - Coding Style cleanup
> - Use dev_err_probe() for error handling in probe function
> - Removed unneded err_clk_disable label
> - Removed empty function
> - Droped of_match_ptr in lpc32xx_i2s_match DT match table
> - ASoC struct adjustmes for the latest 6.10-rc3 kernel
> 
>  MAINTAINERS                            |   7 +

1:
>  arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi |   4 +

2:
>  arch/arm/mach-lpc32xx/phy3250.c        |  60 ++++

3:
>  sound/soc/fsl/Kconfig                  |   7 +
>  sound/soc/fsl/Makefile                 |   2 +
>  sound/soc/fsl/lpc3xxx-i2s.c            | 383 +++++++++++++++++++++++++
>  sound/soc/fsl/lpc3xxx-i2s.h            |  94 ++++++
>  sound/soc/fsl/lpc3xxx-pcm.c            |  75 +++++

Three separate subsystems, so three separate patches.

>  8 files changed, 632 insertions(+)
>  create mode 100644 sound/soc/fsl/lpc3xxx-i2s.c
>  create mode 100644 sound/soc/fsl/lpc3xxx-i2s.h
>  create mode 100644 sound/soc/fsl/lpc3xxx-pcm.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index aacccb376c28..7616f61d6327 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8909,6 +8909,13 @@ S:	Maintained
>  F:	sound/soc/fsl/fsl*
>  F:	sound/soc/fsl/imx*
>  
> +FREESCALE SOC LPC32XX SOUND DRIVERS
> +M:	Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
> +L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
> +L:	linuxppc-dev@lists.ozlabs.org
> +S:	Orphan

Not sure if we want it in the first place. Why would we like to support
orphaned drivers? Sorry, if there is no one to care about it, then it
should not be merged.

...

> +
> +static int lpc32xx_i2s_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct lpc3xxx_i2s_info *i2s_info_p;
> +	struct resource *res;
> +	void __iomem *iomem;
> +	int ret;
> +
> +	i2s_info_p = devm_kzalloc(dev, sizeof(*i2s_info_p), GFP_KERNEL);
> +	if (!i2s_info_p)
> +		return -ENOMEM;
> +
> +	platform_set_drvdata(pdev, i2s_info_p);
> +	i2s_info_p->dev = dev;
> +
> +	iomem = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> +	if (IS_ERR(iomem))
> +		return dev_err_probe(dev, PTR_ERR(iomem), "Can't map registers\n");
> +
> +	i2s_info_p->regs = devm_regmap_init_mmio(dev, iomem, &lpc32xx_i2s_regconfig);
> +	if (IS_ERR(i2s_info_p->regs))
> +		return dev_err_probe(dev, PTR_ERR(i2s_info_p->regs),
> +				     "failed to init register map: %d\n", ret);
> +
> +	i2s_info_p->clk = devm_clk_get(dev, "i2s_clk");
> +	if (IS_ERR(i2s_info_p->clk))
> +		return dev_err_probe(dev, PTR_ERR(i2s_info_p->clk), "Can't get clock\n");
> +
> +	i2s_info_p->clkrate = clk_get_rate(i2s_info_p->clk);
> +	if (i2s_info_p->clkrate == 0)
> +		return dev_err_probe(dev, -EINVAL, "Invalid returned clock rate\n");
> +
> +	mutex_init(&i2s_info_p->lock);
> +
> +	ret = devm_snd_soc_register_component(dev, &lpc32xx_i2s_component,
> +					      &lpc3xxx_i2s_dai_driver, 1);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "Can't register cpu_dai component\n");
> +
> +	i2s_info_p->playback_dma_config.addr = (dma_addr_t)(res->start + I2S_TX_FIFO);
> +	i2s_info_p->playback_dma_config.maxburst = 4;
> +	i2s_info_p->playback_dma_config.filter_data = "i2s-tx";
> +	i2s_info_p->capture_dma_config.addr = (dma_addr_t)(res->start + I2S_RX_FIFO);
> +	i2s_info_p->capture_dma_config.maxburst = 4;
> +	i2s_info_p->capture_dma_config.filter_data = "i2s-rx";
> +
> +	ret = lpc3xxx_pcm_register(pdev);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "Can't register pcm component\n");
> +
> +	return 0;
> +}
> +
> +static int lpc32xx_i2s_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}

You did not respond to comment about this. Drop.


Best regards,
Krzysztof


  parent reply	other threads:[~2024-06-11 10:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[PATCH] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs>
2024-06-11  9:47 ` [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs Piotr Wojtaszczyk
2024-06-11  9:47   ` [Patch v2 2/2] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding Piotr Wojtaszczyk
2024-06-11 10:18     ` Krzysztof Kozlowski
2024-06-12  8:02       ` Piotr Wojtaszczyk
2024-06-13  6:11         ` Krzysztof Kozlowski
2024-06-11 10:37     ` Mark Brown
2024-06-11 10:45     ` Krzysztof Kozlowski
2024-06-12  8:06       ` Piotr Wojtaszczyk
2024-06-13  6:11         ` Krzysztof Kozlowski
2024-06-11 11:31     ` Rob Herring (Arm)
2024-06-11 10:15   ` Krzysztof Kozlowski [this message]
2024-06-12  7:48     ` [Patch v2 1/2] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs Piotr Wojtaszczyk
2024-06-11 10:36   ` Mark Brown
2024-06-12  7:54     ` Piotr Wojtaszczyk
2024-06-14 16:24     ` Piotr Wojtaszczyk
2024-06-14 16:42       ` Mark Brown
2024-06-14 16:46         ` Piotr Wojtaszczyk
2024-06-14 16:51           ` Mark Brown
2024-06-14 16:34   ` [PATCH v3 0/4] Add audio support for LPC32XX CPUs Piotr Wojtaszczyk
2024-06-14 16:34     ` [PATCH v3 1/4] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding Piotr Wojtaszczyk
2024-06-15 10:01       ` Krzysztof Kozlowski
2024-06-17  9:33         ` Piotr Wojtaszczyk
2024-06-17 12:14           ` Krzysztof Kozlowski
2024-06-17 14:04             ` Piotr Wojtaszczyk
2024-06-17 15:48               ` Krzysztof Kozlowski
2024-06-17 16:30                 ` Piotr Wojtaszczyk
2024-06-14 16:34     ` [PATCH v3 2/4] ARM: dts: lpc32xx: Add missing properties for the i2s interfaces Piotr Wojtaszczyk
2024-06-14 16:34     ` [PATCH v3 3/4] ARM: lpc32xx: Add pl08x virtual dma channels for spi and i2s Piotr Wojtaszczyk
2024-06-14 16:34     ` [PATCH v3 4/4] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs Piotr Wojtaszczyk
2024-06-17 19:30       ` Markus Elfring
2024-06-18  7:45         ` Piotr Wojtaszczyk
2024-06-14 16:43     ` [PATCH v3 0/4] Add audio support for LPC32XX CPUs Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cd2897f-a61d-4351-abac-714bae2ab154@kernel.org \
    --to=krzk@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=chancel.liu@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=perex@perex.cz \
    --cc=piotr.wojtaszczyk@timesys.com \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).