public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Girish K S <girishks2000@gmail.com>
Cc: spi-devel-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/4] spi: s3c64xx: add gpio quirk for controller
Date: Thu, 7 Feb 2013 11:55:47 +0000	[thread overview]
Message-ID: <20130207115546.GA3801@sirena.org.uk> (raw)
In-Reply-To: <1360105784-12282-4-git-send-email-ks.giri@samsung.com>

On Tue, Feb 05, 2013 at 03:09:43PM -0800, Girish K S wrote:
> This patch adds support for spi controllers with
> dedicated clk/miso/mosi/cs pins. It skips the gpio
> parsing and initialization for controllers that
> have dedicated pins.

>  		if (sdd->tgl_spi != spi) { /* if last mssg on diff device */
>  			/* Deselect the last toggled device */
>  			cs = sdd->tgl_spi->controller_data;
> -			gpio_set_value(cs->line,
> -				spi->mode & SPI_CS_HIGH ? 0 : 1);
> +			if (!(sdd->port_conf->quirks & S3C64XX_SPI_QUIRK_GPIO))
> +				gpio_set_value(cs->line,
> +					spi->mode & SPI_CS_HIGH ? 0 : 1);
>  		}

This isn't going to work with system designs which ignore the /CS line
the controller has and just use a GPIO instead.  This is very common,
for example when connecting multiple devices to the same SPI bus.

It seems like there's really two changes here.  One change is making the
provision of pinmux information optional, the other is allowing the user
to use the controller /CS management rather than using GPIO.

  parent reply	other threads:[~2013-02-07 11:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 23:09 [PATCH 0/4] Add polling support for 64xx spi controller Girish K S
2013-02-05 23:09 ` [PATCH 1/4] spi: s3c64xx: modified error interrupt handling and init Girish K S
2013-02-06 10:26   ` Grant Likely
2013-02-06 20:12     ` Girish KS
2013-02-06 23:48       ` Grant Likely
2013-02-07  0:33         ` Girish KS
2013-02-08  1:04         ` Girish KS
2013-02-08  8:16           ` Girish KS
2013-02-07 11:09       ` Tomasz Figa
2013-02-07 17:46         ` Girish KS
2013-02-08  8:33           ` Tomasz Figa
2013-02-08  8:58             ` Girish KS
2013-02-08  9:26               ` Girish KS
2013-02-05 23:09 ` [PATCH 2/4] spi: s3c64xx: added support for polling mode Girish K S
2013-02-06 10:35   ` Grant Likely
2013-02-06 22:04     ` Girish KS
2013-02-05 23:09 ` [PATCH 3/4] spi: s3c64xx: add gpio quirk for controller Girish K S
2013-02-06 10:40   ` Grant Likely
2013-02-06 22:38     ` Girish KS
2013-02-07 11:55   ` Mark Brown [this message]
2013-02-07 18:54     ` Girish KS
2013-02-08 13:17       ` Mark Brown
2013-02-05 23:09 ` [PATCH 4/4] spi: s3c64xx: add support for exynos5440 spi Girish K S

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=20130207115546.GA3801@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=girishks2000@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox