]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: mmio: Add function to attach a clock
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 21 Feb 2018 09:20:25 +0000 (10:20 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 26 Feb 2018 11:05:44 +0000 (11:05 +0000)
commit2daeb30bb6909ef388f9da44d64f27c4560d59fb
tree977da55be387cc63f74a29393193261cb082780c
parentae0945d7fbe5a6a5e767169d0c9ca622784b3c38
regmap: mmio: Add function to attach a clock

regmap_init_mmio_clk allows to specify a clock that needs to be enabled
while accessing the registers.

However, that clock is retrieved through its clock ID, which means it will
lookup that clock based on the current device that registers the regmap,
and, in the DT case, will only look in that device OF node.

This might be problematic if the clock to enable is stored in another node.
Let's add a function that allows to attach a clock that has already been
retrieved to a regmap in order to fix this.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-mmio.c
include/linux/regmap.h