Skip to contentSkip to conversation

FXLS8967AF and FXLS8974CF support

PATCH Superseded Han Xu 3 participants 8 messages Dec 12, 2022 – Dec 13, 2022

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Han Xu

author
#0 lore raw

cover FXLS8967AF and FXLS8974CF support

The patch set add two more NXP accelerometer entries for FXLS8967AF and FXLS8974CF in driver and update related compatible string for dt bindings.

Haibo Chen (1):
iio: accel: add fxls8974cf support

Han Xu (3):
iio: accel: add the new entry in driver for FXLS8967AF
dt-bindings: iio: accel: fxls8962af: add new compatible string
dt-bindings: iio: accel: fxls8974cf: add new compatible string

 .../bindings/iio/accel/nxp,fxls8962af.yaml         |  4 ++++
 drivers/iio/accel/fxls8962af-core.c                | 14 ++++++++++++++
 drivers/iio/accel/fxls8962af-i2c.c                 |  4 ++++
 drivers/iio/accel/fxls8962af.h                     |  2 ++
 4 files changed, 24 insertions(+)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/4 iio: accel: add fxls8974cf support

From: Haibo Chen <[email protected]>

fxls8974cf is similar with fxls8962af, the only difference is the device id change to 0x86.

---
 drivers/iio/accel/fxls8962af-core.c | 7 +++++++
 drivers/iio/accel/fxls8962af-i2c.c  | 2 ++
 drivers/iio/accel/fxls8962af.h      | 1 +
 3 files changed, 10 insertions(+)
drivers/iio/accel/fxls8962af-core.c +7 -0
index 0d672b1469e8..98811e4e16bb 100644
@@ -126,6 +126,7 @@
 
 #define FXLS8962AF_DEVICE_ID			0x62
 #define FXLS8964AF_DEVICE_ID			0x84
+#define FXLS8974CF_DEVICE_ID			0x86
 
 /* Raw temp channel offset */
 #define FXLS8962AF_TEMP_CENTER_VAL		25
@@ -764,6 +765,12 @@ static const struct fxls8962af_chip_info fxls_chip_info_table[] = {
 		.channels = fxls8962af_channels,
 		.num_channels = ARRAY_SIZE(fxls8962af_channels),
 	},
+	[fxls8974cf] = {
+		.chip_id = FXLS8974CF_DEVICE_ID,
+		.name = "fxls8974cf",
+		.channels = fxls8962af_channels,
+		.num_channels = ARRAY_SIZE(fxls8962af_channels),
+	},
 };
 
 static const struct iio_info fxls8962af_info = {
drivers/iio/accel/fxls8962af-i2c.c +2 -0
index 22640eaebac7..17dd56756ff9 100644
@@ -30,6 +30,7 @@ static int fxls8962af_probe(struct i2c_client *client)
 static const struct i2c_device_id fxls8962af_id[] = {
 	{ "fxls8962af", fxls8962af },
 	{ "fxls8964af", fxls8964af },
+	{ "fxls8974cf", fxls8974cf },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, fxls8962af_id);
@@ -37,6 +38,7 @@ MODULE_DEVICE_TABLE(i2c, fxls8962af_id);
 static const struct of_device_id fxls8962af_of_match[] = {
 	{ .compatible = "nxp,fxls8962af" },
 	{ .compatible = "nxp,fxls8964af" },
+	{ .compatible = "nxp,fxls8974cf" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, fxls8962af_of_match);
drivers/iio/accel/fxls8962af.h +1 -0
index 9cbe98c3ba9a..45c7e57412e0 100644
@@ -11,6 +11,7 @@ struct device;
 enum {
 	fxls8962af,
 	fxls8964af,
+	fxls8974cf,
 };
 
 int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq);
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v2 2/4 iio: accel: add the new entry in driver for FXLS8967AF

In reply to Han Xu

Add this new device entry in the driver id table.

---
changes in v2
- change chip info orders

---
 drivers/iio/accel/fxls8962af-core.c | 7 +++++++
 drivers/iio/accel/fxls8962af-i2c.c  | 2 ++
 drivers/iio/accel/fxls8962af.h      | 1 +
 3 files changed, 10 insertions(+)
drivers/iio/accel/fxls8962af-core.c +7 -0
index 98811e4e16bb..c3589c3084ee 100644
@@ -127,6 +127,7 @@
 #define FXLS8962AF_DEVICE_ID			0x62
 #define FXLS8964AF_DEVICE_ID			0x84
 #define FXLS8974CF_DEVICE_ID			0x86
+#define FXLS8967AF_DEVICE_ID			0x87
 
 /* Raw temp channel offset */
 #define FXLS8962AF_TEMP_CENTER_VAL		25
@@ -765,6 +766,12 @@ static const struct fxls8962af_chip_info fxls_chip_info_table[] = {
 		.channels = fxls8962af_channels,
 		.num_channels = ARRAY_SIZE(fxls8962af_channels),
 	},
+	[fxls8967af] = {
+		.chip_id = FXLS8967AF_DEVICE_ID,
+		.name = "fxls8967af",
+		.channels = fxls8962af_channels,
+		.num_channels = ARRAY_SIZE(fxls8962af_channels),
+	},
 	[fxls8974cf] = {
 		.chip_id = FXLS8974CF_DEVICE_ID,
 		.name = "fxls8974cf",
drivers/iio/accel/fxls8962af-i2c.c +2 -0
index 17dd56756ff9..a8944b255a28 100644
@@ -30,6 +30,7 @@ static int fxls8962af_probe(struct i2c_client *client)
 static const struct i2c_device_id fxls8962af_id[] = {
 	{ "fxls8962af", fxls8962af },
 	{ "fxls8964af", fxls8964af },
+	{ "fxls8967af", fxls8967af },
 	{ "fxls8974cf", fxls8974cf },
 	{}
 };
@@ -38,6 +39,7 @@ MODULE_DEVICE_TABLE(i2c, fxls8962af_id);
 static const struct of_device_id fxls8962af_of_match[] = {
 	{ .compatible = "nxp,fxls8962af" },
 	{ .compatible = "nxp,fxls8964af" },
+	{ .compatible = "nxp,fxls8967af" },
 	{ .compatible = "nxp,fxls8974cf" },
 	{}
 };
drivers/iio/accel/fxls8962af.h +1 -0
index 45c7e57412e0..ba33eb2b807d 100644
@@ -11,6 +11,7 @@ struct device;
 enum {
 	fxls8962af,
 	fxls8964af,
+	fxls8967af,
 	fxls8974cf,
 };
 
Signature · 1 line
2.25.1
author
#3 lore raw

PATCH 3/4 dt-bindings: iio: accel: fxls8962af: add new compatible string

In reply to Han Xu

add new compatible string for the NXP FXLS8967AF accelerometer sensor.

---
 Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +2 -0
index 65ce8ea14b52..400eff3ff315 100644
@@ -14,12 +14,14 @@ description: |
   SPI and I2C interface.
     https://www.nxp.com/docs/en/data-sheet/FXLS8962AF.pdf
     https://www.nxp.com/docs/en/data-sheet/FXLS8964AF.pdf
+    https://www.nxp.com/docs/en/data-sheet/FXLS8967AF.pdf
 
 properties:
   compatible:
     enum:
       - nxp,fxls8962af
       - nxp,fxls8964af
+      - nxp,fxls8967af
 
   reg:
     maxItems: 1
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH 3/4] dt-bindings: iio: accel: fxls8962af: add new compatible string

Quoted 1 line · Han Xu

add new compatible string for the NXP FXLS8967AF accelerometer sensor.

Start with capital letter.

Quoted 12 lines
---
 Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +0 -0
index 65ce8ea14b52..400eff3ff315 100644
@@ -14,12 +14,14 @@ description: |
   SPI and I2C interface.

Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml description: | · line 24

Quoted 10 lines
Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +2 -0
     https://www.nxp.com/docs/en/data-sheet/FXLS8962AF.pdf
     https://www.nxp.com/docs/en/data-sheet/FXLS8964AF.pdf
+    https://www.nxp.com/docs/en/data-sheet/FXLS8967AF.pdf
 
 properties:
   compatible:
     enum:
       - nxp,fxls8962af
       - nxp,fxls8964af
+      - nxp,fxls8967af

They are all compatible with each other, right? Looks like, so these should be expressed in the bindings.

Best regards,
Krzysztof

author
#5 lore raw

PATCH 4/4 dt-bindings: iio: accel: fxls8974cf: add new compatible string

In reply to Han Xu

add new compatible string for the NXP FXLS8974CF accelerometer sensor.

---
 Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +2 -0
index 400eff3ff315..32cff7fb79ba 100644
@@ -15,6 +15,7 @@ description: |
     https://www.nxp.com/docs/en/data-sheet/FXLS8962AF.pdf
     https://www.nxp.com/docs/en/data-sheet/FXLS8964AF.pdf
     https://www.nxp.com/docs/en/data-sheet/FXLS8967AF.pdf
+    https://www.nxp.com/docs/en/data-sheet/FXLS8974CF.pdf
 
 properties:
   compatible:
@@ -22,6 +23,7 @@ properties:
       - nxp,fxls8962af
       - nxp,fxls8964af
       - nxp,fxls8967af
+      - nxp,fxls8974cf
 
   reg:
     maxItems: 1
Signature · 1 line
2.25.1
#6 lore raw
In reply to Han Xu
Quoted 6 lines · Han Xu

The patch set add two more NXP accelerometer entries for FXLS8967AF and FXLS8974CF in driver and update related compatible string for dt bindings.

Haibo Chen (1):
iio: accel: add fxls8974cf support

This contains some v2 some v1 patches. Please do not mix it. The entire series has one version. Your next will be v3 - for entire series.

Best regards,
Krzysztof

#7 lore raw
In reply to Han Xu
Quoted 3 lines · Han Xu

The patch set add two more NXP accelerometer entries for FXLS8967AF and FXLS8974CF in driver and update related compatible string for dt bindings.

Please resend to the lists that get_maintainers.pl tells you to.

Rob