summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnabás Czémán <trabarni@gmail.com>2024-05-21 18:34:51 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-04 21:53:06 +0300
commit709aeedcc7cfadb2f9c3ac29b0cda337c6b57b7d (patch)
tree57e28b35904bcecba0cac0a15ab0b8a61b397233
parent4d8c7da08be5ef48ef0c3d4ea1a25733b03d626a (diff)
downloadlinux-709aeedcc7cfadb2f9c3ac29b0cda337c6b57b7d.tar.xz
iio: light: stk3310: relax failure to match id
Relax failure to match ID to a warning rather than probe fail. This add abilty to use other compatible variants when chip id is not defined in the driver. Signed-off-by: Barnabás Czémán <trabarni@gmail.com> Link: https://lore.kernel.org/r/20240521-stk3311-v1-1-07a4966b355a@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/light/stk3310.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index 3a03823e488a..c2dd42664681 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -477,8 +477,7 @@ static int stk3310_init(struct iio_dev *indio_dev)
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;
+ dev_warn(&client->dev, "unknown chip id: 0x%x\n", chipid);
}
state = STK3310_STATE_EN_ALS | STK3310_STATE_EN_PS;