|
|
|
Re: gpiolib on at91 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Bill Gatliff schrieb: > Joe wrote: >> Hi all! >> >> From what i've read on the ML, Ryan Mallon ported the gpiolib to AT91 >> platform (many thanks), but could maybe point me someone to an >> example/appropriate documentation on how to implement the use of the >> gpiolib into the board support file? >> Grepping and google failed me unfortunately. >> The hardware is nothing fancy, just 4 dip-switches intended to set some >> configuration options, and therefore i think the cleanest approach would >> be to be able to see "1" or "0" in somewhere sysfs/gpio. >> Are there any hints maybe? >> > > Echo the number of the gpio pin to /sys/class/gpio/export, and then a > directory should appear under /sys/class/gpio. Pins default to input, > so you should be able to cat /sys/class/gpio/gpioNNN/value to see the > state of the pin. > > > b.g. > /sys/class/gpio shows the described behaviour concerning the gpioNNN subdirectory, and the file direction inside says "in" accordingly. However, "value" does not change. I've got four switches connected to lines PB10-PB13, which should map to gpio42-gpio45 when banks are 32 each. at91rm9200_initialize(18432000, PQFP) and at91_gpio_init(...) are called correctly on startup. So might there be another thing i've stupidly missed? (hardware is functional and 100% tested) -- Sepp "ZaP" Holzmayr please reply to: zentrale.at.work@xxxxxxxxx "Never underestimate the bandwidth of a freight train full of DAT tapes. Only the round-trip is a little suboptimal." ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux Arm] [Fedora ARM] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
|