Skip to content

Fix reset controls and RPM of NVIDIA Tegra ASoC drivers

Dmitry Osipenko alsa-devel linux-devicetree linux-tegra lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest17 patches 4 repliesIn review
  2. v45 patches 0 repliesSuperseded
  3. v35 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v25 patches1 replySuperseded
v15 patches3 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17ASoC: tegra20: ac97: Add reset controlsound/soc/tegra/tegra20_ac97.c sound/soc/tegra/tegra20_ac97.h+22 -00 replies
2/17ASoC: tegra20: i2s: Add reset controlsound/soc/tegra/tegra20_i2s.c sound/soc/tegra/tegra20_i2s.h+32 -00 replies
3/17ASoC: tegra30: i2s: Restore hardware state on runtime PM resumesound/soc/tegra/tegra30_i2s.c+12 -280 replies
4/17reset: Add reset_control_bulk APIdrivers/reset/core.c include/linux/reset.h+530 -00 replies
5/17ASoC: tegra30: ahub: Switch to use reset-bulk APIsound/soc/tegra/tegra30_ahub.c sound/soc/tegra/tegra30_ahub.h sound/soc/tegra/tegra30_i2s.c+40 -700 replies
6/17ASoC: tegra20: spdif: Correct driver removal ordersound/soc/tegra/tegra20_spdif.c+3 -30 replies
7/17ASoC: tegra20: spdif: Remove handing of disabled runtime PMsound/soc/tegra/tegra20_spdif.c+1 -110 replies
8/17ASoC: tegra20: i2s: Add system level suspend-resume callbackssound/soc/tegra/tegra20_i2s.c+2 -00 replies
9/17ASoC: tegra20: i2s: Correct driver removal ordersound/soc/tegra/tegra20_i2s.c+3 -30 replies
10/17ASoC: tegra20: i2s: Use devm_clk_get()sound/soc/tegra/tegra20_i2s.c+3 -90 replies
11/17ASoC: tegra20: i2s: Remove handing of disabled runtime PMsound/soc/tegra/tegra20_i2s.c+1 -120 replies
12/17ASoC: tegra30: i2s: Correct driver removal ordersound/soc/tegra/tegra30_i2s.c+4 -40 replies
13/17ASoC: tegra30: i2s: Use devm_clk_get()sound/soc/tegra/tegra30_i2s.c+3 -70 replies
14/17ASoC: tegra30: i2s: Remove handing of disabled runtime PMsound/soc/tegra/tegra30_i2s.c+1 -110 replies
15/17ASoC: tegra30: ahub: Reset global variablesound/soc/tegra/tegra30_ahub.c+16 -140 replies
16/17ASoC: tegra30: ahub: Correct suspend-resume callbackssound/soc/tegra/tegra30_ahub.c+2 -270 replies
17/17ASoC: tegra30: ahub: Remove handing of disabled runtime PMsound/soc/tegra/tegra30_ahub.c+0 -90 replies

Reviews trailers per patch

None of the 17 patches has a Reviewed-by or Acked-by.

PatchPaul FertserDmitry Osipenko
1/17
2/17T-b
3/17
4/17T-b
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/17] Fix reset controls and RPM of NVIDIA Tegra ASoC drivers

Hi,

This series adds missing hardware reset controls to I2S and AC97 drivers, corrects runtime PM usage and drivers probe/remove order. Currently drivers happen to work properly because reset is implicitly deasserted by tegra-clk driver, but clk driver shouldn't touch the resets and we need to fix it because this breaks other Tegra drivers. Previously we fixed the resets of the AHUB and HDMI codec drivers, but turned out that we missed the I2C and AC97 drivers.

Thanks to Paul Fertser for testing the pending clk patches and finding that audio got broken on Tegra20 AC100 netbook because of the missing I2S reset.

Changelog:

v5: - After taking another look at the drivers I noticed couple more
things that could be improved. These new patches correct runtime PM and probe/remove order of the drivers:

ASoC: tegra20: spdif: Correct driver removal order
ASoC: tegra20: spdif: Remove handing of disabled runtime PM
ASoC: tegra20: i2s: Add system level suspend-resume callbacks
ASoC: tegra20: i2s: Correct driver removal order
ASoC: tegra20: i2s: Use devm_clk_get()
ASoC: tegra20: i2s: Remove handing of disabled runtime PM
ASoC: tegra30: i2s: Correct driver removal order
ASoC: tegra30: i2s: Use devm_clk_get()
ASoC: tegra30: i2s: Remove handing of disabled runtime PM
ASoC: tegra30: ahub: Reset global variable
ASoC: tegra30: ahub: Correct suspend-resume callbacks
ASoC: tegra30: ahub: Remove handing of disabled runtime PM

v4: - Added missing prototype for reset_control_bulk_put().

v3: - Fixed reset stubs for !CONFIG_RESET_CONTROLLER.

v2: - After some more testing I found that I2S control logic doesn't require
I2S clock to be enabled for resetting. Hence it's fine to have I2S to be reset by parent AHUB driver, so I dropped "tegra30: i2s: Add reset control" patch.

- While I was double-checking resets on Tegra30, I found that that Tegra30 I2S driver has a broken runtime PM which doesn't restore hardware state on resume and it's lost after AHUB RPM-resume. Thus, added this new patch "tegra30: i2s: Restore hardware state on runtime PM resume".

- Added new patches which switch AHUB driver to use reset-bulk API. I took the RFC patch from Philipp Zabel, fixed it and added devm_reset_control_bulk_optional_get_exclusive_released() that will be useful for further Tegra GPU patches. This is a minor improvement which makes code cleaner.

Dmitry Osipenko (16):
ASoC: tegra20: ac97: Add reset control
ASoC: tegra20: i2s: Add reset control
ASoC: tegra30: i2s: Restore hardware state on runtime PM resume
ASoC: tegra30: ahub: Switch to use reset-bulk API
ASoC: tegra20: spdif: Correct driver removal order
ASoC: tegra20: spdif: Remove handing of disabled runtime PM
ASoC: tegra20: i2s: Add system level suspend-resume callbacks
ASoC: tegra20: i2s: Correct driver removal order
ASoC: tegra20: i2s: Use devm_clk_get()
ASoC: tegra20: i2s: Remove handing of disabled runtime PM
ASoC: tegra30: i2s: Correct driver removal order
ASoC: tegra30: i2s: Use devm_clk_get()
ASoC: tegra30: i2s: Remove handing of disabled runtime PM
ASoC: tegra30: ahub: Reset global variable
ASoC: tegra30: ahub: Correct suspend-resume callbacks
ASoC: tegra30: ahub: Remove handing of disabled runtime PM

Philipp Zabel (1):
reset: Add reset_control_bulk API

 drivers/reset/core.c            | 215 ++++++++++++++++++++++
 include/linux/reset.h           | 315 ++++++++++++++++++++++++++++++++
 sound/soc/tegra/tegra20_ac97.c  |  21 +++
 sound/soc/tegra/tegra20_ac97.h  |   1 +
 sound/soc/tegra/tegra20_i2s.c   |  60 +++---
 sound/soc/tegra/tegra20_i2s.h   |   1 +
 sound/soc/tegra/tegra20_spdif.c |  16 +-
 sound/soc/tegra/tegra30_ahub.c  | 168 ++++++-----------
 sound/soc/tegra/tegra30_ahub.h  |   5 +-
 sound/soc/tegra/tegra30_i2s.c   |  65 ++-----
 10 files changed, 667 insertions(+), 200 deletions(-)
Signature · 1 line
2.30.2