diff options
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r-- | include/linux/spi/spi.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index eb25cedb995b..e2051f39f6a8 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define __LINUX_SPI_H | 20 | #define __LINUX_SPI_H |
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/mod_devicetable.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
@@ -86,7 +87,7 @@ struct spi_device { | |||
86 | int irq; | 87 | int irq; |
87 | void *controller_state; | 88 | void *controller_state; |
88 | void *controller_data; | 89 | void *controller_data; |
89 | char modalias[32]; | 90 | char modalias[SPI_NAME_SIZE]; |
90 | 91 | ||
91 | /* | 92 | /* |
92 | * likely need more hooks for more protocol options affecting how | 93 | * likely need more hooks for more protocol options affecting how |
@@ -145,6 +146,7 @@ struct spi_message; | |||
145 | 146 | ||
146 | /** | 147 | /** |
147 | * struct spi_driver - Host side "protocol" driver | 148 | * struct spi_driver - Host side "protocol" driver |
149 | * @id_table: List of SPI devices supported by this driver | ||
148 | * @probe: Binds this driver to the spi device. Drivers can verify | 150 | * @probe: Binds this driver to the spi device. Drivers can verify |
149 | * that the device is actually present, and may need to configure | 151 | * that the device is actually present, and may need to configure |
150 | * characteristics (such as bits_per_word) which weren't needed for | 152 | * characteristics (such as bits_per_word) which weren't needed for |
@@ -170,6 +172,7 @@ struct spi_message; | |||
170 | * MMC, RTC, filesystem character device nodes, and hardware monitoring. | 172 | * MMC, RTC, filesystem character device nodes, and hardware monitoring. |
171 | */ | 173 | */ |
172 | struct spi_driver { | 174 | struct spi_driver { |
175 | const struct spi_device_id *id_table; | ||
173 | int (*probe)(struct spi_device *spi); | 176 | int (*probe)(struct spi_device *spi); |
174 | int (*remove)(struct spi_device *spi); | 177 | int (*remove)(struct spi_device *spi); |
175 | void (*shutdown)(struct spi_device *spi); | 178 | void (*shutdown)(struct spi_device *spi); |
@@ -734,7 +737,7 @@ struct spi_board_info { | |||
734 | * controller_data goes to spi_device.controller_data, | 737 | * controller_data goes to spi_device.controller_data, |
735 | * irq is copied too | 738 | * irq is copied too |
736 | */ | 739 | */ |
737 | char modalias[32]; | 740 | char modalias[SPI_NAME_SIZE]; |
738 | const void *platform_data; | 741 | const void *platform_data; |
739 | void *controller_data; | 742 | void *controller_data; |
740 | int irq; | 743 | int irq; |
@@ -802,4 +805,7 @@ spi_unregister_device(struct spi_device *spi) | |||
802 | device_unregister(&spi->dev); | 805 | device_unregister(&spi->dev); |
803 | } | 806 | } |
804 | 807 | ||
808 | extern const struct spi_device_id * | ||
809 | spi_get_device_id(const struct spi_device *sdev); | ||
810 | |||
805 | #endif /* __LINUX_SPI_H */ | 811 | #endif /* __LINUX_SPI_H */ |