|
@@ -118,21 +118,21 @@ struct spi_device_type {
|
118
|
118
|
* @v device SPI device
|
119
|
119
|
* @v address Address from which to read
|
120
|
120
|
* @v data Data buffer
|
121
|
|
- * @v len Length of data to read, in @b words
|
|
121
|
+ * @v len Length of data buffer
|
122
|
122
|
* @ret rc Return status code
|
123
|
123
|
*/
|
124
|
124
|
int ( * read ) ( struct spi_device *device, unsigned int address,
|
125
|
|
- void *data, unsigned int len );
|
|
125
|
+ void *data, size_t len );
|
126
|
126
|
/** Write data to device
|
127
|
127
|
*
|
128
|
128
|
* @v device SPI device
|
129
|
129
|
* @v address Address to which to write
|
130
|
130
|
* @v data Data buffer
|
131
|
|
- * @v len Length of data to write, in @b words
|
|
131
|
+ * @v len Length of data buffer
|
132
|
132
|
* @ret rc Return status code
|
133
|
133
|
*/
|
134
|
134
|
int ( * write ) ( struct spi_device *device, unsigned int address,
|
135
|
|
- const void *data, unsigned int len );
|
|
135
|
+ const void *data, size_t len );
|
136
|
136
|
};
|
137
|
137
|
|
138
|
138
|
/**
|
|
@@ -192,18 +192,15 @@ struct spi_bus {
|
192
|
192
|
* @v address Address to read/write (<0 for no address)
|
193
|
193
|
* @v data_out TX data buffer (or NULL)
|
194
|
194
|
* @v data_in RX data buffer (or NULL)
|
195
|
|
- * @v len Length of transfer (in @b words)
|
|
195
|
+ * @v len Length of data buffer(s)
|
196
|
196
|
*
|
197
|
197
|
* This issues the specified command and optional address to
|
198
|
198
|
* the SPI device, then reads and/or writes data to/from the
|
199
|
|
- * data buffers. Note that the transfer length is measured in
|
200
|
|
- * words, not in bytes. Some SPI devices have 16-bit word
|
201
|
|
- * lengths; take care with these devices not to accidentally
|
202
|
|
- * read or write twice as much data as intended.
|
|
199
|
+ * data buffers.
|
203
|
200
|
*/
|
204
|
201
|
int ( * rw ) ( struct spi_bus *bus, struct spi_device *device,
|
205
|
202
|
unsigned int command, int address,
|
206
|
|
- const void *data_out, void *data_in, unsigned int len );
|
|
203
|
+ const void *data_out, void *data_in, size_t len );
|
207
|
204
|
};
|
208
|
205
|
|
209
|
206
|
/** Clock phase (CPHA) mode bit
|