diff options
author | Icenowy Zheng <icenowy@aosc.io> | 2020-07-03 21:44:05 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-07-20 09:03:38 +0100 |
commit | 5ef8f84aeac9974c9891d9987abb25362dbb4c8e (patch) | |
tree | c216ec82d44fe2e663090df04d155c18326f35d0 /drivers/iio | |
parent | 2f5452579a33db7e49d0a94089556d7c8077cde7 (diff) | |
download | linux-5ef8f84aeac9974c9891d9987abb25362dbb4c8e.tar.bz2 |
iio: light: stk3310: add chip id for STK3311-X variant
The STK3311 chip has a variant called STK3311-X, which has a different
chip id of 0x12.
Add the chip id to the driver.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/light/stk3310.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index 9e159393a38e..a2827d03ab0f 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -37,6 +37,7 @@ #define STK3310_CHIP_ID_VAL 0x13 #define STK3311_CHIP_ID_VAL 0x1D +#define STK3311X_CHIP_ID_VAL 0x12 #define STK3335_CHIP_ID_VAL 0x51 #define STK3310_PSINT_EN 0x01 #define STK3310_PS_MAX_VAL 0xFFFF @@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev) if (chipid != STK3310_CHIP_ID_VAL && chipid != STK3311_CHIP_ID_VAL && + chipid != STK3311X_CHIP_ID_VAL && chipid != STK3335_CHIP_ID_VAL) { dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid); return -ENODEV; |