Re: [PATCH v15 2/2] clk: qcom: Add LPASS VA CSR heartbeat pulse clock
From: Prasad Kumpatla
Date: Tue Dec 01 2026 - 12:17:24 EST
On 11/30/2026 9:04 PM, Sarath Ganapathiraju via B4 Relay wrote:
From: Sarath Ganapathiraju <sarath.ganapathiraju@xxxxxxxxxxxxxxxx>
The 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. Use the same runtime suspend and resume callbacks for
system sleep so the vote clocks are enabled before restoring the
rate generator after suspend. Track the heartbeat gate state in the
clock callbacks and restore LPASS_RATE_GEN_CTRL on resume when the
clock was enabled before the LPASS register context was lost.
Signed-off-by: Sarath Ganapathiraju <sarath.ganapathiraju@xxxxxxxxxxxxxxxx>
---
Tested on Hawi/Maili platforms for WCD headset Playback Usecase.
Reviewed-by: Prasad Kumpatla <prasad.kumpatla@xxxxxxxxxxxxxxxx>
Tested-by: Prasad Kumpatla <prasad.kumpatla@xxxxxxxxxxxxxxxx>
Thanks,
Prasad