• Geert Uytterhoeven's avatar
    clk: renesas: cpg-mssr: Export cpg_mssr_{at,de}tach_dev() · 2066390a
    Geert Uytterhoeven authored
    The R-Car SYSC PM Domain driver has to power manage devices in power
    areas using clocks. To reuse code and to share knowledge of clocks
    suitable for power management, this is ideally done through the existing
    cpg_mssr_attach_dev() and cpg_mssr_detach_dev() callbacks.
    
    Hence these callbacks can no longer rely on their "domain" parameter
    pointing to the CPG/MSSR Clock Domain. To handle this, keep a pointer to
    the clock domain in a static variable. cpg_mssr_attach_dev() has to
    support probe deferral, as the R-Car SYSC PM Domain may be initialized,
    and devices may be added to it, before the CPG/MSSR Clock Domain is
    initialized.
    
    Dummy callbacks are provided for the case where CPG/MSTP support is not
    included, so the rcar-sysc driver won't have to care about this.
    Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    2066390a
renesas-cpg-mssr.c 13.7 KB