mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: joakim.zhang@cixtech.com
Cc: lgirdwood@gmail.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, perex@perex.cz, tiwai@suse.com,
	p.zabel@pengutronix.de, cix-kernel-upstream@cixtech.com,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] ASoC: cdns: Add Cadence I2S-SC controller driver
Date: Tue, 22 Sep 2026 16:34:30 +0200	[thread overview]
Message-ID: <arKR9oIjbrTM9fTS@sirena.co.uk> (raw)
In-Reply-To: <20260922112134.4167305-3-joakim.zhang@cixtech.com>

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

On Tue, Sep 22, 2026 at 07:21:32PM +0800, joakim.zhang@cixtech.com wrote:
> From: Joakim Zhang <joakim.zhang@cixtech.com>
> 
> Add support for the Cadence I2S-SC controller found in the CIX SKY1
> audio subsystem.

>  
>  obj-$(CONFIG_SND_SOC)	+= snd-soc-core.o
> +obj-$(CONFIG_SND_SOC)	+= cdns/
>  obj-$(CONFIG_SND_SOC)	+= codecs/

This should be sorted in with the vendors, after bcm.

> +++ b/sound/soc/cdns/Makefile
> @@ -0,0 +1,4 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +obj-$(CONFIG_SND_SOC_CDNS_I2S_SC) += snd-soc-cdns-i2s-sc.o
> +snd-soc-cdns-i2s-sc-objs := cdns-i2s-sc.o

We've moved to module-y for module objects.

> +static int cdns_i2s_sc_probe(struct platform_device *pdev)
> +{
> +	struct cdns_i2s_sc_priv *i2s_sc_priv;
> +	struct resource *res;
> +	void __iomem *base;
> +	int i, irq, ret;

> +	ret = devm_request_irq(&pdev->dev, irq, cdns_i2s_sc_isr, 0,
> +			       dev_name(&pdev->dev), i2s_sc_priv);
> +	if (ret) {
> +		dev_err(&pdev->dev, "Failed to request irq: %d\n", ret);
> +		return ret;
> +	}

We request the interrupt before we enable clocks or anything, an
interrupt could be delivered as soon as we do the request and the
handler will try to interact with the hardware which I imagine might go
badly if it's unclocked or in reset (at least for some integrations).
It's generally easier to make this one of the last thing we do in probe,
once most things are ready.

> +static void cdns_i2s_sc_remove(struct platform_device *pdev)
> +{
> +	if (!pm_runtime_status_suspended(&pdev->dev))
> +		pm_runtime_force_suspend(&pdev->dev);
> +	pm_runtime_disable(&pdev->dev);
> +}

For CONFIG_PM=n forcing suspend won't do what you want, and when it's
enabled it'll also disable.  devm_pm_runtime_enable() might be easier.

> +static const struct dev_pm_ops cdns_i2s_sc_pm_ops = {
> +	SET_RUNTIME_PM_OPS(cdns_i2s_sc_runtime_suspend,
> +			   cdns_i2s_sc_runtime_resume, NULL)
> +	SET_SYSTEM_SLEEP_PM_OPS(cdns_i2s_sc_system_suspend,
> +				cdns_i2s_sc_system_resume)
> +};


RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() are the more modern things,
and avoid the need for __maybe_unused.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-09-22 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 11:21 [PATCH 0/4] ASoC: Add Cadence I2S-SC and I2S-MC controller support joakim.zhang
2026-09-22 11:21 ` [PATCH 1/4] ASoC: dt-bindings: Add Cadence I2S-SC controller joakim.zhang
2026-09-22 14:23   ` Mark Brown
2026-09-24  7:33     ` Joakim  Zhang (张强庆)
2026-09-22 15:35   ` Rob Herring (Arm)
2026-09-22 11:21 ` [PATCH 2/4] ASoC: cdns: Add Cadence I2S-SC controller driver joakim.zhang
2026-09-22 14:34   ` Mark Brown [this message]
2026-09-24 10:41     ` Joakim  Zhang (张强庆)
2026-09-22 11:21 ` [PATCH 3/4] ASoC: dt-bindings: Add Cadence I2S-MC controller joakim.zhang
2026-09-22 15:35   ` Rob Herring (Arm)
2026-09-22 11:21 ` [PATCH 4/4] ASoC: cdns: Add Cadence I2S-MC controller driver joakim.zhang
2026-09-22 15:01   ` Uwe Kleine-König
2026-09-24 10:41     ` Joakim  Zhang (张强庆)
2026-09-23  5:25   ` Chancel Liu
2026-09-24 10:43     ` Joakim  Zhang (张强庆)

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=arKR9oIjbrTM9fTS@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=cix-kernel-upstream@cixtech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joakim.zhang@cixtech.com \
    --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=p.zabel@pengutronix.de \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®