Re: [PATCH RFC 4/6] net: rfkill: gpio: add device tree support

From
Linus Walleij <hidden>
Date
2014-01-22 09:54:42
Also in
linux-arm-kernel, linux-devicetree, linux-gpio, linux-wireless, lkml
Reply to
Alexandre Courbot, 2014-01-21
On Tue, Jan 21, 2014 at 3:53 PM, Alexandre Courbot [off-list ref] wrote:
On Tue, Jan 21, 2014 at 9:35 PM, Arnd Bergmann [off-list ref] wrote:
quoted
On Tuesday 21 January 2014, Linus Walleij wrote:
quoted
quoted
As discussed earlier in this thread I'm not sure the con_id is
suitable for labelling GPIOs. It'd be better to have a proper name
specified in DT/ACPI instead.
+1
I wonder why you guys prefer to have the name defined in the GPIO
mapping. Having the driver decide the label makes it easier to look up
which GPIO does what in debugfs, whereas nothing prevents people to
name GPIOs whatever inadequate name they want in the device DT node.
What am I overlooking here?
The proper name of a GPIO does not come from the driver but from the
usecase, i.e. often the name of the rail on the board where it is used.

Remember GPIO are per definition general purpose, they cannot get
any clever names from the driver. They would just be named
"chip-foo-gpio0" thru "chip-foo-gpioN" if the driver was to name them.

Using the rail name on the board is way more useful. A GPIO line
named "HAL_SENSOR" or "MMC_CD" is actually telling us what
that line is used for.

But such names can only come from a DT or ACPI table that has
knowledge of how the GPIO is used on a certain system/board and
not just from the driver.

Yours,
Linus Walleij
Thread (28 messages) 28 messages, 10 authors, last reply 2014-01-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help