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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -323,6 +323,10 @@ struct clk_hw { · 322 unmodified lines | |||
| 323 | * @fixed_rate: constant frequency of clock | 323 | * @fixed_rate: constant frequency of clock |
| 324 | * @fixed_accuracy: constant accuracy of clock in ppb (parts per billion) | 324 | * @fixed_accuracy: constant accuracy of clock in ppb (parts per billion) |
| 325 | * @flags: hardware specific flags | 325 | * @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. | ||
| 326 | */ | 330 | */ |
| 327 | struct clk_fixed_rate { | 331 | struct clk_fixed_rate { |
| 328 | struct clk_hw hw; | 332 | struct clk_hw hw; |
| @@ -331,6 +335,8 @@ struct clk_fixed_rate { · 2 unmodified lines | |||
| 331 | unsigned long flags; | 335 | unsigned long flags; |
| 332 | }; | 336 | }; |
| 333 | 337 | ||
| 338 | #define CLK_FIXED_RATE_PARENT_ACCURACY BIT(0) | ||
| 339 | |||
| 334 | extern const struct clk_ops clk_fixed_rate_ops; | 340 | extern const struct clk_ops clk_fixed_rate_ops; |
| 335 | struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev, | 341 | struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev, |
| 336 | struct device_node *np, const char *name, | 342 | struct device_node *np, const char *name, |