mbox series

[RESEND,v2,0/9] soundwire/regmap: use _no_pm routines

Message ID 20210122070634.12825-1-yung-chuan.liao@linux.intel.com (mailing list archive)
Headers show
Series soundwire/regmap: use _no_pm routines | expand

Message

Bard Liao Jan. 22, 2021, 7:06 a.m. UTC
When a Slave device is resumed, it may resume the bus and restart the
enumeration. And Slave drivers will wait for initialization_complete
complete in their resume function, however initialization_complete will
complete after sdw_update_slave_status function is finished and codec
driver usually call some IO functions in the update_status callback
function.
It will become a deadlock if we use regular read/write routines during
the resuming process.

This series touches both soundwire and regmap trees.
commit fb5103f9d6ce ("regmap/SoundWire: sdw: add support for SoundWire 1.2 MBQ")
is needed for soundwire tree to complie.
On the other hands,
commit 6e06a85556f9 ("soundwire: bus: add comments to explain interrupt loop filter")
to
commit 47b8520997a8 ("soundwire: bus: only clear valid DPN interrupts")
are needed for regmap tree.

v2:
 - Separate commits according to maintainer's comments.

Bard Liao (4):
  soundwire: export sdw_write/read_no_pm functions
  regmap: sdw: use _no_pm functions in regmap_read/write
  regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ
  regmap: sdw-mbq: use MODULE_LICENSE("GPL")

Pierre-Louis Bossart (5):
  soundwire: bus: use sdw_update_no_pm when initializing a device
  soundwire: bus: use sdw_write_no_pm when setting the bus scale
    registers
  soundwire: bus: use no_pm IO routines for all interrupt handling
  soundwire: bus: fix confusion on device used by pm_runtime
  soundwire: bus: clarify dev_err/dbg device references

 drivers/base/regmap/regmap-sdw-mbq.c |  10 +-
 drivers/base/regmap/regmap-sdw.c     |   4 +-
 drivers/soundwire/bus.c              | 136 +++++++++++++++------------
 include/linux/soundwire/sdw.h        |   2 +
 4 files changed, 85 insertions(+), 67 deletions(-)

Comments

Vinod Koul Feb. 6, 2021, 10:26 a.m. UTC | #1
On 22-01-21, 15:06, Bard Liao wrote:
> When a Slave device is resumed, it may resume the bus and restart the
> enumeration. And Slave drivers will wait for initialization_complete
> complete in their resume function, however initialization_complete will
> complete after sdw_update_slave_status function is finished and codec
> driver usually call some IO functions in the update_status callback
> function.
> It will become a deadlock if we use regular read/write routines during
> the resuming process.

Applied all sdw patches, thanks
Mark Brown Feb. 8, 2021, 12:50 p.m. UTC | #2
On Sat, Feb 06, 2021 at 03:56:44PM +0530, Vinod Koul wrote:

> Applied all sdw patches, thanks

Is there a tag I can pull the new APIs from?
Vinod Koul Feb. 8, 2021, 3:04 p.m. UTC | #3
Hello Mark,

On 08-02-21, 12:50, Mark Brown wrote:
> On Sat, Feb 06, 2021 at 03:56:44PM +0530, Vinod Koul wrote:
> 
> > Applied all sdw patches, thanks
> 
> Is there a tag I can pull the new APIs from?

Yes, please pull from below:

git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git tags/soundwire-5.12-rc1

Thanks
Mark Brown Feb. 10, 2021, 7:58 p.m. UTC | #4
On Mon, Feb 08, 2021 at 08:34:49PM +0530, Vinod Koul wrote:
> On 08-02-21, 12:50, Mark Brown wrote:

> > Is there a tag I can pull the new APIs from?

> Yes, please pull from below:

> git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git tags/soundwire-5.12-rc1

Ah, that's the entire Soundwire pull request including driver updates -
that's a bit more than is ideal.  Instead if you want to pull in the
regmap bits that might be easier:

Acked-by: Mark Brown <broonie@kernel.org>
Vinod Koul Feb. 11, 2021, 5:25 a.m. UTC | #5
On 10-02-21, 19:58, Mark Brown wrote:
> On Mon, Feb 08, 2021 at 08:34:49PM +0530, Vinod Koul wrote:
> > On 08-02-21, 12:50, Mark Brown wrote:
> 
> > > Is there a tag I can pull the new APIs from?
> 
> > Yes, please pull from below:
> 
> > git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git tags/soundwire-5.12-rc1
> 
> Ah, that's the entire Soundwire pull request including driver updates -
> that's a bit more than is ideal.  Instead if you want to pull in the
> regmap bits that might be easier:
> 
> Acked-by: Mark Brown <broonie@kernel.org>

Since I had a fix to send to Greg, I am adding these as well..

Thanks