Merge branch 'clk-hw-register' (early part) into clk-next
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 21 Apr 2016 21:47:18 +0000 (14:47 -0700)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 21 Apr 2016 21:47:18 +0000 (14:47 -0700)
* 'clk-hw-register' (early part):
  clk: fixed-rate: Add hw based registration APIs
  clk: gpio: Add hw based registration APIs
  clk: composite: Add hw based registration APIs
  clk: fractional-divider: Add hw based registration APIs
  clk: fixed-factor: Add hw based registration APIs
  clk: mux: Add hw based registration APIs
  clk: gate: Add hw based registration APIs
  clk: divider: Add hw based registration APIs
  clkdev: Add clk_hw based registration APIs
  clk: Add clk_hw OF clk providers
  clk: Add {devm_}clk_hw_{register,unregister}() APIs
  clkdev: Remove clk_register_clkdevs()

1  2 
drivers/clk/clk-composite.c
drivers/clk/clk.c
include/linux/clk-provider.h

index 8aec4b3d58599070063524a71a8a67399e6e1104,463fadd5a68f300f9d22469d3550b73d988d514a..00269de2f390deef253efee479b4b2cff70446d5
@@@ -317,20 -288,22 +321,37 @@@ struct clk_hw *clk_hw_register_composit
  
  err:
        kfree(composite);
-       return clk;
+       return hw;
+ }
+ struct clk *clk_register_composite(struct device *dev, const char *name,
+                       const char * const *parent_names, int num_parents,
+                       struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
+                       struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
+                       struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
+                       unsigned long flags)
+ {
+       struct clk_hw *hw;
+       hw = clk_hw_register_composite(dev, name, parent_names, num_parents,
+                       mux_hw, mux_ops, rate_hw, rate_ops, gate_hw, gate_ops,
+                       flags);
+       if (IS_ERR(hw))
+               return ERR_CAST(hw);
+       return hw->clk;
  }
 +
 +void clk_unregister_composite(struct clk *clk)
 +{
 +      struct clk_composite *composite;
 +      struct clk_hw *hw;
 +
 +      hw = __clk_get_hw(clk);
 +      if (!hw)
 +              return;
 +
 +      composite = to_clk_composite(hw);
 +
 +      clk_unregister(clk);
 +      kfree(composite);
 +}
Simple merge
index 02a8f15b528ae24aab031e75f973dd3099e3c41f,c3fc042d517c688327684a5f25265f4d1d25e315..0c72204c75fc9428f08c9e63667bf75dee0bc153
@@@ -604,7 -645,13 +646,14 @@@ struct clk *clk_register_composite(stru
                struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
                struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
                unsigned long flags);
 +void clk_unregister_composite(struct clk *clk);
+ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,
+               const char * const *parent_names, int num_parents,
+               struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
+               struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
+               struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
+               unsigned long flags);
+ void clk_hw_unregister_composite(struct clk_hw *hw);
  
  /***
   * struct clk_gpio_gate - gpio gated clock