Make that range X to X + ngpio - 1, of course. :)
What I have working right now is like the original patch,
but with "gpiochipN" (and "gpioN") nodes. The "*-N" style
doesn't match other sysfs usage.
So the "control" and "gpioN" files aren't nesting like that.
It could be argued which feels more natural. For external
gpiochips it might feel more natural to nest the gpioN nodes.
On some SOCs, that also true of the integrated GPIOs (docs
refer to "PB29" highlighting port B bit 29). But on many
others (OMAP and PXA for starters), they're referenced in
docs by a number 0..hundreds, ignoring details like which
register bank holds the relevant control bits.
That's why I decided not to use nesting. Either choice can
seem a bit odd on some platform; this way is easier and takes
less kernel code.
- Dave
--