From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 29 Sep 2017 15:57:54 -0700 From: Stephen Boyd To: Linus Walleij Cc: Michael Turquette , linux-clk@vger.kernel.org, Sergej Sawazki , Jyri Sarha Subject: Re: [PATCH 1/2] clk: clk-gpio: Make GPIO clock provider use descriptors only Message-ID: <20170929225754.GO457@codeaurora.org> References: <20170924161919.24832-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20170924161919.24832-1-linus.walleij@linaro.org> List-ID: On 09/24, Linus Walleij wrote: > 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 > Cc: Jyri Sarha > Signed-off-by: Linus Walleij > --- > I don't have GPIO clocks in my setups so this will obviously > need some testing. > > I guess the public APIs in clk-provider.h could actually be > removed, but I'm not certain if that is proper. Maybe there > are plans for this driver to be used by other providers than the > device tree. If nobody is using them it's fine to remove them. This falls into another "basic clk type" that Mike and I don't really like to keep around. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project