Make bit-order SPI H/W feature configurable for better error detection

This commit is contained in:
Gregory Nutt
2016-08-08 11:54:13 -06:00
parent c3cfd37791
commit 6df28bc74e
9 changed files with 44 additions and 9 deletions
+5 -3
View File
@@ -59,10 +59,12 @@
* Pre-processor Definitions
****************************************************************************/
/* H/W features must be enabled in order to support LSB first operation */
/* Bit order H/W feature must be enabled in order to support LSB first
* operation.
*/
#ifndef CONFIG_SPI_HWFEATURES
# error CONFIG_SPI_HWFEATURES=y required by this driver
#if !defined(CONFIG_SPI_HWFEATURES) || !defined(CONFIG_SPI_BITORDER)
# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver
#endif
/* Cisplay resolution */
+8
View File
@@ -72,6 +72,14 @@ config SPI_CS_CONTROL
Enables possibilities to define the behavior of CS.
Also enables the hwfeatures() interface method.
config SPI_BITORDER
bool "SPI Bit Order Control"
default n
select SPI_HWFEATURES
---help---
Enables capability to select MSB- or LSB-first hardware feature for
data transfers.
config SPI_CS_DELAY_CONTROL
bool "SPI CS Delay Control"
default n
+5 -3
View File
@@ -57,10 +57,12 @@
****************************************************************************/
/* Configuration ************************************************************/
/* H/W features must be enabled in order to support LSB first operation */
/* Bit order H/W feature must be enabled in order to support LSB first
* operation.
*/
#ifndef CONFIG_SPI_HWFEATURES
# error CONFIG_SPI_HWFEATURES=y required by this driver
#if !defined(CONFIG_SPI_HWFEATURES) || !defined(CONFIG_SPI_BITORDER)
# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver
#endif
#ifdef CONFIG_WL_PN532_DEBUG