Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: accel: fxls8962af: add fxls8974cf support

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>

authored by

Haibo Chen and committed by
Jonathan Cameron
f7c0bc20 db61f1b7

+9
+7
drivers/iio/accel/fxls8962af-core.c
··· 129 129 130 130 #define FXLS8962AF_DEVICE_ID 0x62 131 131 #define FXLS8964AF_DEVICE_ID 0x84 132 + #define FXLS8974CF_DEVICE_ID 0x86 132 133 133 134 /* Raw temp channel offset */ 134 135 #define FXLS8962AF_TEMP_CENTER_VAL 25 ··· 764 763 [fxls8964af] = { 765 764 .chip_id = FXLS8964AF_DEVICE_ID, 766 765 .name = "fxls8964af", 766 + .channels = fxls8962af_channels, 767 + .num_channels = ARRAY_SIZE(fxls8962af_channels), 768 + }, 769 + [fxls8974cf] = { 770 + .chip_id = FXLS8974CF_DEVICE_ID, 771 + .name = "fxls8974cf", 767 772 .channels = fxls8962af_channels, 768 773 .num_channels = ARRAY_SIZE(fxls8962af_channels), 769 774 },
+1
drivers/iio/accel/fxls8962af-i2c.c
··· 30 30 static const struct i2c_device_id fxls8962af_id[] = { 31 31 { "fxls8962af", fxls8962af }, 32 32 { "fxls8964af", fxls8964af }, 33 + { "fxls8974cf", fxls8974cf }, 33 34 {} 34 35 }; 35 36 MODULE_DEVICE_TABLE(i2c, fxls8962af_id);
+1
drivers/iio/accel/fxls8962af.h
··· 11 11 enum { 12 12 fxls8962af, 13 13 fxls8964af, 14 + fxls8974cf, 14 15 }; 15 16 16 17 int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq);