Thread (4 messages) flat view 4 messages, 3 authors, 2021-01-18

[PATCH, v1 1/1] gpio: aspeed: Add gpio base address reading

From: Andrew Jeffery <hidden>
Date: 2021-01-14 01:50:22
Also in: linux-arm-kernel, linux-gpio, lkml, openbmc

Hello,

On Thu, 14 Jan 2021, at 09:08, Hongwei Zhang wrote:
Add gpio base address reading in the driver; in old code, it just
returns -1 to gpio->chip.base.
Why do you want to do this? It feels hacky. The base address only affects the 
legacy sysfs number-space, and even then if you're using the sysfs interface 
you can discover the base address for a specific gpiochip via the associated 
attribute. For example:

# cat /sys/bus/platform/devices/1e780000.gpio/gpio/gpiochip*/base
816

I feel that you should instead be changing your userspace not to assume a fixed 
value.

Finally, the base value is a linux-specific thing and doesn't belong in the 
devicetree, and if it did, you would also need to update the devicetree binding 
in Documentation/.

Cheers,

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