Merge tag 'spi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown: "There's quite a lot of small driver specific fixes and enhancements in this release but the main activity has been around the loopback and spidev test drivers which is good to see as it should hopefully help improve the quality of all the drivers as people start to make use of the new code: - Additional tests in the loopback test driver for vmalloc() compatibility and around delays together with fixes for existing tests. - Support for testing continuous data transfer for use in soak testing. - Device property support for board info platforms. - Support for registering empty sets of devices via board info (useful when writing code to enumerate hardware automatically)" * tag 'spi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (52 commits) spi: cadence: Allow for GPIO pins to be used as chipselects spi-imx: Implements handling of the SPI_READY mode flag. spi: tegra: fix spelling mistake: "trasfer" -> "transfer" spi: spi-ti-qspi: Use bounce buffer if read buffer is not DMA'ble spi: Add can_dma like interface for spi_flash_read spi: dw: Disable clock after unregistering the host spi: double time out tolerance spi: atmel: add deepest PM support to SAMA5D2 spi: atmel: factorize reusable code for SPI controller init spi: orion: add LSB support spi: pl022: don't use uninitialized variable spi: loopback-test: fix spelling mistake: "minimam" -> "minimum" spi: dynamycally allocated message initialization spi: spi-ti-qspi: Remove unused dma_dev variable spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer spi: spi-ti-qspi: Use dma_engine wrapper for dma memcpy call spi: spidev_test: add option to continuously transfer data spi: loopback-test: fix potential integer overflow on multiple spi: sun6i: update max transfer size reported spi: pl022: Document property values ...
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
struct dma_chan;
|
||||
struct property_entry;
|
||||
struct spi_master;
|
||||
struct spi_transfer;
|
||||
struct spi_flash_read_message;
|
||||
@@ -375,6 +376,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
|
||||
* @unprepare_message: undo any work done by prepare_message().
|
||||
* @spi_flash_read: to support spi-controller hardwares that provide
|
||||
* accelerated interface to read from flash devices.
|
||||
* @spi_flash_can_dma: analogous to can_dma() interface, but for
|
||||
* controllers implementing spi_flash_read.
|
||||
* @flash_read_supported: spi device supports flash read
|
||||
* @cs_gpios: Array of GPIOs to use as chip select lines; one per CS
|
||||
* number. Any individual value may be -ENOENT for CS lines that
|
||||
@@ -538,6 +541,8 @@ struct spi_master {
|
||||
struct spi_message *message);
|
||||
int (*spi_flash_read)(struct spi_device *spi,
|
||||
struct spi_flash_read_message *msg);
|
||||
bool (*spi_flash_can_dma)(struct spi_device *spi,
|
||||
struct spi_flash_read_message *msg);
|
||||
bool (*flash_read_supported)(struct spi_device *spi);
|
||||
|
||||
/*
|
||||
@@ -891,7 +896,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
|
||||
unsigned i;
|
||||
struct spi_transfer *t = (struct spi_transfer *)(m + 1);
|
||||
|
||||
INIT_LIST_HEAD(&m->transfers);
|
||||
spi_message_init_no_memset(m);
|
||||
for (i = 0; i < ntrans; i++, t++)
|
||||
spi_message_add_tail(t, m);
|
||||
}
|
||||
@@ -1209,6 +1214,7 @@ int spi_flash_read(struct spi_device *spi,
|
||||
* @modalias: Initializes spi_device.modalias; identifies the driver.
|
||||
* @platform_data: Initializes spi_device.platform_data; the particular
|
||||
* data stored there is driver-specific.
|
||||
* @properties: Additional device properties for the device.
|
||||
* @controller_data: Initializes spi_device.controller_data; some
|
||||
* controllers need hints about hardware setup, e.g. for DMA.
|
||||
* @irq: Initializes spi_device.irq; depends on how the board is wired.
|
||||
@@ -1241,10 +1247,12 @@ struct spi_board_info {
|
||||
*
|
||||
* platform_data goes to spi_device.dev.platform_data,
|
||||
* controller_data goes to spi_device.controller_data,
|
||||
* device properties are copied and attached to spi_device,
|
||||
* irq is copied too
|
||||
*/
|
||||
char modalias[SPI_NAME_SIZE];
|
||||
const void *platform_data;
|
||||
const struct property_entry *properties;
|
||||
void *controller_data;
|
||||
int irq;
|
||||
|
||||
|
Reference in New Issue
Block a user