linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Shubhrajyoti Datta
	<shubhrajyoti.datta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	soren.brinkmann-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
	Shubhrajyoti Datta
	<shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCHv2 2/3] spi/spi-xilinx:  Add clock support
Date: Thu, 10 Mar 2016 10:29:48 +0700	[thread overview]
Message-ID: <20160310032948.GI3898@sirena.org.uk> (raw)
In-Reply-To: <1457513242-11202-2-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

On Wed, Mar 09, 2016 at 02:17:21PM +0530, Shubhrajyoti Datta wrote:

> +       xspi->clk = devm_clk_get(&pdev->dev, NULL);
> +       if (IS_ERR(xspi->clk)) {

As someone pointed out on the previous version of the series this will
cause the driver to fail to probe with existing DTs.  We probably need
to explicitly handle a -ENOENT as a "this clock will never appear" or
something.

This also requests a single nameless clock but someone pointed out on
the previous version there are multiple clocks into the IP.  Even if
you only want to add one clock right now the clock should probably be
named so we can scale up.

> +	}
> +	ret = clk_prepare_enable(xspi->clk);

Missing blank line here.

> +	if (ret)
> +		dev_err(&pdev->dev, "Unable to enable clock.\n");
> +

This isn't really checking the return code - if we failed to enable the
clock we should be failing the probe, not just carrying on.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2016-03-10  3:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09  8:47 [PATCHv2 1/3] bindings: spi: Add devicetree binding for spi-xilinx Shubhrajyoti Datta
     [not found] ` <1457513242-11202-1-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-03-09  8:47   ` [PATCHv2 2/3] spi/spi-xilinx: Add clock support Shubhrajyoti Datta
     [not found]     ` <1457513242-11202-2-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2016-03-10  3:29       ` Mark Brown [this message]
     [not found]         ` <20160310032948.GI3898-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-03-10 11:20           ` Shubhrajyoti Datta
2016-03-09  8:47   ` [PATCHv2 3/3] bindings: spi: Add clock entries for spi-xilinx Shubhrajyoti Datta
2016-03-10  3:30   ` [PATCHv2 1/3] bindings: spi: Add devicetree binding " Mark Brown
     [not found]     ` <20160310033027.GJ3898-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-03-17 16:43       ` Rob Herring
2016-03-17 16:46         ` Mark Brown
2016-03-10  3:39   ` Applied "spi: xilinx: Add devicetree binding for spi-xilinx" to the spi tree Mark Brown
2016-03-17 16:32   ` [PATCHv2 1/3] bindings: spi: Add devicetree binding for spi-xilinx Rob Herring

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=20160310032948.GI3898@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@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).