Thread (20 messages) 20 messages, 3 authors, 2025-01-08

Re: [PATCH v4 4/9] i2c: use client addresses directly in ATR interface

From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Date: 2025-01-08 13:38:17
Also in: linux-gpio, linux-i2c, linux-media, lkml

Hi,

On 08/01/2025 15:31, Romain Gantois wrote:
Hi,

On lundi 6 janvier 2025 10:51:20 heure normale d’Europe centrale Tomi
Valkeinen wrote:
quoted
Hi,

On 30/12/2024 15:22, Romain Gantois wrote:
quoted
The I2C Address Translator (ATR) module defines mappings from i2c_client
structs to aliases. However, only the physical address of each i2c_client
...
quoted
quoted
-	dev_dbg(atr->dev, "chan%u: client 0x%02x mapped at alias 0x%02x (%s)
\n",
quoted
quoted
-		chan->chan_id, client->addr, alias, client->name);
+	dev_dbg(atr->dev, "chan%u: addr 0x%02x mapped at alias 0x%02x\n",
+		chan->chan_id, addr, alias);
This, and the dev_dbg() below, sound a bit odd to my ear. But I'm not
sure what would be a good print... "added alias 0x12 for address 0x34"?
Maybe "assigned address 0x34 to alias 0x12"? Since the alias doesn't really go
anywhere, we just assign different downstream addresses to it.
I guess it's how you look at this =). I like to think it (in this 
order): alias -> address, as it's basically a mapping. So a debug print 
that prints the alias first and address second feels more natural. 
"using alias 0x12 for address 0x34"?

But this is nit-picking, I don't have any strong views here.

  Tomi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help