public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F'
@ 2022-11-19 21:56 Wolfram Sang
  2022-11-29 11:31 ` Jean Delvare
  2022-12-05 10:12 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-11-19 21:56 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Jean Delvare, Wolfram Sang

Original motivation was to add I2C_FUNC_SLAVE, so users can easily
find out if their hardware supports being a target. While here, add
HostNotify and 10-bit addressing as well.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Now, we could also add PROTOCOL_MANGLING and NO_START to have them all.
But I am not sure if they are really helpful for users?

 tools/i2cdetect.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c
index 066ec82..54b78e2 100644
--- a/tools/i2cdetect.c
+++ b/tools/i2cdetect.c
@@ -160,6 +160,12 @@ static const struct func all_func[] = {
 	  .name = "I2C Block Write" },
 	{ .value = I2C_FUNC_SMBUS_READ_I2C_BLOCK,
 	  .name = "I2C Block Read" },
+	{ .value = I2C_FUNC_SMBUS_HOST_NOTIFY,
+	  .name = "SMBus HostNotify" },
+	{ .value = I2C_FUNC_10BIT_ADDR,
+	  .name = "10-bit addressing" },
+	{ .value = I2C_FUNC_SLAVE,
+	  .name = "Target mode" },
 	{ .value = 0, .name = "" }
 };
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F'
  2022-11-19 21:56 [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F' Wolfram Sang
@ 2022-11-29 11:31 ` Jean Delvare
  2022-12-05 10:12 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2022-11-29 11:31 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc

Hi Wolfram,

On Sat, 19 Nov 2022 22:56:46 +0100, Wolfram Sang wrote:
> Original motivation was to add I2C_FUNC_SLAVE, so users can easily
> find out if their hardware supports being a target. While here, add
> HostNotify and 10-bit addressing as well.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Fine with me, with one request below.

> ---
> 
> Now, we could also add PROTOCOL_MANGLING and NO_START to have them all.
> But I am not sure if they are really helpful for users?
> 
>  tools/i2cdetect.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c
> index 066ec82..54b78e2 100644
> --- a/tools/i2cdetect.c
> +++ b/tools/i2cdetect.c
> @@ -160,6 +160,12 @@ static const struct func all_func[] = {
>  	  .name = "I2C Block Write" },
>  	{ .value = I2C_FUNC_SMBUS_READ_I2C_BLOCK,
>  	  .name = "I2C Block Read" },
> +	{ .value = I2C_FUNC_SMBUS_HOST_NOTIFY,
> +	  .name = "SMBus HostNotify" },

I'm not a big fan of gluing words. "SMBus Host Notify" please.

> +	{ .value = I2C_FUNC_10BIT_ADDR,
> +	  .name = "10-bit addressing" },
> +	{ .value = I2C_FUNC_SLAVE,
> +	  .name = "Target mode" },
>  	{ .value = 0, .name = "" }
>  };
>  

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

Thanks,
-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F'
  2022-11-19 21:56 [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F' Wolfram Sang
  2022-11-29 11:31 ` Jean Delvare
@ 2022-12-05 10:12 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-12-05 10:12 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Jean Delvare

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

On Sat, Nov 19, 2022 at 10:56:46PM +0100, Wolfram Sang wrote:
> Original motivation was to add I2C_FUNC_SLAVE, so users can easily
> find out if their hardware supports being a target. While here, add
> HostNotify and 10-bit addressing as well.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Pushed to master with the improvement requested by Jean.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-05 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-19 21:56 [PATCH i2c-tools] i2cdetect: display more functionality bits with '-F' Wolfram Sang
2022-11-29 11:31 ` Jean Delvare
2022-12-05 10:12 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox