Linux Samsung SOC development
 help / color / mirror / Atom feed
From: ysh <youshenghui0322@163.com>
To: Mark Brown <broonie@kernel.org>
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
	linux-samsung-soc@vger.kernel.org, linux-spi@vger.kernel.org,
	jassi.brar@samsung.com
Subject: Re: Ask for help on SPI slave side driver support
Date: Mon, 14 Oct 2013 22:51:06 +0800	[thread overview]
Message-ID: <525C04DA.6050409@163.com> (raw)
In-Reply-To: <20131014112519.GQ2443@sirena.org.uk>

On 2013-10-14 19:25, Mark Brown wrote:
> On Mon, Oct 14, 2013 at 03:05:58AM +0800, YouShenghui wrote:
>
> Please fix your mailer to word wrap within paragraphs, your messages are
> very hard to read.
>
>> Ok, I have one question when reading drivers/spi/spi-s3c64xx.c
>> In s3c64xx_spi_setup, cs->line(S3C64XX_GPC(3)) is set to GPIOF_OUT_INIT_HIGH, that means an general output pin.
>> But the other three(clk, mosi, miso) was set to 2 by s3c64xx_spi0_cfg_gpio. This is just what is needed by SPI.
>> My question is why wasn't cs->line also set to 2 to use SPI CS0?
>
> In common with many drivers this driver controls the chp select as a
> GPIO.  Generally the hardware is less flexible than Linux can be if it
> implements automatic chip select handling at all.
>
>> When I want to use spi as slave side, should I set S3C64XX_GPC(3)'s cfg of  to 0(input) or 2?
>
> I don't think the controller has any slave support natively so you'd
> probably need to put it into GPIO mode.
Got it, then what about the setting of clk, mosi, miso pin in slave mode?
Do you mean I need to simulate spi slave side using four gpios?

thanks
zduan

  reply	other threads:[~2013-10-14 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-29 16:23 Ask for help on SPI slave side driver support YouShenghui
2013-09-29 23:20 ` Tomasz Figa
2013-09-30  5:38   ` YouShenghui
2013-09-30  9:33   ` Mark Brown
     [not found]     ` <4cd52b0c.af8e.14184497bb9.Coremail.youshenghui0322@163.com>
2013-10-07 11:33       ` Mark Brown
     [not found]         ` <4e8f3999.9132.141b335ef13.Coremail.youshenghui0322@163.com>
2013-10-14 11:25           ` Mark Brown
2013-10-14 14:51             ` ysh [this message]
2013-10-14 16:24               ` Mark Brown

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=525C04DA.6050409@163.com \
    --to=youshenghui0322@163.com \
    --cc=broonie@kernel.org \
    --cc=jassi.brar@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=tomasz.figa@gmail.com \
    /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