]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: samsung: i2s: Move clk enable to the platform driver probe()
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 14 Jan 2015 18:42:32 +0000 (19:42 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jan 2015 19:46:54 +0000 (19:46 +0000)
commit9fc94ff3bb6e943cecfd4339e27417331beb9c2f
tree34610e9af7418bda138f21cad664bd4ef20bee42
parent36a9845a65b6de6a346567c25caac280b9b14c4b
ASoC: samsung: i2s: Move clk enable to the platform driver probe()

The clk_prepare_enable() call on the "iis" clock is moved to happen earlier
in the DAI platform device driver's probe() callback, so the I2S registers
can be safely accessed through the clk API, after the clk supplier is
registered in the platform device probe().

After this patch the "iis" clock is kept enabled since the (primary) I2S
platform device probe() and until the platform device driver remove() call.
This is similar to gating the clock in the snd_soc_dai probe() and remove()
callbacks.
Normally, in addition to that we should mark the device as PM runtime active,
so if runtime PM is enabled it can idle the device by turning off the clock.
Correcting this issue is left for a separate patch series, as we need to
ensure the BUSCLK clock is always enabled when required.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/i2s.c