All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Rini van Zetten <rini@arvoo.nl>
Cc: spi-devel-general@lists.sourceforge.net,
	linuxppc-dev list <Linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH -mm][POWERPC] mpc8xxx : allow SPI without cs.
Date: Thu, 18 Jun 2009 17:09:55 +0400	[thread overview]
Message-ID: <20090618130955.GA1369@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4A39DC80.7030906@arvoo.nl>

On Thu, Jun 18, 2009 at 08:19:44AM +0200, Rini van Zetten wrote:
> This patch adds the possibility to have a spi device without a cs.
>
> For example, the dts file should look something like this:
>
> spi-controller {
>        gpios = <&pio1 1 0      /* cs0 */
>                 0              /* cs1, no GPIO */
>                 &pio2 2 0>;    /* cs2 */
>

Interesting scheme. I guess this is for eSPI controllers that can
do their own chip-selects, but we want GPIO chip selects in addition
(or in place of built-in ones), correct?

> Signed-off-by: Rini van Zetten <rini@arvoo.nl>
> ---
> Changes :
> 	patch against 2.6.30-rc8-mm1

I assume this is v2 already, and I overlooked v1, sorry.

Technically the patch looks OK, but please fix some cosmetics issues.

checkpatch reports:

WARNING: patch prefix 'drivers' exists, appears to be a -p0 patch

WARNING: line over 80 characters
#131: FILE: spi/spi_mpc8xxx.c:714:
+                               dev_err(dev, "can't request gpio #%d: %d\n", i, ret);

WARNING: line over 80 characters
#141: FILE: spi/spi_mpc8xxx.c:724:
+                               dev_err(dev, "can't set output direction for gpio "

> --- drivers/spi/spi_mpc8xxx.c.org	2009-06-12 10:45:21.000000000 +0200
> +++ drivers/spi/spi_mpc8xxx.c	2009-06-12 10:54:48.000000000 +0200
> @@ -666,9 +666,10 @@ static void mpc8xxx_spi_cs_control(struc
>  	struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data);
>  	u16 cs = spi->chip_select;
>  	int gpio = pinfo->gpios[cs];
> -	bool alow = pinfo->alow_flags[cs];
> -
> -	gpio_set_value(gpio, on ^ alow);
> +	if (gpio != -EEXIST) {
> +		bool alow = pinfo->alow_flags[cs];
> +		gpio_set_value(gpio, on ^ alow);

Please put an empty line after variable declaration.


Thanks!

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

  parent reply	other threads:[~2009-06-18 13:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  6:19 [PATCH -mm][POWERPC] mpc8xxx : allow SPI without cs Rini van Zetten
2009-06-18 12:42 ` Kumar Gala
2009-06-18 13:09 ` Anton Vorontsov [this message]
2009-06-18 14:04   ` Kumar Gala
2009-06-19  7:26     ` [PATCH -mm v3][POWERPC] " Rini van Zetten
2009-06-19  7:45       ` Kumar Gala
2009-06-19 11:16         ` Rini van Zetten
2009-06-19 13:45       ` Anton Vorontsov
2009-06-19 14:18         ` [PATCH -mm v4][POWERPC] " Rini van Zetten
2009-07-03  1:38           ` [spi-devel-general] " David Brownell
2009-06-19 11:45     ` [PATCH -mm][POWERPC] " Leon Woestenberg
2009-06-19 11:45       ` Leon Woestenberg
2009-06-19 13:25       ` Anton Vorontsov
2009-06-19 13:25         ` Anton Vorontsov
2009-06-19 15:31         ` Grant Likely
2009-06-19 15:31           ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2009-06-11  9:10 [PATCH][POWERPC] mpc83xx " Rini van Zetten
2009-06-11 13:29 ` Kumar Gala
2009-06-12  8:59   ` [PATCH -mm][POWERPC] mpc8xxx " Rini van Zetten

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=20090618130955.GA1369@oksana.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=rini@arvoo.nl \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.