* [PATCH v3 0/3] Support LIS302DL in st_accel
@ 2022-03-07 13:24 Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 1/3] dt-bindings: iio: st,st-sensors add LIS302DL Sicelo A. Mhlongo
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Sicelo A. Mhlongo @ 2022-03-07 13:24 UTC (permalink / raw)
To: Jonathan Cameron, Rob Herring, Denis Ciocca, linux-iio
Cc: devicetree, Linus Walleij, Lars-Peter Clausen, Andy Shevchenko,
maemo-leste, Sicelo A. Mhlongo
Hi,
The ST Microelectronics LIS302DL is currently only supported in the
evdev framework driver in drivers/misc/lis3lv02d. This series enables
support for it in the iio framework.
Regards,
Sicelo
Sicelo A. Mhlongo (3):
dt-bindings: iio: st,st-sensors add LIS302DL
iio: accel: Remove unused enum in st_accel
iio: accel: add support for LIS302DL variant
.../bindings/iio/st,st-sensors.yaml | 1 +
drivers/iio/accel/st_accel.h | 26 +------------------
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/accel/st_accel_i2c.c | 5 ++++
drivers/iio/accel/st_accel_spi.c | 5 ++++
5 files changed, 13 insertions(+), 25 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/3] dt-bindings: iio: st,st-sensors add LIS302DL
2022-03-07 13:24 [PATCH v3 0/3] Support LIS302DL in st_accel Sicelo A. Mhlongo
@ 2022-03-07 13:25 ` Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 2/3] iio: accel: Remove unused enum in st_accel Sicelo A. Mhlongo
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Sicelo A. Mhlongo @ 2022-03-07 13:25 UTC (permalink / raw)
To: Jonathan Cameron, Rob Herring, Denis Ciocca, linux-iio
Cc: devicetree, Linus Walleij, Lars-Peter Clausen, Andy Shevchenko,
maemo-leste, Sicelo A. Mhlongo, Rob Herring
Update st,st-sensors bindings for STMicroelectronics LIS302DL variant
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
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 71de5631ebae..321fd16b6ea7 100644
--- a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
+++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml
@@ -29,6 +29,7 @@ properties:
- st,lis2dw12
- st,lis2hh12
- st,lis2dh12-accel
+ - st,lis302dl
- st,lis331dl-accel
- st,lis331dlh-accel
- st,lis3de
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/3] iio: accel: Remove unused enum in st_accel
2022-03-07 13:24 [PATCH v3 0/3] Support LIS302DL in st_accel Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 1/3] dt-bindings: iio: st,st-sensors add LIS302DL Sicelo A. Mhlongo
@ 2022-03-07 13:25 ` Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 3/3] iio: accel: add support for LIS302DL variant Sicelo A. Mhlongo
2022-03-07 13:58 ` [PATCH v3 0/3] Support LIS302DL in st_accel Andy Shevchenko
3 siblings, 0 replies; 6+ messages in thread
From: Sicelo A. Mhlongo @ 2022-03-07 13:25 UTC (permalink / raw)
To: Jonathan Cameron, Rob Herring, Denis Ciocca, linux-iio
Cc: devicetree, Linus Walleij, Lars-Peter Clausen, Andy Shevchenko,
maemo-leste, Sicelo A. Mhlongo, Jonathan Cameron
The st_accel_type enum is not used anywhere else in the code, and can be
removed
Suggested-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
drivers/iio/accel/st_accel.h | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index 8750dea56fcb..969cc7faca07 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -14,31 +14,6 @@
#include <linux/types.h>
#include <linux/iio/common/st_sensors.h>
-enum st_accel_type {
- LSM303DLH,
- LSM303DLHC,
- LIS3DH,
- LSM330D,
- LSM330DL,
- LSM330DLC,
- LIS331DLH,
- LSM303DL,
- LSM303DLM,
- LSM330,
- LSM303AGR,
- LIS2DH12,
- LIS3L02DQ,
- LNG2DM,
- H3LIS331DL,
- LIS331DL,
- LIS3LV02DL,
- LIS2DW12,
- LIS3DHH,
- LIS2DE12,
- LIS2HH12,
- ST_ACCEL_MAX,
-};
-
#define H3LIS331DL_ACCEL_DEV_NAME "h3lis331dl_accel"
#define LIS3LV02DL_ACCEL_DEV_NAME "lis3lv02dl_accel"
#define LSM303DLHC_ACCEL_DEV_NAME "lsm303dlhc_accel"
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/3] iio: accel: add support for LIS302DL variant
2022-03-07 13:24 [PATCH v3 0/3] Support LIS302DL in st_accel Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 1/3] dt-bindings: iio: st,st-sensors add LIS302DL Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 2/3] iio: accel: Remove unused enum in st_accel Sicelo A. Mhlongo
@ 2022-03-07 13:25 ` Sicelo A. Mhlongo
2022-03-07 13:58 ` [PATCH v3 0/3] Support LIS302DL in st_accel Andy Shevchenko
3 siblings, 0 replies; 6+ messages in thread
From: Sicelo A. Mhlongo @ 2022-03-07 13:25 UTC (permalink / raw)
To: Jonathan Cameron, Rob Herring, Denis Ciocca, linux-iio
Cc: devicetree, Linus Walleij, Lars-Peter Clausen, Andy Shevchenko,
maemo-leste, Sicelo A. Mhlongo
Add support for STMicroelectronics LIS302DL accelerometer to the st_accel
framework.
Datasheet: https://www.st.com/resource/en/datasheet/lis302dl.pdf
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
drivers/iio/accel/st_accel.h | 1 +
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/accel/st_accel_i2c.c | 5 +++++
drivers/iio/accel/st_accel_spi.c | 5 +++++
4 files changed, 12 insertions(+)
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index 969cc7faca07..0e79dc100ce5 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -36,6 +36,7 @@
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
+#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
#ifdef CONFIG_IIO_BUFFER
int st_accel_allocate_ring(struct iio_dev *indio_dev);
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 31ea19d0ba71..2a353c51c84a 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
.sensors_supported = {
[0] = LIS331DL_ACCEL_DEV_NAME,
+ [1] = LIS302DL_ACCEL_DEV_NAME,
},
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
.odr = {
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index c0ce78eebad9..086e8af89e18 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
.compatible = "st,lis2hh12",
.data = LIS2HH12_ACCEL_DEV_NAME,
},
+ {
+ .compatible = "st,lis302dl",
+ .data = LIS302DL_ACCEL_DEV_NAME,
+ },
{},
};
MODULE_DEVICE_TABLE(of, st_accel_of_match);
@@ -142,6 +146,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
{ LIS3DE_ACCEL_DEV_NAME },
{ LIS2DE12_ACCEL_DEV_NAME },
{ LIS2HH12_ACCEL_DEV_NAME },
+ { LIS302DL_ACCEL_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
index b74a1c6d03de..5d77521a8d1e 100644
--- a/drivers/iio/accel/st_accel_spi.c
+++ b/drivers/iio/accel/st_accel_spi.c
@@ -92,6 +92,10 @@ static const struct of_device_id st_accel_of_match[] = {
.compatible = "st,lis3de",
.data = LIS3DE_ACCEL_DEV_NAME,
},
+ {
+ .compatible = "st,lis302dl",
+ .data = LIS302DL_ACCEL_DEV_NAME,
+ },
{}
};
MODULE_DEVICE_TABLE(of, st_accel_of_match);
@@ -147,6 +151,7 @@ static const struct spi_device_id st_accel_id_table[] = {
{ LIS2DW12_ACCEL_DEV_NAME },
{ LIS3DHH_ACCEL_DEV_NAME },
{ LIS3DE_ACCEL_DEV_NAME },
+ { LIS302DL_ACCEL_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(spi, st_accel_id_table);
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] Support LIS302DL in st_accel
2022-03-07 13:24 [PATCH v3 0/3] Support LIS302DL in st_accel Sicelo A. Mhlongo
` (2 preceding siblings ...)
2022-03-07 13:25 ` [PATCH v3 3/3] iio: accel: add support for LIS302DL variant Sicelo A. Mhlongo
@ 2022-03-07 13:58 ` Andy Shevchenko
2022-03-20 15:34 ` Jonathan Cameron
3 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2022-03-07 13:58 UTC (permalink / raw)
To: Sicelo A. Mhlongo
Cc: Jonathan Cameron, Rob Herring, Denis Ciocca, linux-iio,
devicetree, Linus Walleij, Lars-Peter Clausen, maemo-leste
On Mon, Mar 07, 2022 at 03:24:59PM +0200, Sicelo A. Mhlongo wrote:
> Hi,
>
> The ST Microelectronics LIS302DL is currently only supported in the
> evdev framework driver in drivers/misc/lis3lv02d. This series enables
> support for it in the iio framework.
The entire series is fine to me
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Regards,
> Sicelo
>
>
>
> Sicelo A. Mhlongo (3):
> dt-bindings: iio: st,st-sensors add LIS302DL
> iio: accel: Remove unused enum in st_accel
> iio: accel: add support for LIS302DL variant
>
> .../bindings/iio/st,st-sensors.yaml | 1 +
> drivers/iio/accel/st_accel.h | 26 +------------------
> drivers/iio/accel/st_accel_core.c | 1 +
> drivers/iio/accel/st_accel_i2c.c | 5 ++++
> drivers/iio/accel/st_accel_spi.c | 5 ++++
> 5 files changed, 13 insertions(+), 25 deletions(-)
>
> --
> 2.35.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] Support LIS302DL in st_accel
2022-03-07 13:58 ` [PATCH v3 0/3] Support LIS302DL in st_accel Andy Shevchenko
@ 2022-03-20 15:34 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2022-03-20 15:34 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Sicelo A. Mhlongo, Rob Herring, Denis Ciocca, linux-iio,
devicetree, Linus Walleij, Lars-Peter Clausen, maemo-leste
On Mon, 7 Mar 2022 15:58:33 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> On Mon, Mar 07, 2022 at 03:24:59PM +0200, Sicelo A. Mhlongo wrote:
> > Hi,
> >
> > The ST Microelectronics LIS302DL is currently only supported in the
> > evdev framework driver in drivers/misc/lis3lv02d. This series enables
> > support for it in the iio framework.
>
> The entire series is fine to me
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This crossed with another series adding the sc7a20 so I hand tweaked
it whilst applying.
Applied to the togreg branch of iio.git but I'll be rebasing that on
rc1 once available so in meantime just pushed out as testing.
Thanks,
Jonathan
>
> > Regards,
> > Sicelo
> >
> >
> >
> > Sicelo A. Mhlongo (3):
> > dt-bindings: iio: st,st-sensors add LIS302DL
> > iio: accel: Remove unused enum in st_accel
> > iio: accel: add support for LIS302DL variant
> >
> > .../bindings/iio/st,st-sensors.yaml | 1 +
> > drivers/iio/accel/st_accel.h | 26 +------------------
> > drivers/iio/accel/st_accel_core.c | 1 +
> > drivers/iio/accel/st_accel_i2c.c | 5 ++++
> > drivers/iio/accel/st_accel_spi.c | 5 ++++
> > 5 files changed, 13 insertions(+), 25 deletions(-)
> >
> > --
> > 2.35.1
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-20 15:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 13:24 [PATCH v3 0/3] Support LIS302DL in st_accel Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 1/3] dt-bindings: iio: st,st-sensors add LIS302DL Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 2/3] iio: accel: Remove unused enum in st_accel Sicelo A. Mhlongo
2022-03-07 13:25 ` [PATCH v3 3/3] iio: accel: add support for LIS302DL variant Sicelo A. Mhlongo
2022-03-07 13:58 ` [PATCH v3 0/3] Support LIS302DL in st_accel Andy Shevchenko
2022-03-20 15:34 ` 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).