From: Lars-Peter Clausen <lars@metafoo.de>
To: Jun Nie <jun.nie@linaro.org>, broonie@kernel.org, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, shawn.guo@linaro.org, wan.zhijun@zte.com.cn
Subject: Re: [PATCH v3 4/6] ASoC: zx: Add zx296702 SPDIF support
Date: Fri, 29 May 2015 16:03:38 +0200 [thread overview]
Message-ID: <556871BA.3030408@metafoo.de> (raw)
In-Reply-To: <1432906281-27698-5-git-send-email-jun.nie@linaro.org>
On 05/29/2015 03:31 PM, Jun Nie wrote:
[...]
> +static int zx_spdif_probe(struct platform_device *pdev)
> +{
> + struct resource *res;
> + struct zx_spdif_info *zx_spdif;
> + int ret;
> +
> + zx_spdif = kzalloc(sizeof(*zx_spdif), GFP_KERNEL);
extra space and devm_
> + if (!zx_spdif)
> + return -ENOMEM;
> +
> + zx_spdif->dai_clk = devm_clk_get(&pdev->dev, "tx");
> + if (IS_ERR(zx_spdif->dai_clk)) {
> + dev_err(&pdev->dev, "Fail to get clk\n");
> + return PTR_ERR(zx_spdif->dai_clk);
> + }
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + zx_spdif->mapbase = res->start;
> + zx_spdif->reg_base = devm_ioremap_resource(&pdev->dev, res);
> + if (!zx_spdif->reg_base) {
> + dev_err(&pdev->dev, "ioremap failed!\n");
> + return -EIO;
> + }
> +
> + zx_spdif_dev_init(zx_spdif->reg_base);
> + platform_set_drvdata(pdev, zx_spdif);
> +
> + ret = snd_soc_register_component(&pdev->dev, &zx_spdif_component,
> + &zx_spdif_dai, 1);
devm_
> + if (ret) {
> + dev_err(&pdev->dev, "Register DAI failed: %d\n", ret);
> + return ret;
> + }
> +
> + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
> + if (ret)
> + dev_err(&pdev->dev, "Register platform PCM failed: %d\n", ret);
> +
> + return ret;
next prev parent reply other threads:[~2015-05-29 14:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 13:31 [PATCH v3 0/6] Support ZTE zx296702 SPDIF/I2S Jun Nie
2015-05-29 13:31 ` [PATCH v3 1/6] dt: Add documentation for the ZTE SPDIF controller Jun Nie
2015-05-29 13:31 ` [PATCH v3 2/6] dt: Add documentation for the ZTE I2S controller Jun Nie
2015-05-29 13:31 ` [PATCH v3 3/6] dt: Add doc for the ZTE HDMI audio codec binding Jun Nie
2015-05-29 13:31 ` [PATCH v3 4/6] ASoC: zx: Add zx296702 SPDIF support Jun Nie
2015-05-29 14:03 ` Lars-Peter Clausen [this message]
2015-05-29 13:31 ` [PATCH v3 5/6] ASoC: zx: Add ZTE zx296702 I2S DAI driver Jun Nie
2015-06-03 16:02 ` Mark Brown
2015-05-29 13:31 ` [PATCH v3 6/6] ASoC: zx: add zx296702 hdmi codec Jun Nie
2015-05-29 14:10 ` Lars-Peter Clausen
2015-05-29 15:18 ` Mark Brown
2015-06-01 1:42 ` Jun Nie
2015-06-02 18:13 ` Mark Brown
2015-06-03 1:47 ` Jun Nie
2015-06-03 11:01 ` Mark Brown
2015-06-03 12:40 ` Jun Nie
2015-06-03 15:09 ` Mark Brown
2015-06-03 17:58 ` Mark Brown
2015-06-04 3:35 ` Jun Nie
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=556871BA.3030408@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jun.nie@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=wan.zhijun@zte.com.cn \
/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).