public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, "Poeche, Uwe" <uwe.poeche@siemens.com>
Subject: Re: [PATCH i2c-tools] i2cdetect: only use "newer" I2C_FUNC_* flags if they exist
Date: Thu, 23 Feb 2023 12:54:19 +0100	[thread overview]
Message-ID: <20230223125419.06a5cfc5@endymion.delvare> (raw)
In-Reply-To: <20230220140830.74180-1-wsa+renesas@sang-engineering.com>

On Mon, 20 Feb 2023 15:08:29 +0100, Wolfram Sang wrote:
> This allows i2cdetect to be compiled for older kernels.
> 
> Reported-by: "Poeche, Uwe" <uwe.poeche@siemens.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Jean, do you mind these #ifdefs in the code?
> 
>  tools/i2cdetect.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c
> index 5ab4ea4..2d4d3b4 100644
> --- a/tools/i2cdetect.c
> +++ b/tools/i2cdetect.c
> @@ -160,12 +160,16 @@ static const struct func all_func[] = {
>  	  .name = "I2C Block Write" },
>  	{ .value = I2C_FUNC_SMBUS_READ_I2C_BLOCK,
>  	  .name = "I2C Block Read" },
> +#if defined(I2C_FUNC_SMBUS_HOST_NOTIFY)
>  	{ .value = I2C_FUNC_SMBUS_HOST_NOTIFY,
>  	  .name = "SMBus Host Notify" },
> +#endif
>  	{ .value = I2C_FUNC_10BIT_ADDR,
>  	  .name = "10-bit addressing" },
> +#if defined(I2C_FUNC_SLAVE)
>  	{ .value = I2C_FUNC_SLAVE,
>  	  .name = "Target mode" },
> +#endif
>  	{ .value = 0, .name = "" }
>  };
>  

No objection.

Reviewed-by: Jean Delvare <jdelvare@suse.de>

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2023-02-23 11:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 14:08 [PATCH i2c-tools] i2cdetect: only use "newer" I2C_FUNC_* flags if they exist Wolfram Sang
2023-02-23 11:54 ` Jean Delvare [this message]
2023-02-23 14:07 ` Wolfram Sang

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=20230223125419.06a5cfc5@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=uwe.poeche@siemens.com \
    --cc=wsa+renesas@sang-engineering.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