Commit 5ef8f84a authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Jonathan Cameron

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: default avatarIcenowy Zheng <icenowy@aosc.io>
Signed-off-by: default avatarOndrej Jirman <megous@megous.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2f545257
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#define STK3310_CHIP_ID_VAL 0x13 #define STK3310_CHIP_ID_VAL 0x13
#define STK3311_CHIP_ID_VAL 0x1D #define STK3311_CHIP_ID_VAL 0x1D
#define STK3311X_CHIP_ID_VAL 0x12
#define STK3335_CHIP_ID_VAL 0x51 #define STK3335_CHIP_ID_VAL 0x51
#define STK3310_PSINT_EN 0x01 #define STK3310_PSINT_EN 0x01
#define STK3310_PS_MAX_VAL 0xFFFF #define STK3310_PS_MAX_VAL 0xFFFF
...@@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev) ...@@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
if (chipid != STK3310_CHIP_ID_VAL && if (chipid != STK3310_CHIP_ID_VAL &&
chipid != STK3311_CHIP_ID_VAL && chipid != STK3311_CHIP_ID_VAL &&
chipid != STK3311X_CHIP_ID_VAL &&
chipid != STK3335_CHIP_ID_VAL) { chipid != STK3335_CHIP_ID_VAL) {
dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid); dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid);
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment