History

clk: fixed-rate: Add clk flags for parent accuracy

Some clk providers want to use the accuracy of the parent clk and use the fixed rate basic type clk to do that. This requires getting the parent clk and extracting the accuracy before registering the fixed rate clk. Let's add a flag for this and update the clk_ops to support this.

Stephen Boyd committed 7 years ago

Commit 58f0c4b1 parent 2d34f092 files · +12 −1Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/clk-provider.h+6−0
@@ -323,6 +323,10 @@ struct clk_hw { · 322 unmodified lines
323323 * @fixed_rate: constant frequency of clock
324324 * @fixed_accuracy: constant accuracy of clock in ppb (parts per billion)
325325 * @flags: hardware specific flags
326+ *
327+ * Flags:
328+ * * CLK_FIXED_RATE_PARENT_ACCURACY - Use the accuracy of the parent clk
329+ * instead of what's set in @fixed_accuracy.
326330 */
327331 struct clk_fixed_rate {
328332 struct clk_hw hw;
@@ -331,6 +335,8 @@ struct clk_fixed_rate { · 2 unmodified lines
331335 unsigned long flags;
332336 };
333337
338+#define CLK_FIXED_RATE_PARENT_ACCURACY BIT(0)
339+
334340 extern const struct clk_ops clk_fixed_rate_ops;
335341 struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev,
336342 struct device_node *np, const char *name,