diff options
author | Barnabás Czémán <barnabas.czeman@mainlining.org> | 2024-08-19 00:29:39 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-03 19:49:42 +0200 |
commit | 3b92fc43bfd961fe83c82efd6bc8a852a29ea4de (patch) | |
tree | 26fa98e83ef32c34dc303b720755ff1395c76ece | |
parent | Merge tag 'fpga-for-6.12-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-3b92fc43bfd961fe83c82efd6bc8a852a29ea4de.tar.xz linux-3b92fc43bfd961fe83c82efd6bc8a852a29ea4de.zip |
iio: magnetometer: ak8975: Relax failure on unknown id
Relax failure when driver gets an unknown device id for
allow probe for register compatible devices.
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-1-f0734d14cfb9@mainlining.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/magnetometer/ak8975.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index ccbebe5b66cd..67d5d1f2402f 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -484,10 +484,14 @@ static int ak8975_who_i_am(struct i2c_client *client, if (wia_val[1] == AK09916_DEVICE_ID) return 0; break; - default: - dev_err(&client->dev, "Type %d unknown\n", type); } - return -ENODEV; + + dev_info(&client->dev, "Device ID %x is unknown.\n", wia_val[1]); + /* + * Let driver to probe on unknown id for support more register + * compatible variants. + */ + return 0; } /* |