public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Barnabás Czémán" <barnabas.czeman@mainlining.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Albrieux <jonathan.albrieux@gmail.com>,
	Gwendal Grignou <gwendal@chromium.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux@mainlining.org
Subject: Re: [PATCH v4 1/4] iio: magnetometer: ak8975: Relax failure on unknown id
Date: Fri, 23 Aug 2024 19:32:03 +0100	[thread overview]
Message-ID: <20240823193203.7772a6b0@jic23-huawei> (raw)
In-Reply-To: <20240819-ak09918-v4-1-f0734d14cfb9@mainlining.org>

On Mon, 19 Aug 2024 00:29:39 +0200
Barnabás Czémán <barnabas.czeman@mainlining.org> wrote:

> 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>
> ---
>  drivers/iio/magnetometer/ak8975.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index ccbebe5b66cd..8eef4d5dd9e2 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -484,10 +484,13 @@ 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
Comment style wrong, I'll fix it up.

With that tweak applied to the togreg branch of iio.git

Thanks,

Jonathan


> +	 * compatible variants.
> +	 */
> +	return 0;
>  }
>  
>  /*
> 


  reply	other threads:[~2024-08-23 18:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-18 22:29 [PATCH v4 0/4] Add support for AK09918 Barnabás Czémán
2024-08-18 22:29 ` [PATCH v4 1/4] iio: magnetometer: ak8975: Relax failure on unknown id Barnabás Czémán
2024-08-23 18:32   ` Jonathan Cameron [this message]
2024-08-23 19:11     ` Andy Shevchenko
2024-08-26 10:39       ` Jonathan Cameron
2024-08-26 10:42         ` Andy Shevchenko
2024-08-18 22:29 ` [PATCH v4 2/4] iio: magnetometer: ak8975: Fix reading for ak099xx sensors Barnabás Czémán
2024-08-18 22:29 ` [PATCH v4 3/4] dt-bindings: iio: magnetometer: Add ak09118 Barnabás Czémán
2024-08-18 22:35   ` Conor Dooley
2024-08-18 22:29 ` [PATCH v4 4/4] iio: magnetometer: ak8975: Add AK09118 support Barnabás Czémán
2024-08-23 18:35   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240823193203.7772a6b0@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=barnabas.czeman@mainlining.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gwendal@chromium.org \
    --cc=jonathan.albrieux@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@mainlining.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox