Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 20, 2012, 02:13:31 AM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: [1]
Topic Tools  
Read May 24, 2011, 12:29:08 PM #0
lbeck

GPIO Access

Hi All,

I've built a 2.6.30 kernel with GPIO sysfs support.  Works well but there are a few pins I can't get to: PB16, PB17, PB18, PC4, PC5, PC9, PC10 and PC11.  When I attempt to "export" to these pin addresses using the sysfs mechanism I get an error.  I know that some are used by the sound device, which I have disabled in the kernel config.  That didn't seem to free up the pins.  Looking through the kernel sources trying to find out which I can use is proving exhausting.

Can anyone offer any hints here?  I realize I probably won't be able to get to all of these pins but a few more would be nice.

Thanks,

Lance

 
 
Read May 26, 2011, 01:54:11 AM #1
admin

Re: GPIO Access

The best thing is to enable and disable the GPIO at driver level.  But if necessary it is possible to just enable it from user space by writing to PIO enable register, for example using devmem2 utility,

devmem2 0xfffff600 w 0xc03f3fff

will enable PB0 ~ PB13, PB16~PB22, PB30~PB31 as GPIO.

This should work for kernel 2.6.30 but may not work for kernel 2.6.33 and up as kernel driver will rewrite the PIO enable register with its stored value at some point no matter what's been written to from user space.
 
Read September 29, 2011, 02:40:16 PM #2
AwareWolf

Re: GPIO Access

I have a similar desire as lbeck: to get at PB16, PB17, and PB18.

I would have thought finding the right kernel config element and turning it off was the right way to go. By simply writing to the PIO register at run time; is that really a good idea?
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re