Commit 3b92fc43 authored by Barnabás Czémán's avatar Barnabás Czémán Committed by Jonathan Cameron

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: default avatarBarnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-1-f0734d14cfb9@mainlining.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent aead27d7
......@@ -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;
}
/*
......
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