diff options
author | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2019-02-11 14:58:18 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-02-21 23:05:25 +0100 |
commit | c0189feeade0f02a6cdac3b27b5e9c52f9930fc2 (patch) | |
tree | b44dd2e30318efbe9b86f9f2750f6a7dae1fefdb /include/dt-bindings | |
parent | Linux 5.0-rc1 (diff) | |
download | linux-c0189feeade0f02a6cdac3b27b5e9c52f9930fc2.tar.xz linux-c0189feeade0f02a6cdac3b27b5e9c52f9930fc2.zip |
clk: clk-gpio: add support for sleeping GPIOs in gpio-gate-clk
The current implementation of gpio-gate-clk enables/disables the clock
using the GPIO in the ->enable() and ->disable() clock callbacks. This
requires the GPIO to be configurable in atomic contexts. While it is
the case for most memory-mapped GPIO controllers, it is not the case
for GPIO expanders on I2C or SPI.
This commit extends the gpio-gate-clk to check whether the GPIO calls
require sleeping or not. If sleeping is not required, the current
implementation based on ->enable()/->disable() is kept. However, if
sleeping is needed, we instead implement the logic in the ->prepare()
and ->unprepare() hooks. Thanks to this, a gate clock connected to a
GPIO on a GPIO expander can be controlled with the existing driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[sboyd@kernel.org: Mark clk ops static]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/dt-bindings')
0 files changed, 0 insertions, 0 deletions