aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2017-09-24 12:19:18 -0400
committerStephen Boyd <sboyd@codeaurora.org>2017-11-02 04:20:38 -0400
commit908a543ac7cdf3aa8a283ec42cab3c16e2fc45a2 (patch)
tree1e3ddd5fec1f52481399503d590c32915d219bad /include/linux/clk-provider.h
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
clk: clk-gpio: Make GPIO clock provider use descriptors only
After som grep:ing it turns out nothing in the kernel is really calling clk_[hw_]_register_gpio_[gate|mux](). All existing instances are just created directly from the device tree probe functions at the bottom of the clk-gpio.c clock provider file. This means we can change the signature of the function without any consequences! Everyone should be using GPIO descriptors now, so let's just go in and enforce that. This saves a bit of code since GPIO descriptors know inherently if they are active low so no need for the code keeping track of that. We leave it to the caller to come up with the GPIO descriptor. It is nowadays possible to do that even without a corresponding device, so no excuse not to pass them around. The one in-kernel user lifecycles it using devm_gpiod_get() in gpio_clk_driver_probe(). Cc: Sergej Sawazki <ce3a@gmx.de> Cc: Jyri Sarha <jsarha@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 5100ec1b5d55..063d8cb9926f 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -682,10 +682,10 @@ struct clk_gpio {
682 682
683extern const struct clk_ops clk_gpio_gate_ops; 683extern const struct clk_ops clk_gpio_gate_ops;
684struct clk *clk_register_gpio_gate(struct device *dev, const char *name, 684struct clk *clk_register_gpio_gate(struct device *dev, const char *name,
685 const char *parent_name, unsigned gpio, bool active_low, 685 const char *parent_name, struct gpio_desc *gpiod,
686 unsigned long flags); 686 unsigned long flags);
687struct clk_hw *clk_hw_register_gpio_gate(struct device *dev, const char *name, 687struct clk_hw *clk_hw_register_gpio_gate(struct device *dev, const char *name,
688 const char *parent_name, unsigned gpio, bool active_low, 688 const char *parent_name, struct gpio_desc *gpiod,
689 unsigned long flags); 689 unsigned long flags);
690void clk_hw_unregister_gpio_gate(struct clk_hw *hw); 690void clk_hw_unregister_gpio_gate(struct clk_hw *hw);
691 691
@@ -701,11 +701,11 @@ void clk_hw_unregister_gpio_gate(struct clk_hw *hw);
701 701
702extern const struct clk_ops clk_gpio_mux_ops; 702extern const struct clk_ops clk_gpio_mux_ops;
703struct clk *clk_register_gpio_mux(struct device *dev, const char *name, 703struct clk *clk_register_gpio_mux(struct device *dev, const char *name,
704 const char * const *parent_names, u8 num_parents, unsigned gpio, 704 const char * const *parent_names, u8 num_parents, struct gpio_desc *gpiod,
705 bool active_low, unsigned long flags); 705 unsigned long flags);
706struct clk_hw *clk_hw_register_gpio_mux(struct device *dev, const char *name, 706struct clk_hw *clk_hw_register_gpio_mux(struct device *dev, const char *name,
707 const char * const *parent_names, u8 num_parents, unsigned gpio, 707 const char * const *parent_names, u8 num_parents, struct gpio_desc *gpiod,
708 bool active_low, unsigned long flags); 708 unsigned long flags);
709void clk_hw_unregister_gpio_mux(struct clk_hw *hw); 709void clk_hw_unregister_gpio_mux(struct clk_hw *hw);
710 710
711/** 711/**