iio:magn: Add sensors_supported in st_magn_sensors
PATCH 1/1 iio:magn: Add sensors_supported in st_magn_sensors
This patch add sensors_supported struct to st_magn_sensors. Without this the probe can't match the WhoAmI and sensor name.
--- drivers/iio/magnetometer/st_magn_core.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/iio/magnetometer/st_magn_core.c +7 -0
@@ -136,6 +136,10 @@ static const struct iio_chan_spec st_magn_2_16bit_channels[] = {static const struct st_sensors st_magn_sensors[] = { { .wai =ST_MAGN_1_WAI_EXP , + .sensors_supported = { + [0 ] =LSM303DLHC_MAGN_DEV_NAME , + [1 ] =LSM303DLM_MAGN_DEV_NAME , + }, .ch = (struct iio_chan_spec *)st_magn_16bit_channels, .odr = { .addr =ST_MAGN_1_ODR_ADDR ,
@@ -210,6 +214,9 @@ static const struct st_sensors st_magn_sensors[] = { }, { .wai = ST_MAGN_2_WAI_EXP, + .sensors_supported = { + [0] = LIS3MDL_MAGN_DEV_NAME, + }, .ch = (struct iio_chan_spec *)st_magn_2_16bit_channels, .odr = { .addr = ST_MAGN_2_ODR_ADDR,
Signature · 1 line
1.7.9.5
Quoted 1 line · Denis CIOCCA
This patch add
sensors_supportedstruct tost_magn_sensors. Without this the probe can't match the WhoAmI and sensor name.
I've merged this into the original patch.
Quoted 30 lines
--- drivers/iio/magnetometer/st_magn_core.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/iio/magnetometer/st_magn_core.c +7
-0@@ -136,6 +136,10 @@ static const struct iio_chan_spec st_magn_2_16bit_channels[] = {static const struct st_sensors st_magn_sensors[] = { { .wai =ST_MAGN_1_WAI_EXP , + .sensors_supported = { + [0 ] =LSM303DLHC_MAGN_DEV_NAME , + [1 ] =LSM303DLM_MAGN_DEV_NAME , + }, .ch = (struct iio_chan_spec *)st_magn_16bit_channels, .odr = { .addr =ST_MAGN_1_ODR_ADDR ,@@ -210,6 +214,9 @@ static const struct st_sensors st_magn_sensors[] = { }, { .wai = ST_MAGN_2_WAI_EXP, + .sensors_supported = { + [0] = LIS3MDL_MAGN_DEV_NAME, + }, .ch = (struct iio_chan_spec *)st_magn_2_16bit_channels, .odr = { .addr = ST_MAGN_2_ODR_ADDR,