linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis CIOCCA <denis.ciocca@st.com>
To: jic23@kernel.org, lars@metafoo.de
Cc: linux-iio@vger.kernel.org, Denis Ciocca <denis.ciocca@st.com>
Subject: [PATCH] iio:magn: Add sensors_supported in st_magn_sensors
Date: Tue, 29 Jan 2013 12:54:01 +0100	[thread overview]
Message-ID: <1359460441-19310-1-git-send-email-denis.ciocca@st.com> (raw)

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

             reply	other threads:[~2013-01-29 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29 11:54 Denis CIOCCA [this message]
2013-01-30 21:23 ` [PATCH] iio:magn: Add sensors_supported in st_magn_sensors Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359460441-19310-1-git-send-email-denis.ciocca@st.com \
    --to=denis.ciocca@st.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).