aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/ads7846.h3
-rw-r--r--include/linux/spi/spi.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
index 92bd0839d5b4..c64de9dd7631 100644
--- a/include/linux/spi/ads7846.h
+++ b/include/linux/spi/ads7846.h
@@ -14,7 +14,8 @@ enum ads7846_filter {
14struct ads7846_platform_data { 14struct ads7846_platform_data {
15 u16 model; /* 7843, 7845, 7846, 7873. */ 15 u16 model; /* 7843, 7845, 7846, 7873. */
16 u16 vref_delay_usecs; /* 0 for external vref; etc */ 16 u16 vref_delay_usecs; /* 0 for external vref; etc */
17 u16 vref_mv; /* external vref value, milliVolts */ 17 u16 vref_mv; /* external vref value, milliVolts
18 * ads7846: if 0, use internal vref */
18 bool keep_vref_on; /* set to keep vref on for differential 19 bool keep_vref_on; /* set to keep vref on for differential
19 * measurements as well */ 20 * measurements as well */
20 bool swap_xy; /* swap x and y axes */ 21 bool swap_xy; /* swap x and y axes */
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index b4d7710bc38d..bb4f5fbbbd8e 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -581,7 +581,7 @@ extern int spi_bus_unlock(struct spi_master *master);
581 * Callable only from contexts that can sleep. 581 * Callable only from contexts that can sleep.
582 */ 582 */
583static inline int 583static inline int
584spi_write(struct spi_device *spi, const u8 *buf, size_t len) 584spi_write(struct spi_device *spi, const void *buf, size_t len)
585{ 585{
586 struct spi_transfer t = { 586 struct spi_transfer t = {
587 .tx_buf = buf, 587 .tx_buf = buf,
@@ -605,7 +605,7 @@ spi_write(struct spi_device *spi, const u8 *buf, size_t len)
605 * Callable only from contexts that can sleep. 605 * Callable only from contexts that can sleep.
606 */ 606 */
607static inline int 607static inline int
608spi_read(struct spi_device *spi, u8 *buf, size_t len) 608spi_read(struct spi_device *spi, void *buf, size_t len)
609{ 609{
610 struct spi_transfer t = { 610 struct spi_transfer t = {
611 .rx_buf = buf, 611 .rx_buf = buf,
@@ -620,8 +620,8 @@ spi_read(struct spi_device *spi, u8 *buf, size_t len)
620 620
621/* this copies txbuf and rxbuf data; for small transfers only! */ 621/* this copies txbuf and rxbuf data; for small transfers only! */
622extern int spi_write_then_read(struct spi_device *spi, 622extern int spi_write_then_read(struct spi_device *spi,
623 const u8 *txbuf, unsigned n_tx, 623 const void *txbuf, unsigned n_tx,
624 u8 *rxbuf, unsigned n_rx); 624 void *rxbuf, unsigned n_rx);
625 625
626/** 626/**
627 * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read 627 * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read