summaryrefslogtreecommitdiff
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorBarnabás Czémán <trabarni@gmail.com>2024-05-21 18:34:53 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-04 21:53:06 +0300
commitcba37c2e532dc234cc8ea1894f130ca39948d4a9 (patch)
treebf482907580a21aa8be08d311ebe1b3349ade517 /drivers/iio/light
parent745712c7bb1f8eaf00cf3b5a49c3c13bd7805597 (diff)
downloadlinux-cba37c2e532dc234cc8ea1894f130ca39948d4a9.tar.xz
iio: light: stk3310: support more stk3311 variants
Add support for more stk3311 variants like stk3311-a and stk3311-s34, they are register compatible but they have different chip ids. Signed-off-by: Barnabás Czémán <trabarni@gmail.com> Link: https://lore.kernel.org/r/20240521-stk3311-v1-3-07a4966b355a@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/stk3310.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index 56627332c3d6..e3470d6743ef 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -37,6 +37,8 @@
#define STK3310_CHIP_ID_VAL 0x13
#define STK3311_CHIP_ID_VAL 0x1D
+#define STK3311A_CHIP_ID_VAL 0x15
+#define STK3311S34_CHIP_ID_VAL 0x1E
#define STK3311X_CHIP_ID_VAL 0x12
#define STK3335_CHIP_ID_VAL 0x51
#define STK3310_PSINT_EN 0x01
@@ -83,6 +85,8 @@ static const struct reg_field stk3310_reg_field_flag_nf =
static const u8 stk3310_chip_ids[] = {
STK3310_CHIP_ID_VAL,
+ STK3311A_CHIP_ID_VAL,
+ STK3311S34_CHIP_ID_VAL,
STK3311X_CHIP_ID_VAL,
STK3311_CHIP_ID_VAL,
STK3335_CHIP_ID_VAL,