Linux IIO development
 help / color / mirror / Atom feed
From: Marius Hoch <mail@mariushoch.de>
To: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>, Marius Hoch <mail@mariushoch.de>
Subject: [PATCH v2 1/6] iio: accel: st_accel: Add LSM303D
Date: Thu, 13 Apr 2023 04:40:08 +0200	[thread overview]
Message-ID: <20230413024013.450165-2-mail@mariushoch.de> (raw)
In-Reply-To: <20230413024013.450165-1-mail@mariushoch.de>

The lsm303d has the same register mapping as the lsm9ds0,
thus we can just re-use that.

Tested on a Lenovo Yoga Tablet 2 1051-F.

Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
 drivers/iio/accel/st_accel_core.c     | 1 +
 include/linux/iio/common/st_sensors.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 6b8562f684d5..1628b177d0ed 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -1006,6 +1006,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
 		.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
 		.sensors_supported = {
 			[0] = LSM9DS0_IMU_DEV_NAME,
+			[1] = LSM303D_IMU_DEV_NAME,
 		},
 		.ch = (struct iio_chan_spec *)st_accel_16bit_channels,
 		.odr = {
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index f5f3ee57bc70..607c3a89a647 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -22,6 +22,7 @@
 #include <linux/platform_data/st_sensors_pdata.h>
 
 #define LSM9DS0_IMU_DEV_NAME		"lsm9ds0"
+#define LSM303D_IMU_DEV_NAME		"lsm303d"
 
 /*
  * Buffer size max case: 2bytes per channel, 3 channels in total +
-- 
2.39.2


  reply	other threads:[~2023-04-13  2:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  2:40 [PATCH v2 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
2023-04-13  2:40 ` Marius Hoch [this message]
2023-04-13  2:40 ` [PATCH v2 2/6] iio: magnetometer: st_accel: Add LSM303D Marius Hoch
2023-04-13  2:40 ` [PATCH v2 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
2023-04-13  2:40 ` [PATCH v2 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
2023-04-15 16:55   ` Jonathan Cameron
2023-04-15 23:17     ` Marius Hoch
2023-04-13  2:40 ` [PATCH v2 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
2023-04-13  2:40 ` [PATCH v2 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
2023-04-13  8:07   ` Krzysztof Kozlowski
2023-04-15 16:51     ` Jonathan Cameron
2023-04-15 23:19       ` Marius Hoch
2023-04-16  7:14       ` Krzysztof Kozlowski

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=20230413024013.450165-2-mail@mariushoch.de \
    --to=mail@mariushoch.de \
    --cc=hdegoede@redhat.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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