]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: accel: fxls8962af: add fxls8974cf support
authorHaibo Chen <haibo.chen@nxp.com>
Fri, 15 Nov 2024 20:23:59 +0000 (15:23 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 7 Dec 2024 17:11:01 +0000 (17:11 +0000)
fxls8974cf is similar with fxls8962af, the only difference is the device id
change to 0x86.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20241115-fxls-v2-3-95f3df9228ed@nxp.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/fxls8962af-core.c
drivers/iio/accel/fxls8962af-i2c.c
drivers/iio/accel/fxls8962af.h

index 65aac60f12451076c00241bc1bbce9af72e86639..192cc133ba0b6b78d979718adefb866ceaf0614b 100644 (file)
 
 #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
@@ -766,6 +767,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 = {
index 2e1bb43ef2a14267d1051a67177947e25ffe4773..c797088e3a07ee1a0c11fb84367157f8b332df59 100644 (file)
@@ -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);
index 6eaa2803b26f07f7caad5f89d1126fc8ca71bad2..733b69e01e1ccd58e011de454f5def9761d49bf8 100644 (file)
@@ -11,6 +11,7 @@ struct device;
 enum {
        fxls8962af,
        fxls8964af,
+       fxls8974cf,
 };
 
 int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq);