Thread (14 messages) 14 messages, 4 authors, 2020-08-26
STALE2103d
Revisions (3)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current

Re: [PATCH 2/5] gpio: pca953x: Name the gpiochip after the I2C address

From: Linus Walleij <hidden>
Date: 2017-11-30 14:45:22
Also in: linux-arm-kernel

On Fri, Nov 24, 2017 at 3:26 PM, Andrew Lunn [off-list ref] wrote:
On Fri, Nov 24, 2017 at 10:30:42AM +0100, Linus Walleij wrote:
quoted
Just putting the name of the I2C device as name for the
GPIO chip (label) is ambigous, and makes it hard for us
to use GPIO descriptor tables on systems such as DaVinci
DA850EVM which has two chips but on I2C address 0x20 and 0x21.

Instead, append "-XX" to the GPIOchip name using the I2C
address so we get a unique chip name that can be used
in descriptor tables, such as "tca6416-20" and
"tca6416-21" on the DaVinci DA850EVM.
Hi Linus

Are you making the assumption that there are not two devices at the
same address but on different I2C busses?
Yes.
How safe is that assumption? Can you include the adapter ID in the
string?
Sure, I just had to come up with something.

The universe of board files is not very big, so the number of
potentially clashing things is not eternal. This is just a transient
"contain and deprecate" thing so I think it's unlikely that they
clash but usually when I say something like that the next day
it happens...

So I can add the adapter number :)

I am waiting for more feedback on the series before resending.

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