Skip to content

Commit

Permalink
drivers: spi_bitbang: Make SPI_LINES_OCTAL explicitly unsupported flag
Browse files Browse the repository at this point in the history
Prevent the driver from perfroming transfer when SPI_LINES_OCTAL flag
is specified, as this driver supports only SPI_LINES_DUAL for now.

Signed-off-by: Michal Morsisko <[email protected]>
  • Loading branch information
morsisko committed Sep 1, 2024
1 parent df56307 commit 358bce2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/spi/spi_bitbang.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ static int spi_bitbang_configure(const struct spi_bitbang_config *info,
return -ENOTSUP;
}

if (config->operation & (SPI_LINES_DUAL | SPI_LINES_QUAD)) {
if (config->operation & (SPI_LINES_DUAL | SPI_LINES_QUAD
| SPI_LINES_OCTAL)) {
LOG_ERR("Unsupported configuration");

Check notice on line 41 in drivers/spi/spi_bitbang.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/spi/spi_bitbang.c:41 - if (config->operation & (SPI_LINES_DUAL | SPI_LINES_QUAD - | SPI_LINES_OCTAL)) { + if (config->operation & (SPI_LINES_DUAL | SPI_LINES_QUAD | SPI_LINES_OCTAL)) {
return -ENOTSUP;
}
Expand Down

0 comments on commit 358bce2

Please sign in to comment.