• Tony Lindgren's avatar
    clk: ti: clkctrl: Fix hidden dependency to node name · 6c309052
    Tony Lindgren authored
    We currently have a hidden dependency to the device tree node name for
    the clkctrl clocks. Instead of using standard node name like "clock", we
    must use "l4-per-clkctrl" type naming so the clock driver can find the
    associated clock domain. Further, if "clk" is specified for a clock node
    name, the driver sets TI_CLK_CLKCTRL_COMPAT flag that uses different
    logic for the clock name based on the parent node name for the all the
    clkctrl clocks for the SoC.
    
    If the clock node naming dependency is not understood, the related
    clockdomain is not found, or a wrong one can get used if a clock manager
    has multiple clock domains.
    
    As each clkctrl instance represents a single clock domain, let's allow
    using domain specific compatible names to specify the clock domain.
    
    This simplifies things and removes the hidden dependency to the node
    name. And then later on, after the node names have been standardized,
    we can drop the related code for parsing the node names.
    
    Let's also update the binding to use standard "clock" node naming
    instead of "clk" and add the missing description for reg.
    
    Cc: devicetree@vger.kernel.org
    Cc: Rob Herring <robh+dt@kernel.org>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Acked-by: default avatarRob Herring <robh@kernel.org>
    Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
    Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
    6c309052
clkctrl.c 17.7 KB