linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio:magn: Add sensors_supported in st_magn_sensors
@ 2013-01-29 11:54 Denis CIOCCA
  2013-01-30 21:23 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Denis CIOCCA @ 2013-01-29 11:54 UTC (permalink / raw)
  To: jic23, lars; +Cc: linux-iio, Denis Ciocca

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(+)

diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 1dfcb41..a69fbe1 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -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,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-30 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-29 11:54 [PATCH] iio:magn: Add sensors_supported in st_magn_sensors Denis CIOCCA
2013-01-30 21:23 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).