[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ce3260dafcf3b1ace3d6bb4255e2d9b.sboyd@kernel.org>
Date: Fri, 20 Dec 2024 15:55:21 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Jerome Brunet <jbrunet@...libre.com>, Kevin Hilman <khilman@...libre.com>, Martin Blumenstingl <martin.blumenstingl@...glemail.com>, Michael Turquette <mturquette@...libre.com>, Neil Armstrong <neil.armstrong@...aro.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, linux-amlogic@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org, Jerome Brunet <jbrunet@...libre.com>
Subject: Re: [PATCH 1/3] clk: add a clk_hw helper to get the associate device structure
Quoting Jerome Brunet (2024-12-20 09:17:42)
> Add an helper function to get the 'struct device' associated with
Add a helper
> an a 'clk_hw'. This can be used by clock drivers to access various
with a 'clk_hw'
> device related functionnalities such as devres, dev_ prints, etc ...
s/functionnalities/functionality/
>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
> ---
> drivers/clk/clk.c | 6 ++++++
> include/linux/clk-provider.h | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 9b45fa005030f56e1478b9742715ebcde898133f..7e734d2955978cafd77d911562a26f1646684ec2 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -365,6 +365,12 @@ const char *clk_hw_get_name(const struct clk_hw *hw)
> }
> EXPORT_SYMBOL_GPL(clk_hw_get_name);
>
> +struct device *clk_hw_get_dev(const struct clk_hw *hw)
Please document with kernel doc
> +{
> + return hw->core->dev;
> +}
> +EXPORT_SYMBOL_GPL(clk_hw_get_dev);
I suspect a quick KUnit test can be written up as well that confirms the
device the clk is registered with is returned.
Powered by blists - more mailing lists