clk: clk-gpio: Make GPIO clock provider use descriptors only
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 24 Sep 2017 16:19:18 +0000 (18:19 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 2 Nov 2017 08:20:38 +0000 (01:20 -0700)
commit908a543ac7cdf3aa8a283ec42cab3c16e2fc45a2
tree1e3ddd5fec1f52481399503d590c32915d219bad
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
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>
drivers/clk/clk-gpio.c
include/linux/clk-provider.h