Skip to content

Commit 5ef8f84

Browse files
IcenowyJonathan Cameron
authored andcommitted
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>
1 parent 2f54525 commit 5ef8f84

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/iio/light/stk3310.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
#define STK3310_CHIP_ID_VAL 0x13
3939
#define STK3311_CHIP_ID_VAL 0x1D
40+
#define STK3311X_CHIP_ID_VAL 0x12
4041
#define STK3335_CHIP_ID_VAL 0x51
4142
#define STK3310_PSINT_EN 0x01
4243
#define STK3310_PS_MAX_VAL 0xFFFF
@@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
453454

454455
if (chipid != STK3310_CHIP_ID_VAL &&
455456
chipid != STK3311_CHIP_ID_VAL &&
457+
chipid != STK3311X_CHIP_ID_VAL &&
456458
chipid != STK3335_CHIP_ID_VAL) {
457459
dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid);
458460
return -ENODEV;

0 commit comments

Comments
 (0)