Re: Ask for help on SPI slave side driver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux