public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: wangshuaijie@awinic.com
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
	kangjiajun@awinic.com, krzk+dt@kernel.org, lars@metafoo.de,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	liweilei@awinic.com, robh@kernel.org, waqar.hameed@axis.com
Subject: Re: [PATCH V3 2/2] Add support for Awinic proximity sensor
Date: Sat, 27 Jul 2024 13:22:27 +0100	[thread overview]
Message-ID: <20240727132227.4d350534@jic23-huawei> (raw)
In-Reply-To: <20240725124732.890375-1-wangshuaijie@awinic.com>


> >> diff --git a/drivers/iio/proximity/aw9610x.c b/drivers/iio/proximity/aw9610x.c
> >> new file mode 100644
> >> index 000000000000..15e53d55d2a1
> >> --- /dev/null
> >> +++ b/drivers/iio/proximity/aw9610x.c
> >> @@ -0,0 +1,1150 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * AWINIC sar sensor driver (aw9610x)
> >> + *
> >> + * Author: Shuaijie Wang<wangshuaijie@awinic.com>
> >> + *
> >> + * Copyright (c) 2024 awinic Technology CO., LTD
> >> + */
> >> +#include "aw_sar.h"
> >> +
> >> +#define AW9610X_I2C_NAME "aw9610x_sar"
> >> +#define AW9610X_CHANNEL_MAX	(5)  
> >
> >No brackets around numeric values. They add nothing.
> >  
> 
> The patch for v4 will fix these issues.

If you agree with a comment, usual convention to save everyone time is
don't reply to it and ideally crop that part of the email out entirely.

It is hard to find the active discussions that need replies in an
email unless it is cropped to make them the only remaining parts.

...


> 
> >> +
> >> +#define AFE_BASE_ADDR					(0x0000)  
> >
> The patch for v4 will fix these issues.
> 
> >> +
> >> +	if (reg_val != AW9610X_CHIP_ID) {
> >> +		dev_err(p_sar->dev, "unsupport dev, chipid is (0x%04x)", reg_val);  
> >
> >
> >To allow use of fallback compatibles in DT we normally accept chipid missmatches.
> >So at most dev_info and carry on anyway.
> >  
> 
> Sorry, if the chipid does not match, the driver is likely to encounter issues
> during operation. We will not consider compatibility with more devices for
> the time being.

This discussion has been had many times and the standard approach to this has
changed over time (in IIO anyway). We have not yet updated all drivers to
the current policy.

Current policy is that we do not block probing a chip that firmware has told
us is compatible on the basis of a failure to match a chip id.

Print a message to help with any bug report issues you may get.
+ educate integrators of your device that they must not put false compatibles
in their firmware.

> 
> >> +		return -EINVAL;
> >> +	}
> >> +	memcpy(p_sar->chip_name, "AW9610X", 8);
> >> +
> >> +	return 0;
> >> +}
...

> Kind regards,
> Wang Shuaijie


  reply	other threads:[~2024-07-27 12:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 11:31 [PATCH V3 0/2] Add support for Awinic SAR sensor wangshuaijie
2024-07-12 11:31 ` [PATCH V3 1/2] dt-bindings: iio: Add YAML to Awinic proximity sensor wangshuaijie
2024-07-12 11:55   ` Krzysztof Kozlowski
2024-07-13 12:15     ` Jonathan Cameron
2024-07-25 12:47     ` wangshuaijie
2024-07-25 13:53       ` Krzysztof Kozlowski
2024-07-12 12:34   ` Rob Herring (Arm)
2024-07-12 11:32 ` [PATCH V3 2/2] Add support for " wangshuaijie
2024-07-12 12:01   ` Krzysztof Kozlowski
2024-07-25 12:48     ` wangshuaijie
2024-07-12 14:33   ` Markus Elfring
2024-07-12 22:22   ` kernel test robot
2024-07-13  6:15   ` kernel test robot
2024-07-13  8:50   ` kernel test robot
2024-07-13 10:33   ` kernel test robot
2024-07-13 14:27   ` Jonathan Cameron
2024-07-25 12:47     ` wangshuaijie
2024-07-27 12:22       ` Jonathan Cameron [this message]
2024-07-12 11:49 ` [PATCH V3 0/2] Add support for Awinic SAR sensor Waqar Hameed
2024-07-25 12:48   ` wangshuaijie

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=20240727132227.4d350534@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kangjiajun@awinic.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liweilei@awinic.com \
    --cc=robh@kernel.org \
    --cc=wangshuaijie@awinic.com \
    --cc=waqar.hameed@axis.com \
    /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