mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Harini Katakam <harinik@xilinx.com>
Cc: grant.likely@linaro.org, robh+dt@kernel.org, pawel.moll@arm.com,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, michals@xilinx.com
Subject: Re: [PATCH v3 1/2] SPI: Add driver for Cadence SPI controller
Date: Thu, 10 Apr 2014 23:48:25 +0100	[thread overview]
Message-ID: <20140410224825.GI6518@sirena.org.uk> (raw)
In-Reply-To: <1397132030-2440-1-git-send-email-harinik@xilinx.com>

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

On Thu, Apr 10, 2014 at 05:43:49PM +0530, Harini Katakam wrote:
> Add driver for Cadence SPI controller. This is used in Xilinx Zynq.

This looks mostly good, the issues below are very small.

> +static int __maybe_unused cdns_spi_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev = container_of(dev,
> +			struct platform_device, dev);
> +	struct spi_master *master = platform_get_drvdata(pdev);
> +	struct cdns_spi *xspi = spi_master_get_devdata(master);
> +
> +	spi_master_suspend(master);
> +
> +	clk_disable(xspi->ref_clk);
> +
> +	clk_disable(xspi->pclk);

You're only doing clk_disable() here, I would expect the clocks to also
be unprepared over suspend - there is no value in leaving them prepared
that I can see.  Just use clk_unprepare_disable().

It would also be good (though not essential) to implement runtime PM and
disable the clocks while there are no transfers in progress for a small
power saving.  The auto_runtime_pm feature in the core will do the
runtime PM calls for you.

Otherwise this looks good.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-04-10 22:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 12:13 Harini Katakam
2014-04-10 12:13 ` [PATCH v3 2/2] devicetree: Add devicetree bindings documentation for Cadence SPI Harini Katakam
2014-04-10 12:21 ` [PATCH v3 1/2] SPI: Add driver for Cadence SPI controller Mark Brown
2014-04-10 12:23   ` Harini Katakam
2014-04-10 22:48 ` Mark Brown [this message]
2014-04-11  3:36   ` Harini Katakam
2014-04-14  9:11     ` Harini Katakam

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=20140410224825.GI6518@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=harinik@xilinx.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michals@xilinx.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®