iio: accel: add the new entry in driver for FXLS8967AF
Subsystems (3)
PATCH 1/2 iio: accel: add the new entry in driver for FXLS8967AF
Add this new device entry in the driver id table.
--- 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
@@ -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
@@ -772,6 +773,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), + }, }; static const struct iio_info fxls8962af_info = {
drivers/iio/accel/fxls8962af-i2c.c +2 -0
@@ -31,6 +31,7 @@ static const struct i2c_device_id fxls8962af_id[] = { { "fxls8962af", fxls8962af }, { "fxls8964af", fxls8964af }, { "fxls8974cf", fxls8974cf }, + { "fxls8967af", fxls8967af }, {} };MODULE_DEVICE_TABLE (i2c, fxls8962af_id);
@@ -39,6 +40,7 @@ static const struct of_device_id fxls8962af_of_match[] = { { .compatible = "nxp,fxls8962af" }, { .compatible = "nxp,fxls8964af" }, { .compatible = "nxp,fxls8974cf" }, + { .compatible = "nxp,fxls8967af" }, {} };MODULE_DEVICE_TABLE (of, fxls8962af_of_match);
drivers/iio/accel/fxls8962af.h +1 -0
@@ -12,6 +12,7 @@ enum { fxls8962af, fxls8964af, fxls8974cf, + fxls8967af, };int fxls8962af_core_probe (struct device *dev,struct regmap *regmap,int irq);
Signature · 1 line
2.25.1
PATCH 2/2 dt-bindings: iio: accel: fxls8962af: add new compatible string
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
@@ -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
Re: [PATCH 2/2] dt-bindings: iio: accel: fxls8962af: add new compatible string
Quoted 7 lines · Han Xu
add new compatible string for the NXP FXLS8967AF accelerometer sensor.
Signed-off-by Han Xu <[email protected]>--- Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++ 1 file changed, 2 insertions(+)
Best regards,
Krzysztof
Re: [PATCH 2/2] dt-bindings: iio: accel: fxls8962af: add new compatible string
In reply to Han XuQuoting Han Xu <[email protected]>:
Quoted 3 lines
add new compatible string for the NXP FXLS8967AF accelerometer sensor.
Signed-off-by Han Xu <[email protected]>
Quoted 25 lines
--- Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml +2
-1@@ -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 --2.25.1
Quoting Han Xu <[email protected]>:
Quoted 3 lines
Add this new device entry in the driver id table.
Signed-off-by Han Xu <[email protected]>
Quoted 67 lines
--- 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@@ -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@@ -772,6 +773,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), + }, };static const struct
iio_infofxls8962af_info= {drivers/iio/accel/fxls8962af-i2c.c +2
-0@@ -31,6 +31,7 @@ static const struct i2c_device_id fxls8962af_id[] = { { "fxls8962af", fxls8962af }, { "fxls8964af", fxls8964af }, { "fxls8974cf", fxls8974cf }, + { "fxls8967af", fxls8967af }, {} };MODULE_DEVICE_TABLE (i2c, fxls8962af_id);@@ -39,6 +40,7 @@ static const struct of_device_id fxls8962af_of_match[] = { { .compatible = "nxp,fxls8962af" }, { .compatible = "nxp,fxls8964af" }, { .compatible = "nxp,fxls8974cf" }, + { .compatible = "nxp,fxls8967af" }, {} };MODULE_DEVICE_TABLE (of, fxls8962af_of_match);drivers/iio/accel/fxls8962af.h +1
-0@@ -12,6 +12,7 @@ enum { fxls8962af, fxls8964af, fxls8974cf, + fxls8967af, }; int fxls8962af_core_probe(struct device *dev, struct regmap*regmap, int irq);
--
2.25.1
Jonathan Cameron
maintainerQuoted 3 lines · On Wed, 7 Dec 2022 10:20:44 -0600 Han Xu <[email protected]> wrote:
Add this new device entry in the driver id table.
Signed-off-by Han Xu <[email protected]>
Hi Han,
I went to apply this and discovered the FXLs8974CF_DEVICE_ID etc isn't yet present in the upstream driver. Have a I missed a patch set somewhere?
One comment inline.
Quoted 11 lines
--- 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 +0
-0
drivers/iio/accel/fxls8962af-core.c line 130
Quoted 4 lines
drivers/iio/accel/fxls8962af-core.c +1
-0@@ -127,6 +127,7 @@#define FXLS8962AF_DEVICE_ID 0x62#define FXLS8964AF_DEVICE_ID 0x84#define FXLS8974CF_DEVICE_ID 0x86 +#define FXLS8967AF_DEVICE_ID 0x87
Fine with these being in numeric value order...
drivers/iio/accel/fxls8962af-core.c static const struct fxls8962af_chip_info fxls_chip_info_table[] = { · line 776
Quoted 8 lines
drivers/iio/accel/fxls8962af-core.c +1
-0/* Raw temp channel offset */ #define FXLS8962AF_TEMP_CENTER_VAL 25@@ -772,6 +773,12 @@ static const struct fxls8962af_chip_info fxls_chip_info_table[] = { .channels = fxls8962af_channels, .num_channels = ARRAY_SIZE(fxls8962af_channels), }, + [fxls8967af] = {
I'd rather everything else was in 'alphabetical order as anyone looking down the lists will expect that ordering rather than one based on IDs that they probably won't have reason to know.
Quoted 40 lines
drivers/iio/accel/fxls8962af-core.c +5
-0+ .chip_id = FXLS8967AF_DEVICE_ID, + .name = "fxls8967af", + .channels = fxls8962af_channels, + .num_channels = ARRAY_SIZE(fxls8962af_channels), + }, }; static const struct iio_info fxls8962af_info = {drivers/iio/accel/fxls8962af-i2c.c +2
-0@@ -31,6 +31,7 @@ static const struct i2c_device_id fxls8962af_id[] = { { "fxls8962af", fxls8962af }, { "fxls8964af", fxls8964af }, { "fxls8974cf", fxls8974cf }, + { "fxls8967af", fxls8967af }, {} };MODULE_DEVICE_TABLE (i2c, fxls8962af_id);@@ -39,6 +40,7 @@ static const struct of_device_id fxls8962af_of_match[] = { { .compatible = "nxp,fxls8962af" }, { .compatible = "nxp,fxls8964af" }, { .compatible = "nxp,fxls8974cf" }, + { .compatible = "nxp,fxls8967af" }, {} };MODULE_DEVICE_TABLE (of, fxls8962af_of_match);drivers/iio/accel/fxls8962af.h +1
-0@@ -12,6 +12,7 @@ enum { fxls8962af, fxls8964af, fxls8974cf, + fxls8967af, };int fxls8962af_core_probe (struct device *dev,struct regmap *regmap,int irq);
Quoted 5 lines · Jonathan Cameron
Quoted 2 lines · On Wed, 7 Dec 2022 10:20:44 -0600 Han Xu <[email protected]> wrote:
Add this new device entry in the driver id table.
Quoted 9 lines
Quoted 1 line
Signed-off-by Han Xu <[email protected]>Hi Han,
I went to apply this and discovered the
FXLs8974CF_DEVICE_IDetc isn't yet present in the upstream driver. Have a I missed a patch set somewhere?One comment inline.
There is another local patch not upstreamed, just sent them out as a patch set.
Quoted 18 lines
Quoted 12 lines
--- 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 +0
-0drivers/iio/accel/fxls8962af-core.c line 130
Quoted 4 lines
drivers/iio/accel/fxls8962af-core.c +1
-0@@ -127,6 +127,7 @@#define FXLS8962AF_DEVICE_ID 0x62#define FXLS8964AF_DEVICE_ID 0x84#define FXLS8974CF_DEVICE_ID 0x86 +#define FXLS8967AF_DEVICE_ID 0x87Fine with these being in numeric value order...
Quoted 1 line
Quoted 11 lines
drivers/iio/accel/fxls8962af-core.c static const struct fxls8962af_chip_info fxls_chip_info_table[] = { · line 776
Quoted 7 lines
/* Raw temp channel offset */
#defineFXLS8962AF_TEMP_CENTER_VAL25drivers/iio/accel/fxls8962af-core.c +1
-0@@ -772,6 +773,12 @@ static const struct fxls8962af_chip_info fxls_chip_info_table[] = { .channels = fxls8962af_channels, .num_channels = ARRAY_SIZE(fxls8962af_channels), }, + [fxls8967af] = {I'd rather everything else was in 'alphabetical order as anyone looking down the lists will expect that ordering rather than one based on IDs that they probably won't have reason to know.
fixed in v2.
Quoted 42 lines
Quoted 41 lines
drivers/iio/accel/fxls8962af-core.c +5
-0+ .chip_id = FXLS8967AF_DEVICE_ID, + .name = "fxls8967af", + .channels = fxls8962af_channels, + .num_channels = ARRAY_SIZE(fxls8962af_channels), + }, }; static const struct iio_info fxls8962af_info = {drivers/iio/accel/fxls8962af-i2c.c +2
-0@@ -31,6 +31,7 @@ static const struct i2c_device_id fxls8962af_id[] = { { "fxls8962af", fxls8962af }, { "fxls8964af", fxls8964af }, { "fxls8974cf", fxls8974cf }, + { "fxls8967af", fxls8967af }, {} };MODULE_DEVICE_TABLE (i2c, fxls8962af_id);@@ -39,6 +40,7 @@ static const struct of_device_id fxls8962af_of_match[] = { { .compatible = "nxp,fxls8962af" }, { .compatible = "nxp,fxls8964af" }, { .compatible = "nxp,fxls8974cf" }, + { .compatible = "nxp,fxls8967af" }, {} };MODULE_DEVICE_TABLE (of, fxls8962af_of_match);drivers/iio/accel/fxls8962af.h +1
-0@@ -12,6 +12,7 @@ enum { fxls8962af, fxls8964af, fxls8974cf, + fxls8967af, };int fxls8962af_core_probe (struct device *dev,struct regmap *regmap,int irq);