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
@@ -338,8 +338,7 @@ int st_sensors_get_settings_index(const char *name,
|
||||
const struct st_sensor_settings *list,
|
||||
const int list_length);
|
||||
|
||||
int st_sensors_check_device_support(struct iio_dev *indio_dev,
|
||||
int num_sensors_list, const struct st_sensor_settings *sensor_settings);
|
||||
int st_sensors_verify_id(struct iio_dev *indio_dev);
|
||||
|
||||
ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/iio/common/st_sensors.h>
|
||||
|
||||
void st_sensors_spi_configure(struct iio_dev *indio_dev,
|
||||
struct spi_device *spi, struct st_sensor_data *sdata);
|
||||
int st_sensors_spi_configure(struct iio_dev *indio_dev,
|
||||
struct spi_device *spi);
|
||||
|
||||
#endif /* ST_SENSORS_SPI_H */
|
||||
|
||||
Reference in New Issue
Block a user