• Maxime Ripard's avatar
    regmap: mmio: Add function to attach a clock · 31895662
    Maxime Ripard authored
    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: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    31895662
regmap-mmio.c 8.17 KB