All of lore.kernel.org
 help / color / mirror / Atom feed
* Building a software serial driver
@ 2014-06-23 18:15 Torrie Fischer
  2014-06-24  8:12 ` Pranay Srivastava
  0 siblings, 1 reply; 6+ messages in thread
From: Torrie Fischer @ 2014-06-23 18:15 UTC (permalink / raw)
  To: kernelnewbies

Greetings fellow newbies.

I'm toying around with a Raspberry PI and trying to create a driver that takes 
a single GPIO pin and turns it into a read-only TTY device because using the 
userspace GPIO sysfs API is too slow for me.

Here's my current code:

https://github.com/tdfischer/gpio_serial

It is based off of the tiny_serial example driver in the LDD3 repo:

https://github.com/martinezjavier/ldd3/blob/master/tty/tiny_serial.c

It builds and loads just fine, and even creates a /dev/ttyGPIO0 device. 
However, reading from it returns -EIO. Running strace on cat shows that it 
opens up the device successfully, but fails on the first call to read().

Any idea what I'm missing here? I'm fairly certain it is something obvious.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140623/f42481d0/attachment.bin 

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

end of thread, other threads:[~2014-06-25  5:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-23 18:15 Building a software serial driver Torrie Fischer
2014-06-24  8:12 ` Pranay Srivastava
2014-06-24 12:56   ` Torrie Fischer
2014-06-24 15:57     ` Pranay Srivastava
2014-06-24 18:19       ` Torrie Fischer
2014-06-25  5:56         ` Pranay Srivastava

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.