mirror of
https://github.com/vsergeev/c-periphery.git
synced 2026-08-20 21:28:32 +08:00
tests/spi: remove extra flags assertions
in newer kernels the spidev driver appends SPI_CS_HIGH to the mode when the SPI controller is configured to use GPIOs for chip selects, which breaks the assertion that extra flags is zero in this SPI test.
This commit is contained in:
+1
-4
@@ -36,7 +36,6 @@ void test_open_config_close(void) {
|
||||
unsigned int mode;
|
||||
spi_bit_order_t bit_order;
|
||||
uint8_t bits_per_word;
|
||||
uint8_t extra_flags;
|
||||
uint32_t max_speed;
|
||||
|
||||
ptest();
|
||||
@@ -47,13 +46,11 @@ void test_open_config_close(void) {
|
||||
|
||||
passert(spi_open(spi, device, 0, 100000) == 0);
|
||||
|
||||
/* Confirm bit_order = MSB first, bits_per_word = 8, extra_flags = 0 */
|
||||
/* Confirm bit_order = MSB first, bits_per_word = 8 */
|
||||
passert(spi_get_bit_order(spi, &bit_order) == 0);
|
||||
passert(bit_order == MSB_FIRST);
|
||||
passert(spi_get_bits_per_word(spi, &bits_per_word) == 0);
|
||||
passert(bits_per_word == 8);
|
||||
passert(spi_get_extra_flags(spi, &extra_flags) == 0);
|
||||
passert(extra_flags == 0);
|
||||
|
||||
/* Not going to try different bit order or bits per word, because not all
|
||||
* SPI controllers support them */
|
||||
|
||||
Reference in New Issue
Block a user