public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Userspace GPIO
@ 2006-05-17  4:09 Marco Candiago
  2006-05-17  8:56 ` andrzej zaborowski
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Candiago @ 2006-05-17  4:09 UTC (permalink / raw)
  To: Woodruff, Richard, Matt Callow; +Cc: linux-omap-open-source


Matt, Richard,

Thanks for your replies.

Matt,

	devmem2 does do the job and is ridiculously easy to use.

Richard,

 I understand what you are saying, but I simply do not know how to
create a proxy of this nature.  Do you have any recommended
documentation that would
Enlighten me.

Marco


-----Original Message-----
From: linux-omap-open-source-bounces@linux.omap.com
[mailto:linux-omap-open-source-bounces@linux.omap.com] On Behalf Of
Woodruff, Richard
Sent: Tuesday, May 16, 2006 10:10 PM
To: Matt Callow
Cc: linux-omap-open-source@linux.omap.com
Subject: RE: Userspace GPIO

> Since the GPIO lines are mapped into the ARM memory space, you can use
a
> program like devmem2 to access the memory locations directly. Maybe
not
> the most elegant solution but I've used the program successfully on an
> OMAP board. Try searching for devmem2.c in google.

I wouldn't recommend that.  32 GPIOs are controlled per register.  A
direct user space write with out any locking could destroy the state of
a gpio owned by someone else.  If someone really wanted to use it, then
some proxy between (/proc/sys/syscall) to the real kernel API should be
created.  It might be fun to have some notification method if the GPIO
were configured as an interrupt source.

Regards,
Richard W.
_______________________________________________
Linux-omap-open-source mailing list
Linux-omap-open-source@linux.omap.com
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: Userspace GPIO
@ 2006-05-18  4:08 Marco Candiago
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Candiago @ 2006-05-18  4:08 UTC (permalink / raw)
  To: linux-omap-open-source


Thanks fellas,

I will investigate these options

Cheers,

Marco

-----Original Message-----
From: Juha Yrjölä [mailto:juha.yrjola@nokia.com]
Sent: Wednesday, May 17, 2006 7:49 PM
To: balrogg@gmail.com
Cc: Marco Candiago; linux-omap-open-source@linux.omap.com
Subject: Re: Userspace GPIO

andrzej zaborowski wrote:

> You could create it by modifying one of the drivers already present in
> the tree, I know the Intel PXA hackers have one of these and use it as
> a keypad driver because each key is associated with one GPIO line on
> their boards.

Or you could GPIO switch framework (arch/arm/plat-omap/gpio-switch.c),
which interfaces to user-space using sysfs.  It will need a small amount
of work to operate properly with the platform_data mechanism, though.

Cheers,
Juha


--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: Userspace GPIO
@ 2006-05-16 12:09 Woodruff, Richard
  0 siblings, 0 replies; 7+ messages in thread
From: Woodruff, Richard @ 2006-05-16 12:09 UTC (permalink / raw)
  To: Matt Callow; +Cc: linux-omap-open-source

> Since the GPIO lines are mapped into the ARM memory space, you can use
a
> program like devmem2 to access the memory locations directly. Maybe
not
> the most elegant solution but I've used the program successfully on an
> OMAP board. Try searching for devmem2.c in google.

I wouldn't recommend that.  32 GPIOs are controlled per register.  A
direct user space write with out any locking could destroy the state of
a gpio owned by someone else.  If someone really wanted to use it, then
some proxy between (/proc/sys/syscall) to the real kernel API should be
created.  It might be fun to have some notification method if the GPIO
were configured as an interrupt source.

Regards,
Richard W.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Userspace GPIO
@ 2006-05-16  7:46 Marco Candiago
  2006-05-16  9:08 ` Matt Callow
  0 siblings, 1 reply; 7+ messages in thread
From: Marco Candiago @ 2006-05-16  7:46 UTC (permalink / raw)
  To: linux-omap-open-source


Hello,

We are developing with the Innovator 1510 2.6.12-rc2-omap1 kernel
version.

Going through the archives I see that a similar type of question has
been a
Asked regarding accessing the GPIO lines via user-space; the answer
being just a link to the mailing list archives.

With this kernel is there a convenient method of toggling the GPIO lines
without having to resort to kernel space programming. With some other
hardware I have seen using Linux, it is possible to access the GPIO
lines via a /proc entry, however, I don't see that here.

I apologize if this question is obtuse, but any help would be greatly
Appreciated.

Thanks,

Marco 

--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-18  4:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-17  4:09 Userspace GPIO Marco Candiago
2006-05-17  8:56 ` andrzej zaborowski
2006-05-17  9:49   ` Juha Yrjölä
  -- strict thread matches above, loose matches on Subject: below --
2006-05-18  4:08 Marco Candiago
2006-05-16 12:09 Woodruff, Richard
2006-05-16  7:46 Marco Candiago
2006-05-16  9:08 ` Matt Callow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox