linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7] ARM: mxs: Add SPI driver for mx233/mx28
Date: Mon, 25 Jun 2012 15:30:31 +0200	[thread overview]
Message-ID: <201206251530.32203.marex@denx.de> (raw)
In-Reply-To: <CAOMZO5BYoU5=tJCUH1nkT24FJhhXXhNwF46yYREGJj7G33HdVg@mail.gmail.com>

Dear Fabio Estevam,

> Hi Marek,
> 
> On Sat, Jun 23, 2012 at 3:43 PM, Marek Vasut <marex@denx.de> wrote:
> > +       ssp->clk = clk_get(&pdev->dev, NULL);
> > +       if (IS_ERR(ssp->clk)) {
> > +               ret = PTR_ERR(ssp->clk);
> > +               goto out_spi_free;
> > +       }
> 
> You could use devm_clk_get here instead,
> 
> > +
> > +       clk_prepare_enable(ssp->clk);
> > +       ssp->clk_rate = clk_get_rate(ssp->clk) / 1000;
> > +
> > +       stmp_reset_block(ssp->base);
> > +
> > +       platform_set_drvdata(pdev, host);
> > +
> > +       ret = spi_register_master(host);
> > +       if (ret) {
> > +               dev_err(&pdev->dev, "Cannot register SPI master, %d\n",
> > ret); +               goto out_clk_put;
> > +       }
> > +
> > +       return 0;
> > +
> > +out_clk_put:
> > +       clk_disable_unprepare(ssp->clk);
> > +       clk_put(ssp->clk);
> 
> ,and then you would not need this clk_put here.

Oh, good point! I'll wait a little bit more until someone else reviews it and 
then I'll resubmit new version.

btw. I'm already working on a combined PIO/DMA-capable version -- seems like 
using PIO for small transfers and DMA for large transfers is good strategy that 
gives me about 200kbps boost ;-)

> Driver looks good. Thanks for working on it.
> 
> Regards,
> 
> Fabio Estevam

Best regards,
Marek Vasut

  reply	other threads:[~2012-06-25 13:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 18:43 [PATCH 1/7] ARM: mxs: Move SSP register definitions into separate file Marek Vasut
2012-06-23 18:43 ` [PATCH 2/7] ARM: mxs: Rename IMX2[38]_MMC to IMX2[38]_SSP Marek Vasut
2012-06-23 18:43 ` [PATCH 3/7] ARM: mxs: Add necessary bits into mxs-spi.h Marek Vasut
2012-06-23 18:43 ` [PATCH 4/7] ARM: mxs: Add SPI clock into clk framwork Marek Vasut
2012-06-26  6:54   ` Shawn Guo
2012-06-26 12:16     ` Marek Vasut
2012-06-26 12:24       ` Shawn Guo
2012-06-26 12:31         ` Marek Vasut
2012-06-23 18:43 ` [PATCH 5/7] ARM: mxs: Pull out parts shared between MMC and SPI Marek Vasut
2012-06-23 18:43 ` [PATCH 6/7] ARM: mxs: Pull out the SSP clock configuration function Marek Vasut
2012-06-23 18:43 ` [PATCH 7/7] ARM: mxs: Add SPI driver for mx233/mx28 Marek Vasut
2012-06-25 13:22   ` Fabio Estevam
2012-06-25 13:30     ` Marek Vasut [this message]
2012-06-26  7:43   ` Shawn Guo
2012-06-26 12:22     ` Marek Vasut
2012-06-26 12:31       ` Shawn Guo
2012-06-26 12:50         ` Marek Vasut
2012-06-26  6:52 ` [PATCH 1/7] ARM: mxs: Move SSP register definitions into separate file Shawn Guo
     [not found] <1340885853.84699.YahooMailClassic@web124903.mail.ne1.yahoo.com>
2012-06-28 22:09 ` [PATCH 7/7] ARM: mxs: Add SPI driver for mx233/mx28 Marek Vasut
2012-07-08  2:01   ` Alain-Serge Nagni
2012-07-08  5:15     ` Marek Vasut

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=201206251530.32203.marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.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).