Devicetree
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sarath Ganapathiraju <sarath.ganapathiraju@oss.qualcomm.com>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	 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>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	prasad.kumpatla@oss.qualcomm.com,
	 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH v2 3/3] ASoC: Add LPASS VA CSR heartbeat pulse clock
Date: Fri, 17 Jul 2026 11:02:41 +0200	[thread overview]
Message-ID: <20260717-outgoing-bold-tanuki-d4db9e@quoll> (raw)
In-Reply-To: <20260717-master-v2-3-ae200627ad62@oss.qualcomm.com>

On Fri, Jul 17, 2026 at 01:21:17AM +0530, Sarath Ganapathiraju wrote:
> The HeartBeat Pulse (also known as RateGen Pulse) synchronizes the
> start of the DMAs and Codec Interfaces for the audio usecases
> and can serve as a periodic wakeup source for the DSP.
> 
> Add the LPASS VA CSR driver that models the rate generator as a clock
> provider so it is enabled and disabled automatically alongside the
> other clocks during runtime PM resume and suspend.
> 
> Signed-off-by: Sarath Ganapathiraju <sarath.ganapathiraju@oss.qualcomm.com>
> ---
>  sound/soc/codecs/Kconfig        |  13 ++++
>  sound/soc/codecs/Makefile       |   2 +
>  sound/soc/codecs/lpass-va-csr.c | 143 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 158 insertions(+)
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 76e90144ea..5dbfa77d0e 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -2902,11 +2902,24 @@ config SND_SOC_LPASS_WSA_MACRO
>  	select SND_SOC_LPASS_MACRO_COMMON
>  	tristate "Qualcomm WSA Macro in LPASS(Low Power Audio SubSystem)"
>  
> +config SND_SOC_LPASS_VA_CSR
> +	depends on COMMON_CLK
> +	select REGMAP_MMIO
> +	tristate "Qualcomm LPASS VA CSR heartbeat pulse clock provider"
> +	help
> +	  Qualcomm LPASS VA CSR block contains the rate generator hardware
> +	  that produces the HeartBeat Pulse (also known as RateGen Pulse).
> +	  This driver models the rate generator as a clock provider so
> +	  that consumers can enable or disable it via the common clock
> +	  framework, and it can be used to synchronize the start of DMAs
> +	  and Codec Interfaces or as a periodic wakeup source for the DSP.
> +
>  config SND_SOC_LPASS_VA_MACRO
>  	depends on COMMON_CLK
>  	depends on PM_CLK
>  	select REGMAP_MMIO
>  	select SND_SOC_LPASS_MACRO_COMMON
> +	select SND_SOC_LPASS_VA_CSR
>  	tristate "Qualcomm VA Macro in LPASS(Low Power Audio SubSystem)"
>  
>  config SND_SOC_LPASS_RX_MACRO
> diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
> index aa0396e5b5..3e86c1bbf9 100644
> --- a/sound/soc/codecs/Makefile
> +++ b/sound/soc/codecs/Makefile
> @@ -163,6 +163,7 @@ snd-soc-lpass-rx-macro-y := lpass-rx-macro.o
>  snd-soc-lpass-tx-macro-y := lpass-tx-macro.o
>  snd-soc-lpass-wsa-macro-y := lpass-wsa-macro.o
>  snd-soc-lpass-va-macro-y := lpass-va-macro.o
> +snd-soc-lpass-va-csr-y := lpass-va-csr.o
>  snd-soc-madera-y := madera.o
>  snd-soc-max9759-y := max9759.o
>  snd-soc-max9768-y := max9768.o
> @@ -886,6 +887,7 @@ obj-$(CONFIG_SND_SOC_TPA6130A2)	+= snd-soc-tpa6130a2.o
>  obj-$(CONFIG_SND_SOC_LPASS_MACRO_COMMON)	+= snd-soc-lpass-macro-common.o
>  obj-$(CONFIG_SND_SOC_LPASS_WSA_MACRO)	+= snd-soc-lpass-wsa-macro.o
>  obj-$(CONFIG_SND_SOC_LPASS_VA_MACRO)	+= snd-soc-lpass-va-macro.o
> +obj-$(CONFIG_SND_SOC_LPASS_VA_CSR)	+= snd-soc-lpass-va-csr.o
>  obj-$(CONFIG_SND_SOC_LPASS_RX_MACRO)	+= snd-soc-lpass-rx-macro.o
>  obj-$(CONFIG_SND_SOC_LPASS_TX_MACRO)	+= snd-soc-lpass-tx-macro.o
>  
> diff --git a/sound/soc/codecs/lpass-va-csr.c b/sound/soc/codecs/lpass-va-csr.c
> new file mode 100644
> index 0000000000..1d0805789e
> --- /dev/null
> +++ b/sound/soc/codecs/lpass-va-csr.c
> @@ -0,0 +1,143 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
> + */
> +
> +#include <linux/clk-provider.h>
> +#include <linux/device.h>
> +#include <linux/module.h>
> +#include <linux/of_clk.h>
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>

Why a clock provider driver, which has nothing to do with ASoC and uses
nothing from the ASoC, is placed in ASoC directory?

No, this is really wrong interpretation of Linux subsystems.

Best regards,
Krzysztof


      reply	other threads:[~2026-07-17  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 19:51 [PATCH v2 0/3] ASoC: Add LPASS VA CSR HeartBeat pulse clock support Sarath Ganapathiraju via B4 Relay
2026-07-16 19:51 ` [PATCH v2 1/3] ASoC: dt-bindings: qcom,lpass-va-csr: Add HeartBeat pulse clock Sarath Ganapathiraju via B4 Relay
2026-07-17  9:00   ` Krzysztof Kozlowski
2026-07-16 19:51 ` [PATCH v2 2/3] ASoC: dt-bindings: qcom,lpass-va-macro: Add hawi heartbeatpulse clock Sarath Ganapathiraju via B4 Relay
2026-07-17  9:01   ` Krzysztof Kozlowski
2026-07-16 19:51 ` [PATCH v2 3/3] ASoC: Add LPASS VA CSR heartbeat pulse clock Sarath Ganapathiraju via B4 Relay
2026-07-17  9:02   ` Krzysztof Kozlowski [this message]

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=20260717-outgoing-bold-tanuki-d4db9e@quoll \
    --to=krzk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=prasad.kumpatla@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sarath.ganapathiraju@oss.qualcomm.com \
    --cc=srini@kernel.org \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --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