mbox series

[v2,0/3] soundwire: qcom: add pm runtime support

Message ID 20220224133125.6674-1-srinivas.kandagatla@linaro.org
Headers show
Series soundwire: qcom: add pm runtime support | expand

Message

Srinivas Kandagatla Feb. 24, 2022, 1:31 p.m. UTC
This patchset adds pm runtime support to Qualcomm SounWire Controller using
SoundWire Clock Stop and Wake up using Headset events on supported instances and
instances like WSA which do not support clock stop a soft reset of controller
along with full rest of slaves is done to resume from a low power state.

Tested it on SM8250 MTP and Dragon Board DB845c

--srini

Changes since v1:
 - updated wake irq to not deal with slave pm runtime directly.
 - added delay after soft reset of SoundWire controller where clock stop is not supported


Srinivas Kandagatla (3):
  soundwire: qcom: add runtime pm support
  dt-bindings: soundwire: qcom: document optional wake irq
  soundwire: qcom: add in-band wake up interrupt support

 .../bindings/soundwire/qcom,sdw.txt           |   2 +-
 drivers/soundwire/qcom.c                      | 202 +++++++++++++++++-
 2 files changed, 202 insertions(+), 2 deletions(-)

Comments

Rob Herring (Arm) Feb. 25, 2022, 8:21 p.m. UTC | #1
On Thu, Feb 24, 2022 at 01:31:24PM +0000, Srinivas Kandagatla wrote:
> Wake IRQ is optional interrupt that can be wired up on SoundWire controller
> instances like RX path along with MBHC(Multi Button Headset connection).
> Document this in bindings.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  Documentation/devicetree/bindings/soundwire/qcom,sdw.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
> index b93a2b3e029d..bade68f429b0 100644
> --- a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
> +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
> @@ -22,7 +22,7 @@ board specific bus parameters.
>  - interrupts:
>  	Usage: required
>  	Value type: <prop-encoded-array>
> -	Definition: should specify the SoundWire Controller IRQ
> +	Definition: should specify the SoundWire Controller and optional wake IRQ

What about 'wakeup-source' property?

>  
>  - clock-names:
>  	Usage: required
> -- 
> 2.21.0
> 
>
Srinivas Kandagatla Feb. 28, 2022, 12:29 p.m. UTC | #2
On 25/02/2022 20:21, Rob Herring wrote:
> On Thu, Feb 24, 2022 at 01:31:24PM +0000, Srinivas Kandagatla wrote:
>> Wake IRQ is optional interrupt that can be wired up on SoundWire controller
>> instances like RX path along with MBHC(Multi Button Headset connection).
>> Document this in bindings.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   Documentation/devicetree/bindings/soundwire/qcom,sdw.txt | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
>> index b93a2b3e029d..bade68f429b0 100644
>> --- a/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
>> +++ b/Documentation/devicetree/bindings/soundwire/qcom,sdw.txt
>> @@ -22,7 +22,7 @@ board specific bus parameters.
>>   - interrupts:
>>   	Usage: required
>>   	Value type: <prop-encoded-array>
>> -	Definition: should specify the SoundWire Controller IRQ
>> +	Definition: should specify the SoundWire Controller and optional wake IRQ
> 
> What about 'wakeup-source' property?

Thanks for the hint, I was not aware of this flag. Will add this in next 
version.

--srini
> 
>>   
>>   - clock-names:
>>   	Usage: required
>> -- 
>> 2.21.0
>>
>>