From: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] ASoC: atmel-i2s: add driver for the new Atmel I2S controller
Date: Tue, 29 Sep 2015 15:26:14 +0200 [thread overview]
Message-ID: <560A9176.9070007@atmel.com> (raw)
In-Reply-To: <9b9890682c47fd2669aeed529225ebf44eca5cf6.1443452274.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Le 28/09/2015 17:05, Cyrille Pitchen a écrit :
[...]
> + /* Get audio clocks to generate the I2S Master Clock (I2S_MCK) */
> + dev->aclk = devm_clk_get(&pdev->dev, "aclk");
> + dev->gclk = devm_clk_get(&pdev->dev, "gclk");
> + if (IS_ERR(dev->aclk) && IS_ERR(dev->gclk)) {
> + /* Master Mode not supported */
> + dev->aclk = NULL;
> + dev->gclk = NULL;
> + } else if (IS_ERR(dev->gclk)) {
> + err = PTR_ERR(dev->gclk);
> + dev_err(&pdev->dev,
> + "failed to get the PMC generated clock: %d\n", err);
> + return err;
> + } else if (IS_ERR(dev->aclk)) {
> + err = PTR_ERR(dev->aclk);
> + dev_err(&pdev->dev,
> + "failed to get the PLL audio clock: %d\n", err);
> + return err;
> + }
> +
> + /* Do hardware specific settings to initialize I2S_MCK generator */
> + if (dev->caps && dev->caps->mck_init) {
> + err = dev->caps->mck_init(dev, np);
> + if (err)
> + return err;
> + }
> +
> + /* Enable the peripheral clock. */
> + err = clk_prepare_enable(dev->pclk);
> + if (err)
> + return err;
> +
> + dev->dev = &pdev->dev;
> + dev->regmap = regmap;
> + platform_set_drvdata(pdev, dev);
those last 3 lines should be moved before calling dev->caps->mck_init(),
otherwise dev->dev would not be initialized yet if dev_err() is called by
atmel_i2s_sama5d2_mck_init().
Will be fixed in the next series.
[...]
--
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
WARNING: multiple messages have this Message-ID (diff)
From: cyrille.pitchen@atmel.com (Cyrille Pitchen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ASoC: atmel-i2s: add driver for the new Atmel I2S controller
Date: Tue, 29 Sep 2015 15:26:14 +0200 [thread overview]
Message-ID: <560A9176.9070007@atmel.com> (raw)
In-Reply-To: <9b9890682c47fd2669aeed529225ebf44eca5cf6.1443452274.git.cyrille.pitchen@atmel.com>
Le 28/09/2015 17:05, Cyrille Pitchen a ?crit :
[...]
> + /* Get audio clocks to generate the I2S Master Clock (I2S_MCK) */
> + dev->aclk = devm_clk_get(&pdev->dev, "aclk");
> + dev->gclk = devm_clk_get(&pdev->dev, "gclk");
> + if (IS_ERR(dev->aclk) && IS_ERR(dev->gclk)) {
> + /* Master Mode not supported */
> + dev->aclk = NULL;
> + dev->gclk = NULL;
> + } else if (IS_ERR(dev->gclk)) {
> + err = PTR_ERR(dev->gclk);
> + dev_err(&pdev->dev,
> + "failed to get the PMC generated clock: %d\n", err);
> + return err;
> + } else if (IS_ERR(dev->aclk)) {
> + err = PTR_ERR(dev->aclk);
> + dev_err(&pdev->dev,
> + "failed to get the PLL audio clock: %d\n", err);
> + return err;
> + }
> +
> + /* Do hardware specific settings to initialize I2S_MCK generator */
> + if (dev->caps && dev->caps->mck_init) {
> + err = dev->caps->mck_init(dev, np);
> + if (err)
> + return err;
> + }
> +
> + /* Enable the peripheral clock. */
> + err = clk_prepare_enable(dev->pclk);
> + if (err)
> + return err;
> +
> + dev->dev = &pdev->dev;
> + dev->regmap = regmap;
> + platform_set_drvdata(pdev, dev);
those last 3 lines should be moved before calling dev->caps->mck_init(),
otherwise dev->dev would not be initialized yet if dev_err() is called by
atmel_i2s_sama5d2_mck_init().
Will be fixed in the next series.
[...]
WARNING: multiple messages have this Message-ID (diff)
From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
To: <nicolas.ferre@atmel.com>, <broonie@kernel.org>,
<lgirdwood@gmail.com>, <alsa-devel@alsa-project.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <robh+dt@kernel.org>,
<devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/2] ASoC: atmel-i2s: add driver for the new Atmel I2S controller
Date: Tue, 29 Sep 2015 15:26:14 +0200 [thread overview]
Message-ID: <560A9176.9070007@atmel.com> (raw)
In-Reply-To: <9b9890682c47fd2669aeed529225ebf44eca5cf6.1443452274.git.cyrille.pitchen@atmel.com>
Le 28/09/2015 17:05, Cyrille Pitchen a écrit :
[...]
> + /* Get audio clocks to generate the I2S Master Clock (I2S_MCK) */
> + dev->aclk = devm_clk_get(&pdev->dev, "aclk");
> + dev->gclk = devm_clk_get(&pdev->dev, "gclk");
> + if (IS_ERR(dev->aclk) && IS_ERR(dev->gclk)) {
> + /* Master Mode not supported */
> + dev->aclk = NULL;
> + dev->gclk = NULL;
> + } else if (IS_ERR(dev->gclk)) {
> + err = PTR_ERR(dev->gclk);
> + dev_err(&pdev->dev,
> + "failed to get the PMC generated clock: %d\n", err);
> + return err;
> + } else if (IS_ERR(dev->aclk)) {
> + err = PTR_ERR(dev->aclk);
> + dev_err(&pdev->dev,
> + "failed to get the PLL audio clock: %d\n", err);
> + return err;
> + }
> +
> + /* Do hardware specific settings to initialize I2S_MCK generator */
> + if (dev->caps && dev->caps->mck_init) {
> + err = dev->caps->mck_init(dev, np);
> + if (err)
> + return err;
> + }
> +
> + /* Enable the peripheral clock. */
> + err = clk_prepare_enable(dev->pclk);
> + if (err)
> + return err;
> +
> + dev->dev = &pdev->dev;
> + dev->regmap = regmap;
> + platform_set_drvdata(pdev, dev);
those last 3 lines should be moved before calling dev->caps->mck_init(),
otherwise dev->dev would not be initialized yet if dev_err() is called by
atmel_i2s_sama5d2_mck_init().
Will be fixed in the next series.
[...]
next prev parent reply other threads:[~2015-09-29 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 15:05 [PATCH 0/2] ASoc: add driver for Atmel I2S controller Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
[not found] ` <cover.1443452274.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-09-28 15:05 ` [PATCH 1/2] ASoC: atmel-i2s: add DT bindings for " Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
2015-09-28 15:05 ` [PATCH 2/2] ASoC: atmel-i2s: add driver for the new Atmel " Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
2015-09-28 15:05 ` Cyrille Pitchen
[not found] ` <9b9890682c47fd2669aeed529225ebf44eca5cf6.1443452274.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-09-29 13:26 ` Cyrille Pitchen [this message]
2015-09-29 13:26 ` Cyrille Pitchen
2015-09-29 13:26 ` Cyrille Pitchen
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=560A9176.9070007@atmel.com \
--to=cyrille.pitchen-aife0yeh4naavxtiumwx3w@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.