]> 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)
commitcb70c77eea8b14cfb1988abda0e88f1d3cfaeb70
tree977da55be387cc63f74a29393193261cb082780c
parentbcac507057f6668c45308343ba41f4c91a086136
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