linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Shubhrajyoti Datta
	<shubhrajyoti.datta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Shubhrajyoti Datta
	<shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] spi/spi-xilinx: Add clock support
Date: Wed, 9 Mar 2016 10:07:52 +0100	[thread overview]
Message-ID: <56DFE7E8.3040902@metafoo.de> (raw)
In-Reply-To: <1457426528-15247-1-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>

On 03/08/2016 09:42 AM, Shubhrajyoti Datta wrote:
> Add basic clock support. The clocks are requested at probe
> and released at remove.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/spi/spi-xilinx.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index 3009121..7e12338 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -21,6 +21,7 @@
>  #include <linux/spi/spi_bitbang.h>
>  #include <linux/spi/xilinx_spi.h>
>  #include <linux/io.h>
> +#include <linux/clk.h>
>  
>  #define XILINX_SPI_MAX_CS	32
>  
> @@ -83,6 +84,7 @@ struct xilinx_spi {
>  	struct spi_bitbang bitbang;
>  	struct completion done;
>  	void __iomem	*regs;	/* virt. address of the control registers */
> +	struct clk *clk;
>  
>  	int		irq;
>  
> @@ -428,6 +430,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
>  		goto put_master;
>  	}
>  
> +	xspi->clk = devm_clk_get(&pdev->dev, NULL);

Considering that the core has multiple clock inputs this should specify
which clock you are referencing here.

Also this breaks existing devicetrees which do not specify the clock...

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-03-09  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08  8:42 [PATCH] spi/spi-xilinx: Add clock support Shubhrajyoti Datta
     [not found] ` <1457426528-15247-1-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-03-08 18:02   ` Sören Brinkmann
2016-03-09  2:42   ` Mark Brown
     [not found]     ` <20160309024200.GD3898-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-03-09  8:53       ` Shubhrajyoti Datta
2016-03-09  9:07   ` Lars-Peter Clausen [this message]

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=56DFE7E8.3040902@metafoo.de \
    --to=lars-qo5elluwu/uelga04laivw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=shubhrajyoti.datta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).