Many thanks Iain!! At least the number matches up :)
[root@A20-SOM gpiochip0]# pwd /sys/class/gpio/gpiochip0 [root@A20-SOM gpiochip0]# cat ngpio 288 [root@A20-SOM gpiochip0]# I'm attempting to add this kernel module: https://github.com/tallakt/servodrive/blob/master/files/servodrive.c But I don't know what gpio.h I can use....any ideas? Is the "pinctrl-sunxi" module used to setup/configure pins? .... or are their functions first defined in the DTS and then "enabled" via the "pinctrl-sunxi" module? This describes calculating the pin number: http://linux-sunxi.org/GPIO#Accessing_the_GPIO_pins_through_sysfs_with_mainline_kernel Excuse all the questions but I'm struggling to understand how or what gpio.h I would use to implement the servodrive module. Thanks Bruce On Fri, Dec 5, 2014 at 2:43 PM, Iain Paton <[email protected]> wrote: > On 05/12/14 10:54, bruce bushby wrote: > > Hi > > > > I've been using the Olimex A20-SOM and having a lot of success using the > > mainline kernel....so far everything just works so a big thank you to all > > the contributors!! > > > > One area I'm struggling with is "gpio" I see there are various patches > > about: > > mainline != 3.4.x don't confuse them > > for mainline see: > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/sunxi/pinctrl-sunxi.c > > and for how to use them from userspace > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/gpio/sysfs.txt > > try something like > > root@lime2-2:~# cat /sys/class/gpio/gpiochip0/ngpio > 288 > > if that works and gives you a number, then gpios are working fine and you > can use them. > > since pinctrl and the gpio susbystem are used for lots of purposes by many > different parts of the kernel and drivers, I think it's unlikely your > kernel > would boot without it being functional > > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
