On Sat, Jan 12, 2013 at 10:06 AM, Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx> wrote: >> Use gpiochip_add_pin_range() from the GPIO driver. >> >> An example is provided in >> drivers/pinctrl/pinctrl-coh901.c > > Ok, will do. But we need to find a way to share the pins arrays between > the pinctrl and gpio drivers then. > > Maybe add a pinctrl-sunxi-pins.h file? or merge the pinctrl and gpio > drivers? > > I'm kind of reluctant to merging the drivers into one single messy file, > but if that's the way to go, fine. Well, does it have to be that messy? You can merge it different ways. For example there is *no* need to have two different device driver structs and two probe functions, right? Just one device named pinctrl that has one state container and one single dd and probe function. That makes everything sooo much easier I think. Just register both a pinctrl and GPIO interface (in that order). See the recent pinctrl-abx500.c submission for an example on how to do this. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html