diff --git a/drivers/input/input_cst816s.c b/drivers/input/input_cst816s.c index 9409deb045..6c17af3aca 100644 --- a/drivers/input/input_cst816s.c +++ b/drivers/input/input_cst816s.c @@ -14,7 +14,8 @@ LOG_MODULE_REGISTER(cst816s, CONFIG_INPUT_LOG_LEVEL); -#define CST816S_CHIP_ID 0xB4 +#define CST816S_CHIP_ID1 0xB4 +#define CST816S_CHIP_ID2 0xB5 #define CST816S_REG_DATA 0x00 #define CST816S_REG_GESTURE_ID 0x01 @@ -202,7 +203,7 @@ static int cst816s_chip_init(const struct device *dev) return ret; } - if (chip_id != CST816S_CHIP_ID) { + if ((chip_id != CST816S_CHIP_ID1) && (chip_id != CST816S_CHIP_ID2)) { LOG_ERR("CST816S wrong chip id: returned 0x%x", chip_id); return -ENODEV; }