9
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
Antony Pavlov e21962062e spi: altera_spi: fix altera_spi_setup() return error codes
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 13:59:16 +02:00
Alexander Shiyan 56b3558f1d spi: altera_spi: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:06:11 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Franck Jullien 146bea9b9b spi/altera_spi: Add cs_change support
The Linux kernel says (spi.h) :

* All SPI transfers start with the relevant chipselect active.  Normally
* it stays selected until after the last transfer in a message.  Drivers
* can affect the chipselect signal using cs_change.
*
* (i) If the transfer isn't the last one in the message, this flag is
* used to make the chipselect briefly go inactive in the middle of the
* message.  Toggling chipselect in this way may be needed to terminate
* a chip command, letting a single spi_message perform all of group of
* chip transactions together.
*
* (ii) When the transfer is the last one in the message, the chip may
* stay selected until the next transfer.  On multi-device SPI busses
* with nothing blocking messages going to other devices, this is just
* a performance hint; starting a message to another device deselects
* this one.  But in other cases, this can be used to ensure correctness.
* Some devices need protocol transactions to be built from a series of
* spi_message submissions, where the content of one message is
* determined by the results of previous messages and where the whole
* transaction
* ends when the chipselect goes intactive.

In other words, cs_change changes the default chipselect *behavior*.

Support of cs_change is necessary to implement the mci spi driver.

This patch also fix few things:

Passing the bus number to the brand new master device.
Disable chipselect during master->setup.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:38:34 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Franck Jullien d7bb45559c nios2: Add Altera SPI master driver
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-24 18:44:25 +02:00