devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] iio: st_sensors: Add lsm303d support
@ 2023-04-15 23:11 Marius Hoch
  2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

Hi!

This patch series adds support for the LSM303D accelerometer and
magnetometer. As the LSM303D is basically, as far as I can tell,
the LSM9DS0 without gyroscope, we can easily re-use its definitions.

This was tested on a Lenovo Yoga Tablet 2 1051-F.

Cheers,
Marius

Changes in v3:
Simplified the ACPI tables in the LSM9DS0 IMU driver, per Jonathan Cameron.

Marius Hoch (6):
  iio: accel: st_accel: Add LSM303D
  iio: magnetometer: st_accel: Add LSM303D
  iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
  iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU
    driver
  iio: Comment that the LSM303D also has the Magnetometer DRDY
  dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer

 .../devicetree/bindings/iio/st,st-sensors.yaml       |  1 +
 drivers/iio/accel/st_accel_core.c                    |  1 +
 drivers/iio/imu/st_lsm9ds0/Kconfig                   |  3 ++-
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c          | 12 ++++++++++++
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c          | 12 ++++++++++++
 drivers/iio/magnetometer/st_magn_core.c              |  1 +
 include/linux/iio/common/st_sensors.h                |  1 +
 include/linux/platform_data/st_sensors_pdata.h       |  2 +-
 8 files changed, 31 insertions(+), 2 deletions(-)


base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d
-- 
2.39.2


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

* [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-21  8:41   ` Linus Walleij
  2023-04-15 23:11 ` [PATCH v3 2/6] iio: magnetometer: " Marius Hoch
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

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


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

* [PATCH v3 2/6] iio: magnetometer: st_accel: Add LSM303D
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
  2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-21  8:41   ` Linus Walleij
  2023-04-15 23:11 ` [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

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/magnetometer/st_magn_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 8faa7409d9e1..6cc0dfd31821 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -427,6 +427,7 @@ static const struct st_sensor_settings st_magn_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_magn_4_16bit_channels,
 		.odr = {
-- 
2.39.2


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

* [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
  2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
  2023-04-15 23:11 ` [PATCH v3 2/6] iio: magnetometer: " Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-21  8:42   ` Linus Walleij
  2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

The lsm303d is basically the lsm9ds0 without the gyroscope
(which the LSM9DS0 IMU driver doesn't handle), as far as I
can tell.

Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
 drivers/iio/imu/st_lsm9ds0/Kconfig          | 3 ++-
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 5 +++++
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 5 +++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/imu/st_lsm9ds0/Kconfig b/drivers/iio/imu/st_lsm9ds0/Kconfig
index d29558edee60..7aef714b6ecb 100644
--- a/drivers/iio/imu/st_lsm9ds0/Kconfig
+++ b/drivers/iio/imu/st_lsm9ds0/Kconfig
@@ -10,7 +10,8 @@ config IIO_ST_LSM9DS0
 
 	help
 	  Say yes here to build support for STMicroelectronics LSM9DS0 IMU
-	  sensor. Supported devices: accelerometer/magnetometer of lsm9ds0.
+	  sensor. Supported devices: accelerometer/magnetometer of lsm9ds0
+	  and lsm303d.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called st_lsm9ds0.
diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
index a90138d8b06a..64fa77d302e2 100644
--- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
+++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
@@ -22,12 +22,17 @@ static const struct of_device_id st_lsm9ds0_of_match[] = {
 		.compatible = "st,lsm9ds0-imu",
 		.data = LSM9DS0_IMU_DEV_NAME,
 	},
+	{
+		.compatible = "st,lsm303d-imu",
+		.data = LSM303D_IMU_DEV_NAME,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, st_lsm9ds0_of_match);
 
 static const struct i2c_device_id st_lsm9ds0_id_table[] = {
 	{ LSM9DS0_IMU_DEV_NAME },
+	{ LSM303D_IMU_DEV_NAME },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, st_lsm9ds0_id_table);
diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
index b743bf3546a7..997b5ff792be 100644
--- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
+++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
@@ -22,12 +22,17 @@ static const struct of_device_id st_lsm9ds0_of_match[] = {
 		.compatible = "st,lsm9ds0-imu",
 		.data = LSM9DS0_IMU_DEV_NAME,
 	},
+	{
+		.compatible = "st,lsm303d-imu",
+		.data = LSM303D_IMU_DEV_NAME,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, st_lsm9ds0_of_match);
 
 static const struct spi_device_id st_lsm9ds0_id_table[] = {
 	{ LSM9DS0_IMU_DEV_NAME },
+	{ LSM303D_IMU_DEV_NAME },
 	{}
 };
 MODULE_DEVICE_TABLE(spi, st_lsm9ds0_id_table);
-- 
2.39.2


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

* [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU driver
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
                   ` (2 preceding siblings ...)
  2023-04-15 23:11 ` [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-21  8:43   ` Linus Walleij
  2023-05-02 14:51   ` Marius Hoch
  2023-04-15 23:11 ` [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

The lsm303d can be found as ACCL0001 on various Lenovo devices,
including the Lenovo Yoga Tablet 2 1051-F, where I tested this
patch.

Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 7 +++++++
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
index 64fa77d302e2..52f1ea6c457f 100644
--- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
+++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
@@ -37,6 +37,12 @@ static const struct i2c_device_id st_lsm9ds0_id_table[] = {
 };
 MODULE_DEVICE_TABLE(i2c, st_lsm9ds0_id_table);
 
+static const struct acpi_device_id st_lsm9ds0_acpi_match[] = {
+	{"ACCL0001", (kernel_ulong_t)LSM303D_IMU_DEV_NAME},
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, st_lsm9ds0_acpi_match);
+
 static const struct regmap_config st_lsm9ds0_regmap_config = {
 	.reg_bits	= 8,
 	.val_bits	= 8,
@@ -73,6 +79,7 @@ static struct i2c_driver st_lsm9ds0_driver = {
 	.driver = {
 		.name = "st-lsm9ds0-i2c",
 		.of_match_table = st_lsm9ds0_of_match,
+		.acpi_match_table = st_lsm9ds0_acpi_match,
 	},
 	.probe_new = st_lsm9ds0_i2c_probe,
 	.id_table = st_lsm9ds0_id_table,
diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
index 997b5ff792be..55f3738193af 100644
--- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
+++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
@@ -37,6 +37,12 @@ static const struct spi_device_id st_lsm9ds0_id_table[] = {
 };
 MODULE_DEVICE_TABLE(spi, st_lsm9ds0_id_table);
 
+static const struct acpi_device_id st_lsm9ds0_acpi_match[] = {
+	{"ACCL0001", (kernel_ulong_t)LSM303D_IMU_DEV_NAME},
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, st_lsm9ds0_acpi_match);
+
 static const struct regmap_config st_lsm9ds0_regmap_config = {
 	.reg_bits	= 8,
 	.val_bits	= 8,
@@ -72,6 +78,7 @@ static struct spi_driver st_lsm9ds0_driver = {
 	.driver = {
 		.name = "st-lsm9ds0-spi",
 		.of_match_table = st_lsm9ds0_of_match,
+		.acpi_match_table = st_lsm9ds0_acpi_match,
 	},
 	.probe = st_lsm9ds0_spi_probe,
 	.id_table = st_lsm9ds0_id_table,
-- 
2.39.2


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

* [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
                   ` (3 preceding siblings ...)
  2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-21  8:43   ` Linus Walleij
  2023-04-15 23:11 ` [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
  2023-04-16 20:19 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Hans de Goede
  6 siblings, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

Per its datasheet, the LSM303D also features that
pin.

Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
 include/linux/platform_data/st_sensors_pdata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/platform_data/st_sensors_pdata.h b/include/linux/platform_data/st_sensors_pdata.h
index 897051e51b78..a657830232ae 100644
--- a/include/linux/platform_data/st_sensors_pdata.h
+++ b/include/linux/platform_data/st_sensors_pdata.h
@@ -15,7 +15,7 @@
  * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2).
  *	Available only for accelerometer, magnetometer and pressure sensors.
  *	Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet).
- *	Magnetometer DRDY is supported only on LSM9DS0.
+ *	Magnetometer DRDY is supported only on LSM9DS0 and LSM303D.
  * @open_drain: set the interrupt line to be open drain if possible.
  * @spi_3wire: enable spi-3wire mode.
  * @pullups: enable/disable i2c controller pullup resistors.
-- 
2.39.2


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

* [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
                   ` (4 preceding siblings ...)
  2023-04-15 23:11 ` [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
@ 2023-04-15 23:11 ` Marius Hoch
  2023-04-16  7:29   ` Krzysztof Kozlowski
  2023-04-16 20:19 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Hans de Goede
  6 siblings, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-04-15 23:11 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

Same as the lsm9ds0, except that the lsm303d doesn't
feature a gyroscope.

Signed-off-by: Marius Hoch <mail@mariushoch.de>
---
 Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
index c6201976378f..194aca5542c2 100644
--- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
+++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
@@ -85,6 +85,7 @@ properties:
       - description: IMUs
         enum:
           - st,lsm9ds0-imu
+          - st,lsm303d-imu
       - description: Deprecated bindings
         enum:
           - st,lis302dl-spi
-- 
2.39.2


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

* Re: [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
  2023-04-15 23:11 ` [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
@ 2023-04-16  7:29   ` Krzysztof Kozlowski
  2023-04-16 12:23     ` Jonathan Cameron
  0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-16  7:29 UTC (permalink / raw)
  To: Marius Hoch, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede

On 16/04/2023 01:11, Marius Hoch wrote:
> Same as the lsm9ds0, except that the lsm303d doesn't
> feature a gyroscope.
> 
> Signed-off-by: Marius Hoch <mail@mariushoch.de>
> ---
>  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> index c6201976378f..194aca5542c2 100644
> --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> @@ -85,6 +85,7 @@ properties:
>        - description: IMUs
>          enum:
>            - st,lsm9ds0-imu
> +          - st,lsm303d-imu

The entries are ordered by name.

With fixed:

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


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

* Re: [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
  2023-04-16  7:29   ` Krzysztof Kozlowski
@ 2023-04-16 12:23     ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2023-04-16 12:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Marius Hoch, Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Denis Ciocca, Linus Walleij, linux-iio, devicetree, linux-kernel,
	Hans de Goede

On Sun, 16 Apr 2023 09:29:23 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 16/04/2023 01:11, Marius Hoch wrote:
> > Same as the lsm9ds0, except that the lsm303d doesn't
> > feature a gyroscope.
> > 
> > Signed-off-by: Marius Hoch <mail@mariushoch.de>
> > ---
> >  Documentation/devicetree/bindings/iio/st,st-sensors.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> > index c6201976378f..194aca5542c2 100644
> > --- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> > +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
> > @@ -85,6 +85,7 @@ properties:
> >        - description: IMUs
> >          enum:
> >            - st,lsm9ds0-imu
> > +          - st,lsm303d-imu  
> 
> The entries are ordered by name.
> 
> With fixed:
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 

I tidied up the ordering whilst applying and also swapped the ordering in
patch 3 for similar reason.

Note that we are very late in this cycle so unless there is an unexpected
delay these will sit in the branch I push out as iio.git/testing until
after rc1 when I'll rebase it on rc1 and push out as togreg for linux-next
to pick up for the 6.5 cycle.

Plenty of time for others to comment in the meantime, but I'm guessing we
won't get much and this way I can 'probably' forget about handling this
series individually.

Jonathan
 
> 
> Best regards,
> Krzysztof
> 


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

* Re: [PATCH v3 0/6] iio: st_sensors: Add lsm303d support
  2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
                   ` (5 preceding siblings ...)
  2023-04-15 23:11 ` [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
@ 2023-04-16 20:19 ` Hans de Goede
  2023-04-20 17:21   ` Marius Hoch
  2023-04-21  7:55   ` Hans de Goede
  6 siblings, 2 replies; 19+ messages in thread
From: Hans de Goede @ 2023-04-16 20:19 UTC (permalink / raw)
  To: Marius Hoch, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel

Hi Marius,

On 4/16/23 01:11, Marius Hoch wrote:
> Hi!
> 
> This patch series adds support for the LSM303D accelerometer and
> magnetometer. As the LSM303D is basically, as far as I can tell,
> the LSM9DS0 without gyroscope, we can easily re-use its definitions.
> 
> This was tested on a Lenovo Yoga Tablet 2 1051-F.

Thank you for your work on this. I have had this on my own todo list
since 2020 at least and I did not realize that Andy already added ST IMU
support in 2021 so this just needed some extra device-ids :)

I have tested this successfully on the following models:

Lenovo Yoga Tablet 2 851F (Windows version 8")

This version needs an accel-mount-matrix quick in hwdb since it has
a portrait screen rather then a landscape screen (so 90° rotated):
https://github.com/systemd/systemd/pull/27295
Note I've made sure that this quirk only applies to the 851 and not to the 1051.

Lenovo Yoga Tablet 2  830F (Android version 8")

Since the ACPI tables are broken in the Android BIOS these need
a patch to x86-android-tablets to instantiate the i2c_client
for the sensor, I'm still finalizing this patch and I'll submit
it upstream when its finished.

Tested-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans


p.s.

1: I noticed that auto-screen rotation using iio-sensor-proxy is quite slow
so I wrote a patch to fix this :)   :
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/366

2: There are some other unsupported sensors on these models too,
perhaps you are interested in adding support for these too?

Here are my personal notes on this:
 -Light sensor should work with drivers/iio/light/al3320a.c
  https://github.com/JideTechnology/remixos-kernel/commit/c52d55b4bd907e87b7b115b3943219f3e089a77a

 -MXM1120 HALL sensor, have datasheet, measures angle of kickstand thingie, use
  for SW_TABLET_MODE. Do a pdx86 driver just for the Tab 2 which checks that the
  kick stand is out *and* the BT keyboard is paired, in that case report
  SW_TABLET_MODE=0, in all other cases report SW_TABLET_MODE=1 ??
  For the commit msg:
  Datasheet available here: http://haechitech.com/tech-support/
  Requires creating an account, once you have an account you can immediately download
  the provided datasheets (or let me know if you want me to email you a copy)

Especially the light sensor should be an easy win and light sensors
are already supported in e.g. iio-sensor-proxy










> Changes in v3:
> Simplified the ACPI tables in the LSM9DS0 IMU driver, per Jonathan Cameron.
> 
> Marius Hoch (6):
>   iio: accel: st_accel: Add LSM303D
>   iio: magnetometer: st_accel: Add LSM303D
>   iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
>   iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU
>     driver
>   iio: Comment that the LSM303D also has the Magnetometer DRDY
>   dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
> 
>  .../devicetree/bindings/iio/st,st-sensors.yaml       |  1 +
>  drivers/iio/accel/st_accel_core.c                    |  1 +
>  drivers/iio/imu/st_lsm9ds0/Kconfig                   |  3 ++-
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c          | 12 ++++++++++++
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c          | 12 ++++++++++++
>  drivers/iio/magnetometer/st_magn_core.c              |  1 +
>  include/linux/iio/common/st_sensors.h                |  1 +
>  include/linux/platform_data/st_sensors_pdata.h       |  2 +-
>  8 files changed, 31 insertions(+), 2 deletions(-)
> 
> 
> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d


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

* Re: [PATCH v3 0/6] iio: st_sensors: Add lsm303d support
  2023-04-16 20:19 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Hans de Goede
@ 2023-04-20 17:21   ` Marius Hoch
  2023-04-21  7:55   ` Hans de Goede
  1 sibling, 0 replies; 19+ messages in thread
From: Marius Hoch @ 2023-04-20 17:21 UTC (permalink / raw)
  To: Hans de Goede, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Marius Hoch

Hi Hans,

On 16/04/2023 22:19, Hans de Goede wrote:
> Hi Marius,
>
> On 4/16/23 01:11, Marius Hoch wrote:
>> Hi!
>>
>> This patch series adds support for the LSM303D accelerometer and
>> magnetometer. As the LSM303D is basically, as far as I can tell,
>> the LSM9DS0 without gyroscope, we can easily re-use its definitions.
>>
>> This was tested on a Lenovo Yoga Tablet 2 1051-F.
> Thank you for your work on this. I have had this on my own todo list
> since 2020 at least and I did not realize that Andy already added ST IMU
> support in 2021 so this just needed some extra device-ids :)
>
> I have tested this successfully on the following models:
>
> Lenovo Yoga Tablet 2 851F (Windows version 8")
>
> This version needs an accel-mount-matrix quick in hwdb since it has
> a portrait screen rather then a landscape screen (so 90° rotated):
> https://github.com/systemd/systemd/pull/27295
> Note I've made sure that this quirk only applies to the 851 and not to the 1051.
>
> Lenovo Yoga Tablet 2  830F (Android version 8")
>
> Since the ACPI tables are broken in the Android BIOS these need
> a patch to x86-android-tablets to instantiate the i2c_client
> for the sensor, I'm still finalizing this patch and I'll submit
> it upstream when its finished.
>
> Tested-by: Hans de Goede <hansg@kernel.org>
>
> Regards,
>
> Hans
>
>
> p.s.
>
> 1: I noticed that auto-screen rotation using iio-sensor-proxy is quite slow
> so I wrote a patch to fix this :)   :
> https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/366
Nice, that should make rotating fast (well, as fast these devices can 
handle).
>
> 2: There are some other unsupported sensors on these models too,
> perhaps you are interested in adding support for these too?
>
> Here are my personal notes on this:
>   -Light sensor should work with drivers/iio/light/al3320a.c
>    https://github.com/JideTechnology/remixos-kernel/commit/c52d55b4bd907e87b7b115b3943219f3e089a77a
That indeed worked like a charm, I'll post the patch later today.
>
>   -MXM1120 HALL sensor, have datasheet, measures angle of kickstand thingie, use
>    for SW_TABLET_MODE. Do a pdx86 driver just for the Tab 2 which checks that the
>    kick stand is out *and* the BT keyboard is paired, in that case report
>    SW_TABLET_MODE=0, in all other cases report SW_TABLET_MODE=1 ??
>    For the commit msg:
>    Datasheet available here: http://haechitech.com/tech-support/
>    Requires creating an account, once you have an account you can immediately download
>    the provided datasheets (or let me know if you want me to email you a copy)
Thanks for the pointers, that sounds like a nice little project. I'll 
give it a shot :)
>
> Especially the light sensor should be an easy win and light sensors
> are already supported in e.g. iio-sensor-proxy

Cheers,
Marius
>
>
>
>
>
>
>
>
>
>> Changes in v3:
>> Simplified the ACPI tables in the LSM9DS0 IMU driver, per Jonathan Cameron.
>>
>> Marius Hoch (6):
>>    iio: accel: st_accel: Add LSM303D
>>    iio: magnetometer: st_accel: Add LSM303D
>>    iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
>>    iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU
>>      driver
>>    iio: Comment that the LSM303D also has the Magnetometer DRDY
>>    dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer
>>
>>   .../devicetree/bindings/iio/st,st-sensors.yaml       |  1 +
>>   drivers/iio/accel/st_accel_core.c                    |  1 +
>>   drivers/iio/imu/st_lsm9ds0/Kconfig                   |  3 ++-
>>   drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c          | 12 ++++++++++++
>>   drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c          | 12 ++++++++++++
>>   drivers/iio/magnetometer/st_magn_core.c              |  1 +
>>   include/linux/iio/common/st_sensors.h                |  1 +
>>   include/linux/platform_data/st_sensors_pdata.h       |  2 +-
>>   8 files changed, 31 insertions(+), 2 deletions(-)
>>
>>
>> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d


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

* Re: [PATCH v3 0/6] iio: st_sensors: Add lsm303d support
  2023-04-16 20:19 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Hans de Goede
  2023-04-20 17:21   ` Marius Hoch
@ 2023-04-21  7:55   ` Hans de Goede
  1 sibling, 0 replies; 19+ messages in thread
From: Hans de Goede @ 2023-04-21  7:55 UTC (permalink / raw)
  To: Marius Hoch, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel

Hi Marius,

On 4/16/23 22:19, Hans de Goede wrote:

<snip>

> 2: There are some other unsupported sensors on these models too,
> perhaps you are interested in adding support for these too?
> 
> Here are my personal notes on this:
>  -Light sensor should work with drivers/iio/light/al3320a.c
>   https://github.com/JideTechnology/remixos-kernel/commit/c52d55b4bd907e87b7b115b3943219f3e089a77a
> 
>  -MXM1120 HALL sensor, have datasheet, measures angle of kickstand thingie, use
>   for SW_TABLET_MODE. Do a pdx86 driver just for the Tab 2 which checks that the
>   kick stand is out *and* the BT keyboard is paired, in that case report
>   SW_TABLET_MODE=0, in all other cases report SW_TABLET_MODE=1 ??
>   For the commit msg:
>   Datasheet available here: http://haechitech.com/tech-support/
>   Requires creating an account, once you have an account you can immediately download
>   the provided datasheets (or let me know if you want me to email you a copy)

A quick follow up on this, since you said you were going to take a look.

I think with the way bluetooth works under Linux, with a bunch of the work
being done in userspace that figuring out if the BT keyboard is paired is
not going to work in kernelspace. So I think the best we can do here is
simply export the angle of the kickstand as an iio angle sensor.

Regards,

Hans



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

* Re: [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D
  2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
@ 2023-04-21  8:41   ` Linus Walleij
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2023-04-21  8:41 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, linux-iio, devicetree,
	linux-kernel, Hans de Goede

On Sun, Apr 16, 2023 at 1:12 AM Marius Hoch <mail@mariushoch.de> wrote:

> 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>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v3 2/6] iio: magnetometer: st_accel: Add LSM303D
  2023-04-15 23:11 ` [PATCH v3 2/6] iio: magnetometer: " Marius Hoch
@ 2023-04-21  8:41   ` Linus Walleij
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2023-04-21  8:41 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, linux-iio, devicetree,
	linux-kernel, Hans de Goede

On Sun, Apr 16, 2023 at 1:12 AM Marius Hoch <mail@mariushoch.de> wrote:

> 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>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver
  2023-04-15 23:11 ` [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
@ 2023-04-21  8:42   ` Linus Walleij
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2023-04-21  8:42 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, linux-iio, devicetree,
	linux-kernel, Hans de Goede

On Sun, Apr 16, 2023 at 1:12 AM Marius Hoch <mail@mariushoch.de> wrote:

> The lsm303d is basically the lsm9ds0 without the gyroscope
> (which the LSM9DS0 IMU driver doesn't handle), as far as I
> can tell.
>
> Signed-off-by: Marius Hoch <mail@mariushoch.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU driver
  2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
@ 2023-04-21  8:43   ` Linus Walleij
  2023-05-02 14:51   ` Marius Hoch
  1 sibling, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2023-04-21  8:43 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, linux-iio, devicetree,
	linux-kernel, Hans de Goede

On Sun, Apr 16, 2023 at 1:12 AM Marius Hoch <mail@mariushoch.de> wrote:

> The lsm303d can be found as ACCL0001 on various Lenovo devices,
> including the Lenovo Yoga Tablet 2 1051-F, where I tested this
> patch.
>
> Signed-off-by: Marius Hoch <mail@mariushoch.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY
  2023-04-15 23:11 ` [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
@ 2023-04-21  8:43   ` Linus Walleij
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Walleij @ 2023-04-21  8:43 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, linux-iio, devicetree,
	linux-kernel, Hans de Goede

On Sun, Apr 16, 2023 at 1:12 AM Marius Hoch <mail@mariushoch.de> wrote:

> Per its datasheet, the LSM303D also features that
> pin.
>
> Signed-off-by: Marius Hoch <mail@mariushoch.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU driver
  2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
  2023-04-21  8:43   ` Linus Walleij
@ 2023-05-02 14:51   ` Marius Hoch
  2023-05-07 13:50     ` Jonathan Cameron
  1 sibling, 1 reply; 19+ messages in thread
From: Marius Hoch @ 2023-05-02 14:51 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Denis Ciocca, Linus Walleij, linux-iio,
	devicetree, linux-kernel
  Cc: Hans de Goede, Marius Hoch

Hi,

On 16/04/2023 01:11, Marius Hoch wrote:
<snip>
> diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> index 997b5ff792be..55f3738193af 100644
> --- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> +++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> @@ -37,6 +37,12 @@ static const struct spi_device_id st_lsm9ds0_id_table[] = {
>   };
>   MODULE_DEVICE_TABLE(spi, st_lsm9ds0_id_table);
>   
> +static const struct acpi_device_id st_lsm9ds0_acpi_match[] = {
> +	{"ACCL0001", (kernel_ulong_t)LSM303D_IMU_DEV_NAME},
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(acpi, st_lsm9ds0_acpi_match);
> +
>   static const struct regmap_config st_lsm9ds0_regmap_config = {
>   	.reg_bits	= 8,
>   	.val_bits	= 8,
> @@ -72,6 +78,7 @@ static struct spi_driver st_lsm9ds0_driver = {
>   	.driver = {
>   		.name = "st-lsm9ds0-spi",
>   		.of_match_table = st_lsm9ds0_of_match,
> +		.acpi_match_table = st_lsm9ds0_acpi_match,
>   	},
>   	.probe = st_lsm9ds0_spi_probe,
>   	.id_table = st_lsm9ds0_id_table,
I just realized that these changes (the SPI ones, not the I2C ones) are 
entirely superfluous, and I'm not sure why I added this in the first 
place. In the Lenovo Yoga Tablet 2 series (which seem to be the only 
devices exposing this as "ACCL0001"), the device is accessible via I2C. 
Just to make sure, I re-tested the patch chain without this change.

@Jonathan: Shall I upload an entirely new patch set (v4), do this in a 
separate new clean up commit, or do you want to just drop these changes 
to drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c? I'm fine with any of 
these options.

Cheers,
Marius

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

* Re: [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d to the LSM9DS0 IMU driver
  2023-05-02 14:51   ` Marius Hoch
@ 2023-05-07 13:50     ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2023-05-07 13:50 UTC (permalink / raw)
  To: Marius Hoch
  Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
	Denis Ciocca, Linus Walleij, linux-iio, devicetree, linux-kernel,
	Hans de Goede, Marius Hoch

On Tue, 2 May 2023 16:51:42 +0200
Marius Hoch <mail@mariushoch.de> wrote:

> Hi,
> 
> On 16/04/2023 01:11, Marius Hoch wrote:
> <snip>
> > diff --git a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> > index 997b5ff792be..55f3738193af 100644
> > --- a/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> > +++ b/drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
> > @@ -37,6 +37,12 @@ static const struct spi_device_id st_lsm9ds0_id_table[] = {
> >   };
> >   MODULE_DEVICE_TABLE(spi, st_lsm9ds0_id_table);
> >   
> > +static const struct acpi_device_id st_lsm9ds0_acpi_match[] = {
> > +	{"ACCL0001", (kernel_ulong_t)LSM303D_IMU_DEV_NAME},
> > +	{ },
> > +};
> > +MODULE_DEVICE_TABLE(acpi, st_lsm9ds0_acpi_match);
> > +
> >   static const struct regmap_config st_lsm9ds0_regmap_config = {
> >   	.reg_bits	= 8,
> >   	.val_bits	= 8,
> > @@ -72,6 +78,7 @@ static struct spi_driver st_lsm9ds0_driver = {
> >   	.driver = {
> >   		.name = "st-lsm9ds0-spi",
> >   		.of_match_table = st_lsm9ds0_of_match,
> > +		.acpi_match_table = st_lsm9ds0_acpi_match,
> >   	},
> >   	.probe = st_lsm9ds0_spi_probe,
> >   	.id_table = st_lsm9ds0_id_table,  
> I just realized that these changes (the SPI ones, not the I2C ones) are 
> entirely superfluous, and I'm not sure why I added this in the first 
> place. In the Lenovo Yoga Tablet 2 series (which seem to be the only 
> devices exposing this as "ACCL0001"), the device is accessible via I2C. 
> Just to make sure, I re-tested the patch chain without this change.
> 
> @Jonathan: Shall I upload an entirely new patch set (v4), do this in a 
> separate new clean up commit, or do you want to just drop these changes 
> to drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c? I'm fine with any of 
> these options.

I'll drop it and push out a new version of the togreg tree.

Thanks for pointing this out.

Jonathan

> 
> Cheers,
> Marius


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

end of thread, other threads:[~2023-05-07 13:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 23:11 [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Marius Hoch
2023-04-15 23:11 ` [PATCH v3 1/6] iio: accel: st_accel: Add LSM303D Marius Hoch
2023-04-21  8:41   ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 2/6] iio: magnetometer: " Marius Hoch
2023-04-21  8:41   ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 3/6] iio: st_sensors: Add lsm303d support to the LSM9DS0 IMU driver Marius Hoch
2023-04-21  8:42   ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 4/6] iio: st_sensors: Add ACPI support for lsm303d " Marius Hoch
2023-04-21  8:43   ` Linus Walleij
2023-05-02 14:51   ` Marius Hoch
2023-05-07 13:50     ` Jonathan Cameron
2023-04-15 23:11 ` [PATCH v3 5/6] iio: Comment that the LSM303D also has the Magnetometer DRDY Marius Hoch
2023-04-21  8:43   ` Linus Walleij
2023-04-15 23:11 ` [PATCH v3 6/6] dt-bindings: iio: st-sensors: Add LSM303D accelerometer+magnetometer Marius Hoch
2023-04-16  7:29   ` Krzysztof Kozlowski
2023-04-16 12:23     ` Jonathan Cameron
2023-04-16 20:19 ` [PATCH v3 0/6] iio: st_sensors: Add lsm303d support Hans de Goede
2023-04-20 17:21   ` Marius Hoch
2023-04-21  7:55   ` Hans de Goede

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).