Skip to content
  • Mike Turquette's avatar
    clk: composite: allow fixed rates & fixed dividers · f363e215
    Mike Turquette authored
    
    
    The composite clock assumes that any clock implementing the .recalc_rate
    callback will also implement .round_rate and .set_rate.  This is not
    always true; the basic fixed-rate clock will only implement .recalc_rate
    and a fixed-divider clock may choose to implement .recalc_rate and
    .round_rate but not .set_rate.
    
    Fix this by conditionally registering .round_rate and .set_rate
    callbacks based on the rate_ops passed in to clk_composite_register.
    
    Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
    Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
    Tested-by: default avatarEmilio López <emilio@elopez.com.ar>
    Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
    f363e215