Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8e20d733 authored by Jagadeesh Kona's avatar Jagadeesh Kona
Browse files

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: default avatarMike Tipton <mdtipton@codeaurora.org>
Signed-off-by: default avatarJagadeesh Kona <jkona@codeaurora.org>
parent ac50d9af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment