drivers/sensor: iis2mdc: (FIX) Remove SPI Full Duplex mode

The IIS2MDC sensor does not support the SPI 4 wires. So, remove
it from the driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
Armando Visconti 2021-01-29 11:22:56 +01:00 committed by Carles Cufí
commit 2846283f84
3 changed files with 0 additions and 18 deletions

View file

@ -53,8 +53,4 @@ config IIS2MDC_MAG_ODR_RUNTIME
bool "Set magnetometer sampling frequency (ODR) at runtime (default: 10 Hz)"
default y
config IIS2MDC_SPI_FULL_DUPLEX
bool "Enable SPI 4wire mode (separated MISO and MOSI lines)"
depends on SPI
endif # IIS2MDC

View file

@ -279,13 +279,6 @@ static int iis2mdc_init(const struct device *dev)
k_busy_wait(100);
#if CONFIG_IIS2MDC_SPI_FULL_DUPLEX
/* After s/w reset set SPI 4wires again if the case */
if (iis2mdc_spi_mode_set(iis2mdc->ctx, IIS2MDC_SPI_4_WIRE) < 0) {
return -EIO;
}
#endif
/* enable BDU */
if (iis2mdc_block_data_update_set(iis2mdc->ctx, PROPERTY_ENABLE) < 0) {
LOG_DBG("setting bdu failed\n");

View file

@ -109,13 +109,6 @@ int iis2mdc_spi_init(const struct device *dev)
data->ctx = &data->ctx_spi;
data->ctx->handle = (void *)dev;
#if CONFIG_IIS2MDC_SPI_FULL_DUPLEX
/* Set SPI 4wires */
if (iis2mdc_spi_mode_set(data->ctx, IIS2MDC_SPI_4_WIRE) < 0) {
return -EIO;
}
#endif
return 0;
}
#endif /* DT_ANY_INST_ON_BUS_STATUS_OKAY(spi) */