Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Barnabás Czémán and committed by
Jonathan Cameron
3b92fc43 aead27d7

+7 -3
+7 -3
drivers/iio/magnetometer/ak8975.c
··· 484 484 if (wia_val[1] == AK09916_DEVICE_ID) 485 485 return 0; 486 486 break; 487 - default: 488 - dev_err(&client->dev, "Type %d unknown\n", type); 489 487 } 490 - return -ENODEV; 488 + 489 + dev_info(&client->dev, "Device ID %x is unknown.\n", wia_val[1]); 490 + /* 491 + * Let driver to probe on unknown id for support more register 492 + * compatible variants. 493 + */ 494 + return 0; 491 495 } 492 496 493 497 /*