devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-samsung-soc@vger.kernel.org, ckeepax@opensource.cirrus.com,
	b.zolnierkie@samsung.com, sbkim73@samsung.com,
	patches@opensource.cirrus.com, lgirdwood@gmail.com,
	robh+dt@kernel.org, broonie@kernel.org,
	linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com
Subject: Re: [PATCH v1 2/9] mfd: wm8994: Add support for MCLKn clock control
Date: Thu, 19 Sep 2019 09:59:24 +0200	[thread overview]
Message-ID: <20190919075924.GB13195@pi3> (raw)
In-Reply-To: <20190918104634.15216-3-s.nawrocki@samsung.com>

On Wed, Sep 18, 2019 at 12:46:27PM +0200, Sylwester Nawrocki wrote:
> The WM1811/WM8994/WM8958 audio CODEC DT bindings specify two optional
> clocks: "MCLK1", "MCLK2". Add code for getting those clocks in the MFD
> part of the wm8994 driver so they can be further handled in the audio
> CODEC part.

I think these are needed only for the codec so how about getting them in
codec's probe?

Best regards,
Krzysztof


> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  drivers/mfd/wm8994-core.c       | 9 +++++++++
>  include/linux/mfd/wm8994/core.h | 9 +++++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
> index 1e9fe7d92597..02c19a0bdeb0 100644
> --- a/drivers/mfd/wm8994-core.c
> +++ b/drivers/mfd/wm8994-core.c
> @@ -7,6 +7,7 @@
>   * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
>   */
>  
> +#include <linux/clk.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/slab.h>
> @@ -333,6 +334,14 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
>  
>  	dev_set_drvdata(wm8994->dev, wm8994);
>  
> +	wm8994->mclk[WM8994_MCLK1].id = "MCLK1";
> +	wm8994->mclk[WM8994_MCLK2].id = "MCLK2";
> +
> +	ret = devm_clk_bulk_get_optional(wm8994->dev, ARRAY_SIZE(wm8994->mclk),
> +					 wm8994->mclk);
> +	if (ret != 0)
> +		return ret;
> +
>  	/* Add the on-chip regulators first for bootstrapping */
>  	ret = mfd_add_devices(wm8994->dev, 0,
>  			      wm8994_regulator_devs,
> diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h
> index e8b093522ffd..320297a1b70c 100644
> --- a/include/linux/mfd/wm8994/core.h
> +++ b/include/linux/mfd/wm8994/core.h
> @@ -10,12 +10,19 @@
>  #ifndef __MFD_WM8994_CORE_H__
>  #define __MFD_WM8994_CORE_H__
>  
> +#include <linux/clk.h>
>  #include <linux/mutex.h>
>  #include <linux/interrupt.h>
>  #include <linux/regmap.h>
>  
>  #include <linux/mfd/wm8994/pdata.h>
>  
> +enum {
> +	WM8994_MCLK1,
> +	WM8994_MCLK2,
> +	WM8994_NUM_MCLK
> +};
> +
>  enum wm8994_type {
>  	WM8994 = 0,
>  	WM8958 = 1,
> @@ -60,6 +67,8 @@ struct wm8994 {
>  	struct device *dev;
>  	struct regmap *regmap;
>  
> +	struct clk_bulk_data mclk[WM8994_NUM_MCLK];
> +
>  	bool ldo_ena_always_driven;
>  
>  	int gpio_base;
> -- 
> 2.17.1
> 

  parent reply	other threads:[~2019-09-19  7:59 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190918104650eucas1p2288b0b7e8081e872c4f181cb5ca8ba0d@eucas1p2.samsung.com>
2019-09-18 10:46 ` [PATCH v1 0/9] Basic sound support for Arndale board / wm8994 updates Sylwester Nawrocki
2019-09-18 10:46   ` [PATCH v1 1/9] ASoC: wm8994: Do not register inapplicable controls for WM1811 Sylwester Nawrocki
2019-09-18 12:51     ` Charles Keepax
2019-09-19  7:38     ` Krzysztof Kozlowski
2019-09-18 10:46   ` [PATCH v1 2/9] mfd: wm8994: Add support for MCLKn clock control Sylwester Nawrocki
2019-09-18 10:59     ` Sylwester Nawrocki
2019-09-18 12:54       ` Charles Keepax
2019-09-18 13:36         ` Sylwester Nawrocki
2019-09-19  7:59     ` Krzysztof Kozlowski [this message]
2019-09-19 12:48       ` Sylwester Nawrocki
2019-09-19 13:07         ` Krzysztof Kozlowski
2019-09-19 12:50       ` Mark Brown
2019-09-19 14:31         ` Charles Keepax
2019-09-19 14:33           ` Mark Brown
2019-09-18 10:46   ` [PATCH v1 3/9] ASoC: wm8994: Add support for setting MCLKn clock rate Sylwester Nawrocki
2019-09-18 13:51     ` Charles Keepax
2019-09-19  8:00     ` Krzysztof Kozlowski
2019-09-18 10:46   ` [PATCH v1 4/9] ASoC: wm8994: Add support for MCLKn clock gating Sylwester Nawrocki
2019-09-18 14:31     ` Charles Keepax
2019-09-19 11:58       ` Sylwester Nawrocki
2019-09-19 14:33         ` Charles Keepax
2019-09-18 10:46   ` [PATCH v1 5/9] ASoC: samsung: arndale: Simplify DAI link initialization Sylwester Nawrocki
2019-09-18 14:33     ` Charles Keepax
2019-09-19  8:01     ` Krzysztof Kozlowski
2019-09-18 10:46   ` [PATCH v1 6/9] ASoC: dt-bindings: Document "samsung,arndale-wm1811" compatible Sylwester Nawrocki
2019-09-19  8:02     ` Krzysztof Kozlowski
2019-09-18 10:46   ` [PATCH v1 7/9] ASoC: samsung: arndale: Add support for WM1811 CODEC Sylwester Nawrocki
2019-09-18 14:45     ` Charles Keepax
2019-09-19 12:00       ` Sylwester Nawrocki
2019-09-18 10:46   ` [PATCH v1 8/9] ASoC: samsung: arndale: Add missing OF node dereferencing Sylwester Nawrocki
2019-09-18 14:51     ` Charles Keepax
2019-09-19  8:22     ` Krzysztof Kozlowski
2019-09-19 12:49       ` Sylwester Nawrocki
2019-09-19 12:58         ` Krzysztof Kozlowski
2019-09-19 13:31           ` [alsa-devel] " Sylwester Nawrocki
2019-09-18 10:46   ` [PATCH v1 9/9] ARM: dts: arndale: Add audio support (WM1811 CODEC boards) Sylwester Nawrocki
2019-09-19  8:26     ` Krzysztof Kozlowski

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=20190919075924.GB13195@pi3 \
    --to=krzk@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=patches@opensource.cirrus.com \
    --cc=robh+dt@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sbkim73@samsung.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).