Add LPASS VA CSR HeartBeat pulse clock support
v11 cover Add LPASS VA CSR HeartBeat pulse clock support
The LPASS VA CSR block contains rate generator hardware that produces a HeartBeat Pulse (also known as RateGen Pulse). This 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.
This series adds the DT binding and driver support to model this rate generator as a clock provider.
Patch 1 adds the YAML binding for the new qcom,hawi-lpass-va-csr clock provider node under Documentation/devicetree/bindings/clock/.
Patch 2 adds the lpass-va-csr driver under drivers/clk/qcom that registers the lpass_heartbeat_pulse clock and enables/disables the rate generator via regmap when the clock consumer requests it.
Changes in v11:
- Rebase the series on linux-next next-20261009.
- Drop the custom heartbeat prepare/unprepare callbacks and rely on CCF provider runtime PM handling (Ajay).
- Restore the rate generator counter and delay registers from the
runtime resume callback after the LPASS vote clocks are enabled
(Sashiko).
- Add an of_device_get_match_data() NULL guard (Sashiko).
- Link to v10: https://patch.msgid.link/[email protected]
Changes in v10:
- Rebase the series on linux-next next-20260929.
- Add clk_is_enabled_regmap() to report the heartbeat gate state for clk_disable_unused() (Sashiko).
- Add Rob's Reviewed-by tag to the binding patch.
- Link to v9: https://patch.msgid.link/[email protected]
Changes in v9:
- Rebase the series on linux-next next-20260928.
- Add runtime PM callbacks so the LPASS LPR and audio vote clocks are enabled by pm_runtime_resume_and_get() before touching VA CSR
registers.
- Keep the LPASS vote clocks enabled across heartbeat clock
enable/disable register accesses by taking a runtime PM reference from the heartbeat clock prepare path.
- Use synchronous runtime PM put on probe success and error paths.
- Drop the one-use runtime PM error label while keeping synchronous puts (Konrad).
- Wrap the runtime PM ops with pm_ptr() from HTML review.
- Link to v8: https://patch.msgid.link/[email protected]
Changes in v8:
- Rebase the series on linux-next next-20260916.
- Require the LPASS LPR and audio vote clocks to access VA CSR
register space safely.
- Attach the DT vote clocks to runtime PM and resume the device before
programming the rate generator registers.
- Program the counter and delay registers once during probe.
- Use qcom's simple regmap gate ops for the enable bit (Srinivas).
- Drop the unreachable of_device_get_match_data() NULL check (Srinivas).
- Drop stale Reviewed-by/Tested-by tags after the binding and driver
changes.
- Link to v7: https://patch.msgid.link/20260831-heartbeat-v7-next-20260828-v7-0-e3ffeac46a51@oss.qualcomm.com
Changes in v7:
- Rebase the series on linux-next next-20260828.
- Add Prasad's Reviewed-by and Tested-by tags to patch 2.
- Link to v6: https://patch.msgid.link/20260821-heartbeat-v6-next-20260821-send-v6-0-62c5df84ce21@oss.qualcomm.com
Changes in v6:
- Rebase the series on linux-next next-20260821.
- Capitalize Hawi in binding text (Bjorn).
- Simplify the binding example by removing the soc wrapper and
two-cell address/size setup (Bjorn).
- Keep the full VA CSR register window in the binding and describe it
as the VA CSR register block after Konrad clarified the earlier
register-range concern (Bjorn, Konrad).
- Link to v5: https://patch.msgid.link/[email protected]
Changes in v5:
- Add explicit ARM64 Kconfig gating and Qualcomm default-module policy
for QCOM_CLK_LPASS_HEARTBEAT_PULSE to align with nearby qcom clock
entries.
- Link to v4: https://patch.msgid.link/[email protected]
Changes in v4:
- Rename the binding filename and schema ID to hawi-specific naming:
qcom,lpass-va-csr.yaml -> qcom,hawi-lpass-va-csr.yaml (Krzysztof).
- Rename Kconfig symbol QCOM_CLK_LPASS_VA_CSR to QCOM_CLK_LPASS_HEARTBEAT_PULSE (Konrad).
- Add devm_pm_runtime_enable() in the lpass-va-csr probe path.
- Drop the qcom,lpass-va-macro binding extension patch; it will be
resubmitted with the Hawi DTSI changes.
- Drop sound/soc/codecs/Kconfig select wiring to keep this series
clock-only (Konrad).
- Link to v3: https://lore.kernel.org/all/[email protected]/
Changes in v3:
- Move the qcom,lpass-va-csr binding under Documentation/devicetree/bindings/clock/ (Krzysztof).
- Move the driver under drivers/clk/qcom/ (Krzysztof).
- Improve the schema description and use generic clock-controller node naming (Krzysztof).
- Use additionalProperties: false and keep compatibles sorted.
Changes in v2:
- Split the qcom,lpass-va-csr and qcom,lpass-va-macro bindings into separate patches.
Changes in v1:
- Initial version
---
Sarath Ganapathiraju (2):
dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock
clk: qcom: Add LPASS VA CSR heartbeat pulse clock
.../bindings/clock/qcom,hawi-lpass-va-csr.yaml | 62 +++++++ drivers/clk/qcom/Kconfig | 14 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpass-va-csr.c | 180 +++++++++++++++++++++ 4 files changed, 257 insertions(+)
---
base-commit: becb95e45ef0dda9ffb35156d909d3da7a2789c3
change-id: 20260917-master-6c2778f57a9a
Best regards,
Signature · 1 line
Sarath Ganapathiraju <[email protected]>
PATCH v11 1/2 dt-bindings: clock: qcom: Add LPASS VA CSR HeartBeat pulse clock
Add a binding for the Qualcomm LPASS VA CSR rate generator node that exposes the lpass_heartbeat_pulse clock on Hawi.
The HeartBeat Pulse, also known as RateGen Pulse, synchronizes the start of DMAs and Codec Interfaces for the audio usecase and can serve as a periodic wakeup source for the DSP.
Require the LPASS LPR and audio vote clocks to access VA CSR register space safely.
--- .../bindings/clock/qcom,hawi-lpass-va-csr.yaml | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+)
Documentation/devicetree/bindings/clock/qcom,hawi-lpass-va-csr.yaml new file +62 -0
@@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,hawi-lpass-va-csr.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm LPASS VA CSR heartbeat pulse clock provider + +maintainers: + - Srinivas Kandagatla <[email protected]> + - Sarath Ganapathiraju <[email protected]> + +description: + The Hawi LPASS (Low Power Audio Subsystem) VA CSR block contains a + rate generator that produces a periodic HeartBeat Pulse, also known + as the RateGen Pulse. This pulse synchronizes the start of DMAs and + Codec Interfaces for audio usecases and can serve as a periodic wakeup + source for the DSP. + +properties: + compatible: + enum: + - qcom,hawi-lpass-va-csr + + reg: + maxItems: 1 + description: Address and size of the VA CSR register block. + + clocks: + items: + - description: LPASS LPR (Low Power Resource) voting clock + - description: LPASS Audio voting clock + + clock-names: + items: + - const: lpr + - const: audio + + "#clock-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - "#clock-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> + + clock-controller@7ee0000 { + compatible = "qcom,hawi-lpass-va-csr"; + reg = <0x07ee0000 0xe000>; + clocks = <&q6prmcc LPASS_HW_LPR_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "lpr", "audio"; + #clock-cells = <0>; + };
Signature · 1 line
2.34.1
PATCH v11 2/2 clk: qcom: Add LPASS VA CSR heartbeat pulse clock
In reply to Sarath GanapathirajuThe HeartBeat Pulse, also known as RateGen Pulse, synchronizes the start of 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 consumers can enable and disable it through the common clock framework.
Attach the DT vote clocks to runtime PM and program the rate generator counter and delay registers from runtime resume after the votes are enabled. This restores the state if the LPASS register context is lost across runtime suspend.
Rely on the clock core provider runtime PM handling around clock prepare and unprepare to keep the votes active for regmap gate accesses.
--- drivers/clk/qcom/Kconfig | 14 ++++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/lpass-va-csr.c | 180 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 195 insertions(+)
drivers/clk/qcom/Kconfig +14 -0
@@ -2137,6 +2137,20 @@ config CLK_GFM_LPASS_SM8250 Support for the Glitch Free Mux (GFM) Low power audio subsystem (LPASS) clocks found on SM8250 SoCs. +config QCOM_CLK_LPASS_HEARTBEAT_PULSE + tristate "Qualcomm LPASS VA CSR heartbeat pulse clock provider" + depends on COMMON_CLK + depends on ARM64 || COMPILE_TEST + select REGMAP_MMIO + default m if ARCH_QCOM + 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 SM_VIDEOCC_8450 tristate "SM8450 Video Clock Controller" depends on ARM64 || COMPILE_TEST
drivers/clk/qcom/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_CLK_ELIZA_GPUCC) += gpucc-eliza.o obj-$(CONFIG_CLK_ELIZA_TCSRCC) += tcsrcc-eliza.o obj-$(CONFIG_CLK_ELIZA_VIDEOCC) += videocc-eliza.o obj-$(CONFIG_CLK_GFM_LPASS_SM8250) += lpass-gfm-sm8250.o +obj-$(CONFIG_QCOM_CLK_LPASS_HEARTBEAT_PULSE) += lpass-va-csr.o obj-$(CONFIG_CLK_GLYMUR_CAMCC) += camcc-glymur.o obj-$(CONFIG_CLK_GLYMUR_DISPCC) += dispcc-glymur.o obj-$(CONFIG_CLK_GLYMUR_EVACC) += evacc-glymur.o
drivers/clk/qcom/lpass-va-csr.c new file +180 -0
180 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] clk: qcom: build failure due to missing PM_CLK dependency when CONFIG_PM=n - [Medium] clk: qcom…
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] clk: qcom: build failure due to missing PM_CLK dependency when CONFIG_PM=n
- [Medium] clk: qcom: missing hardware initialization when CONFIG_PM is disabled
- [Low] clk: qcom: unused-function warnings for PM callbacks when CONFIG_PM=n --
commit a480f5be8e9c721f7e655f8562c6eda38da7c50c
Author: Sarath Ganapathiraju <[email protected]>
Subject: clk: qcom: Add LPASS VA CSR heartbeat pulse clock
This commit adds a clock provider driver for the LPASS VA CSR heartbeat pulse on Qualcomm SoCs. The driver models the rate generator and restores register state during runtime PM resume.
drivers/clk/qcom/Kconfig config CLK_GFM_LPASS_SM8250 · line 2143
Quoted 12 lines
drivers/clk/qcom/Kconfig +4
-0@@ -2137,6 +2137,20 @@ config CLK_GFM_LPASS_SM8250 Support for the Glitch Free Mux (GFM) Low power audio subsystem (LPASS) clocks found on SM8250 SoCs. +config QCOM_CLK_LPASS_HEARTBEAT_PULSE + tristate "Qualcomm LPASS VA CSR heartbeat pulse clock provider" + depends on COMMON_CLK + depends on ARM64 || COMPILE_TEST
[Severity: High]
Should this Kconfig entry have a dependency on PM or PM_CLK?
When the driver is built under COMPILE_TEST without CONFIG_PM or CONFIG_PM_CLK, the lack of dependency exposes the driver to environments where the pm_clk APIs are undefined, which breaks the build.
Quoted 5 lines
drivers/clk/qcom/lpass-va-csr.c new file +0
-0
[ ... ]
drivers/clk/qcom/lpass-va-csr.c line 61
Quoted 7 lines
drivers/clk/qcom/lpass-va-csr.c new file +7
-0+static int lpass_va_csr_runtime_resume (struct device *dev) +{ +struct lpass_va_csr *csr =dev_get_drvdata (dev); +const struct lpass_va_csr_data *data = csr->data; +int ret; + + ret =pm_clk_resume (dev);
[Severity: High]
Will this cause a build failure when CONFIG_PM_CLK is not enabled?
Because the Kconfig entry does not depend on PM_CLK, this code can be compiled when pm_clk_resume expands to NULL. This causes the preprocessor to expand the line to ret = NULL(dev); during compilation, resulting in a fatal error for calling a void pointer.
drivers/clk/qcom/lpass-va-csr.c line 66
Quoted 5 lines
drivers/clk/qcom/lpass-va-csr.c new file +5
-0+if (ret) +return ret; + + ret =regmap_write (csr->hb.regmap,LPASS_RATE_GEN_COUNTER_0 , + data->counter_0);
[Severity: Medium]
Will the hardware operate correctly if CONFIG_PM is disabled?
The driver's hardware initialization (programming LPASS_RATE_GEN_COUNTER_0 and DELAY) is executed exclusively inside this lpass_va_csr_runtime_resume() callback.
If the kernel is built with CONFIG_PM=n, the pm_runtime_resume_and_get() call in lpass_va_csr_probe() trivially returns 0 without executing this callback. As a result, the hardware registers will remain uninitialized and operate with default or undefined values.
Should the driver enforce depends on PM in its Kconfig, or explicitly initialize the hardware in probe() when PM is not enabled?
[ ... ]
drivers/clk/qcom/lpass-va-csr.c line 166
Quoted 4 lines
drivers/clk/qcom/lpass-va-csr.c new file +4
-0+static const struct dev_pm_ops lpass_va_csr_pm_ops = { +SET_RUNTIME_PM_OPS (lpass_va_csr_runtime_suspend, + lpass_va_csr_runtime_resume,NULL ) +};
[Severity: Low]
Does this code trigger unused-function warnings when CONFIG_PM=n?
The driver defines lpass_va_csr_runtime_suspend() and lpass_va_csr_runtime_resume() as static functions without the __maybe_unused annotation.
When CONFIG_PM is disabled, SET_RUNTIME_PM_OPS evaluates to an empty block, leaving the static callback functions completely unreferenced. This triggers -Wunused-function compiler warnings, which can break builds configured with -Werror.
Would it be better to use __maybe_unused on the callbacks, or adopt the modern RUNTIME_PM_OPS() macro instead?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
kernel test robot
build botRe: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
In reply to Sarath Ganapathirajukernel test robot noticed the following build errors:
Hi Sarath,
kernel test robot noticed the following build errors:
[auto build test ERROR on becb95e45ef0dda9ffb35156d909d3da7a2789c3]
url: https://github.com/intel-lab-lkp/linux/commits/Sarath-Ganapathiraju-via-B4-Relay/dt-bindings-clock-qcom-Add-LPASS-VA-CSR-HeartBeat-pulse-clock/20261012-172258 base: becb95e45ef0dda9ffb35156d909d3da7a2789c3 patch link: https://lore.kernel.org/r/20261012-master-v11-2-15009e3ecac3%40oss.qualcomm.com patch subject: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20261014/[email protected]/config) compiler: hppa-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261014/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:5,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/parisc/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:391,
from include/linux/build_bug.h:5,
from include/linux/bits.h:30,
from include/linux/clk-provider.h:10,
from drivers/clk/qcom/lpass-va-csr.c:6:
drivers/clk/qcom/lpass-va-csr.c: In function 'lpass_va_csr_runtime_resume':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:78:25: note: in expansion of macro 'NULL'
78 | #define pm_clk_resume NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:61:15: note: in expansion of macro 'pm_clk_resume'
61 | ret = pm_clk_resume(dev);
| ^~~~~~~~~~~~~
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:77:9: note: in expansion of macro 'pm_clk_suspend'
77 | pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~
drivers/clk/qcom/lpass-va-csr.c: In function 'lpass_va_csr_runtime_suspend':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:83:16: note: in expansion of macro 'pm_clk_suspend'
83 | return pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~ drivers/clk/qcom/lpass-va-csr.c: At top level:
drivers/clk/qcom/lpass-va-csr.c:81:12: warning: 'lpass_va_csr_runtime_suspend' defined but not used [-Wunused-function]
81 | static int lpass_va_csr_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/qcom/lpass-va-csr.c:55:12: warning: 'lpass_va_csr_runtime_resume' defined but not used [-Wunused-function]
55 | static int lpass_va_csr_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:5,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from arch/parisc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:391,
from include/linux/build_bug.h:5,
from include/linux/bits.h:30,
from include/linux/clk-provider.h:10,
from lpass-va-csr.c:6:
lpass-va-csr.c: In function 'lpass_va_csr_runtime_resume':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:78:25: note: in expansion of macro 'NULL'
78 | #define pm_clk_resume NULL
| ^~~~
lpass-va-csr.c:61:15: note: in expansion of macro 'pm_clk_resume'
61 | ret = pm_clk_resume(dev);
| ^~~~~~~~~~~~~
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
lpass-va-csr.c:77:9: note: in expansion of macro 'pm_clk_suspend'
77 | pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~
lpass-va-csr.c: In function 'lpass_va_csr_runtime_suspend':
>> include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
lpass-va-csr.c:83:16: note: in expansion of macro 'pm_clk_suspend'
83 | return pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~ lpass-va-csr.c: At top level:
lpass-va-csr.c:81:12: warning: 'lpass_va_csr_runtime_suspend' defined but not used [-Wunused-function]
81 | static int lpass_va_csr_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
lpass-va-csr.c:55:12: warning: 'lpass_va_csr_runtime_resume' defined but not used [-Wunused-function]
55 | static int lpass_va_csr_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +8 include/linux/stddef.h
^1da177e4c3f415 Linus Torvalds 2005-04-16 6 ^1da177e4c3f415 Linus Torvalds 2005-04-16 7 #undef NULL ^1da177e4c3f415 Linus Torvalds 2005-04-16 @8 #define NULL ((void *)0)
6e2182874324727 Richard Knutsson 2006-09-30 9
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
In reply to Sarath Ganapathirajukernel test robot noticed the following build errors:
Hi Sarath,
kernel test robot noticed the following build errors:
[auto build test ERROR on becb95e45ef0dda9ffb35156d909d3da7a2789c3]
url: https://github.com/intel-lab-lkp/linux/commits/Sarath-Ganapathiraju-via-B4-Relay/dt-bindings-clock-qcom-Add-LPASS-VA-CSR-HeartBeat-pulse-clock/20261012-172258 base: becb95e45ef0dda9ffb35156d909d3da7a2789c3 patch link: https://lore.kernel.org/r/20261012-master-v11-2-15009e3ecac3%40oss.qualcomm.com patch subject: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock config: powerpc64-randconfig-1000-20261014 (https://download.01.org/0day-ci/archive/20261015/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6719b9e31d6a93099612c474eec76d9f41d0275a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261015/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/clk/qcom/lpass-va-csr.c:61:21: error: called object type 'void *' is not a function or function pointer
61 | ret = pm_clk_resume(dev);
| ~~~~~~~~~~~~~^
drivers/clk/qcom/lpass-va-csr.c:77:16: error: called object type 'void *' is not a function or function pointer
77 | pm_clk_suspend(dev);
| ~~~~~~~~~~~~~~^
drivers/clk/qcom/lpass-va-csr.c:83:23: error: called object type 'void *' is not a function or function pointer
83 | return pm_clk_suspend(dev);
| ~~~~~~~~~~~~~~^3 errors generated.
vim +61 drivers/clk/qcom/lpass-va-csr.c
54
55 static int lpass_va_csr_runtime_resume(struct device *dev)
56 {
57 struct lpass_va_csr *csr = dev_get_drvdata(dev);
58 const struct lpass_va_csr_data *data = csr->data;
59 int ret;
60
> 61 ret = pm_clk_resume(dev);
62 if (ret)
63 return ret;
64
65 ret = regmap_write(csr->hb.regmap, LPASS_RATE_GEN_COUNTER_0,
66 data->counter_0);
67 if (ret)
68 goto err_pm_clk_suspend;
69
70 ret = regmap_write(csr->hb.regmap, LPASS_RATE_GEN_DELAY, data->delay);
71 if (ret)
72 goto err_pm_clk_suspend;
73
74 return 0;
75
76 err_pm_clk_suspend:
77 pm_clk_suspend(dev);
78 return ret;
79 }
80 --
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
In reply to Sarath Ganapathirajukernel test robot noticed the following build warnings:
Hi Sarath,
kernel test robot noticed the following build warnings:
[auto build test WARNING on becb95e45ef0dda9ffb35156d909d3da7a2789c3]
url: https://github.com/intel-lab-lkp/linux/commits/Sarath-Ganapathiraju-via-B4-Relay/dt-bindings-clock-qcom-Add-LPASS-VA-CSR-HeartBeat-pulse-clock/20261012-172258 base: becb95e45ef0dda9ffb35156d909d3da7a2789c3 patch link: https://lore.kernel.org/r/20261012-master-v11-2-15009e3ecac3%40oss.qualcomm.com patch subject: [PATCH v11 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20261015/[email protected]/config) compiler: m68k-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261015/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:5,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/m68k/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:391,
from include/linux/build_bug.h:5,
from include/linux/bits.h:30,
from include/linux/clk-provider.h:10,
from drivers/clk/qcom/lpass-va-csr.c:6:
drivers/clk/qcom/lpass-va-csr.c: In function 'lpass_va_csr_runtime_resume':
include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:78:25: note: in expansion of macro 'NULL'
78 | #define pm_clk_resume NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:61:15: note: in expansion of macro 'pm_clk_resume'
61 | ret = pm_clk_resume(dev);
| ^~~~~~~~~~~~~
include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:77:9: note: in expansion of macro 'pm_clk_suspend'
77 | pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~
drivers/clk/qcom/lpass-va-csr.c: In function 'lpass_va_csr_runtime_suspend':
include/linux/stddef.h:8:14: error: called object is not a function or function pointer
8 | #define NULL ((void *)0)
| ^
include/linux/pm_clock.h:77:25: note: in expansion of macro 'NULL'
77 | #define pm_clk_suspend NULL
| ^~~~
drivers/clk/qcom/lpass-va-csr.c:83:16: note: in expansion of macro 'pm_clk_suspend'
83 | return pm_clk_suspend(dev);
| ^~~~~~~~~~~~~~
drivers/clk/qcom/lpass-va-csr.c: At top level:
>> drivers/clk/qcom/lpass-va-csr.c:81:12: warning: 'lpass_va_csr_runtime_suspend' defined but not used [-Wunused-function]
81 | static int lpass_va_csr_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/clk/qcom/lpass-va-csr.c:55:12: warning: 'lpass_va_csr_runtime_resume' defined but not used [-Wunused-function] 55 | static int lpass_va_csr_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/lpass_va_csr_runtime_suspend +81 drivers/clk/qcom/lpass-va-csr.c
54
> 55 static int lpass_va_csr_runtime_resume(struct device *dev)
56 {
57 struct lpass_va_csr *csr = dev_get_drvdata(dev);
58 const struct lpass_va_csr_data *data = csr->data;
59 int ret;
60
61 ret = pm_clk_resume(dev);
62 if (ret)
63 return ret;
64
65 ret = regmap_write(csr->hb.regmap, LPASS_RATE_GEN_COUNTER_0,
66 data->counter_0);
67 if (ret)
68 goto err_pm_clk_suspend;
69
70 ret = regmap_write(csr->hb.regmap, LPASS_RATE_GEN_DELAY, data->delay);
71 if (ret)
72 goto err_pm_clk_suspend;
73
74 return 0;
75
76 err_pm_clk_suspend:
77 pm_clk_suspend(dev);
78 return ret;
79 }
80
> 81 static int lpass_va_csr_runtime_suspend(struct device *dev)
82 {
> 83 return pm_clk_suspend(dev);
84 }
85 --
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki