public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	u-boot@lists.denx.de
Cc: Amarula patchwork <linux-amarula@amarulasolutions.com>,
	michael@amarulasolutions.com,
	Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH 1/7] dm: clk: add missing stub when CONFIG_CLK is deactivated
Date: Wed, 28 Sep 2022 12:41:26 -0400	[thread overview]
Message-ID: <de35547a-5131-2434-9668-2bc34192fce7@gmail.com> (raw)
In-Reply-To: <20220928084509.2758974-2-dario.binacchi@amarulasolutions.com>

On 9/28/22 04:45, Dario Binacchi wrote:
> Add missing stub for functions [devm_]clk_...() when CONFIG_CLK is
> deactivated.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> 
>   include/clk.h | 32 +++++++++++++++++++++++++++++++-
>   1 file changed, 31 insertions(+), 1 deletion(-)
> 
> diff --git a/include/clk.h b/include/clk.h
> index 76bb64bb5ee0..407513e0fa29 100644
> --- a/include/clk.h
> +++ b/include/clk.h
> @@ -88,8 +88,9 @@ struct clk_bulk {
>   	unsigned int count;
>   };
>   
> -#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK)
>   struct phandle_1_arg;
> +
> +#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK)
>   /**
>    * clk_get_by_phandle() - Get a clock by its phandle information (of-platadata)
>    * @dev: Device containing the phandle
> @@ -258,12 +259,26 @@ int clk_release_all(struct clk *clk, int count);
>   void devm_clk_put(struct udevice *dev, struct clk *clk);
>   
>   #else
> +
> +static inline int clk_get_by_phandle(struct udevice *dev, const
> +				     struct phandle_1_arg *cells,
> +				     struct clk *clk)
> +{
> +	return -ENOSYS;
> +}
> +
>   static inline int clk_get_by_index(struct udevice *dev, int index,
>   				   struct clk *clk)
>   {
>   	return -ENOSYS;
>   }
>   
> +static inline int clk_get_by_index_nodev(ofnode node, int index,
> +					 struct clk *clk)
> +{
> +	return -ENOSYS;
> +}
> +
>   static inline int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk)
>   {
>   	return -ENOSYS;
> @@ -275,6 +290,17 @@ static inline int clk_get_by_name(struct udevice *dev, const char *name,
>   	return -ENOSYS;
>   }
>   
> +static inline struct clk *devm_clk_get(struct udevice *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +
> +static inline struct clk *devm_clk_get_optional(struct udevice *dev,
> +						const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +
>   static inline int
>   clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
>   {
> @@ -285,6 +311,10 @@ static inline int clk_release_all(struct clk *clk, int count)
>   {
>   	return -ENOSYS;
>   }
> +
> +static inline void devm_clk_put(struct udevice *dev, struct clk *clk)
> +{
> +}
>   #endif
>   
>   /**

Reviewed-by: Sean Anderson <seanga2@gmail.com>

  reply	other threads:[~2022-09-28 16:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  8:45 [PATCH 0/7] Support NAND ONFI EDO mode for imx8mn architecture Dario Binacchi
2022-09-28  8:45 ` [PATCH 1/7] dm: clk: add missing stub when CONFIG_CLK is deactivated Dario Binacchi
2022-09-28 16:41   ` Sean Anderson [this message]
2022-09-28  8:45 ` [PATCH 2/7] clk: imx: gate2 support shared counter and relative clock functions Dario Binacchi
2022-09-28  8:45 ` [PATCH 3/7] clk: imx: clk-imx8mn add gpmi nand clocks Dario Binacchi
2022-09-28  8:45 ` [PATCH 4/7] imx: gpmi: Add register needed to control nand bus timing Dario Binacchi
2022-09-28  8:45 ` [PATCH 5/7] mtd: mxs_nand: don't get the gpmi_apbh_dma clock Dario Binacchi
2022-09-28  8:45 ` [PATCH 6/7] mtd: mxs_nand: get the clock with the right name Dario Binacchi
2022-09-28  8:45 ` [PATCH 7/7] mtd: mxs_nand: Support EDO mode for imx8mn architecture Dario Binacchi
2022-10-09  8:40   ` Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de35547a-5131-2434-9668-2bc34192fce7@gmail.com \
    --to=seanga2@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=michael@amarulasolutions.com \
    --cc=neil.armstrong@linaro.org \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox