clk: qcom: gcc-shima: Enable clocks for pm8008 by default
The pm8008 regulator is connected over I2C and the I2C device configures its clocks in runtime_resume and runtime_suspend. These callbacks are triggered from the pm8008 driver's regmap calls. This means regulator framework requests for pm8008 call into the clock framework with the regulator framework locks held. The qcom clock providers also call into the regulator framework with the clock framework locks held. If thread A makes a pm8008 request at the same time thread B makes a clock request, then it can result in deadlocks. Thread A will be stuck waiting on the clock locks while thread B is stuck waiting on the regulator locks. To prevent these deadlocks, enable the I2C clocks required for pm8008 by default during probe and stop registering them with the framework. This NOPs any client requests, since of_clk_get() returns NULL when passed an unregistered clock and all other clock APIs return success before grabbing any locks when passed NULL. Change-Id: I3180f022b8ea913b4cd99b85260e72a7fa1b0693 Signed-off-by:Mike Tipton <mdtipton@codeaurora.org> Signed-off-by:
Jagadeesh Kona <jkona@codeaurora.org>
Loading
Please register or sign in to comment