iio: move 3-wire spi initialization to st_sensors_spi
Some devices need to be configured with special bit in order to use spi 3-wire. This was done during device identification phase. Instead, let's move this part as spi specific. Doing this the check_device_support function becomes a simple device id check, so let's rename it. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:

committed by
Jonathan Cameron

parent
570c2c55ef
commit
1ecd245e0e
@@ -124,7 +124,9 @@ static int st_accel_spi_probe(struct spi_device *spi)
|
||||
adata = iio_priv(indio_dev);
|
||||
adata->sensor_settings = (struct st_sensor_settings *)settings;
|
||||
|
||||
st_sensors_spi_configure(indio_dev, spi, adata);
|
||||
err = st_sensors_spi_configure(indio_dev, spi);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = st_accel_common_probe(indio_dev);
|
||||
if (err < 0)
|
||||
|
Reference in New Issue
Block a user