9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Krystian Lewandowski <krystian.lew@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] "gpio device" for Plan 9
Date: Tue, 31 Dec 2013 23:57:31 +0100	[thread overview]
Message-ID: <54A95F7A-CCA3-42EA-AAFD-08C9B01E9F10@gmail.com> (raw)
In-Reply-To: <c780bc5ae163e88c7ec79732b3cd28a6@mikro>


Wiadomość napisana przez erik quanstrom <quanstro@quanstro.net> w dniu 31 gru 2013, o godz. 20:50:

> On Tue Dec 31 14:40:29 EST 2013, edgecomberts@gmail.com wrote:
> 
>> Erik,
>> 
>> Just for the purposes of edification (and curiosity), are you able to
>> elaborate on "long reads"? Its understandable such a scheme would be
>> implemented in the network drivers, but how exactly does it work, as
>> opposed to a polling scheme or an ISR? I will, of course, Google in a sec
>> as well.
> 
> it could be that i misunderstood the op's point.  what i understood from the
> original post was a scheme was envisioned where a user process would poll a
> status file to get interrupt status.  if i understood this correctly, then providing
> an interrupt file that returns even 0 bytes when there's an interrupt would be
> an alternative providing interrupt semantics to the up.  there are some 
> bits to work out if the user process falls behind, but it's no different than a
> network device.
> 
> does that answer your question?
> 
> - erik
> 

I’ll answer at the bottom, to not make even more mess i did before. :)

I’m not even sure what is my point of view. For ISR i was thinking about an interrupt routine writing something (a single byte) to a file when an interrupt occurs - writing using functions defined in qio - something similar to /dev/kprint - reading user process is waiting for new data if i understood the behavior correctly. It is not clear to me how this „0 bytes” method:
> providing
> an interrupt file that returns even 0 bytes when there's an interrupt would be
> an alternative providing interrupt semantics to the up
could be implemented and how ioproc is related (how ioread can be woken up with 0 bytes returned). But now, my mind isn’t quite clear now.

As i said i don’t know much about BCM, Plan 9 and the whole thing and basic GPIO implementation seemed to be a good entry point. Now i’m trying to figure out how it can be extended in the future, regarding your feedback. But if you think it is worth to extend this thread with new information then that would be great.

Thanks for this discussion!
Krystian


  parent reply	other threads:[~2013-12-31 22:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-29 22:04 Krystian Lewandowski
2013-12-29 22:34 ` erik quanstrom
2013-12-30  7:32 ` Skip Tavakkolian
2013-12-30 22:38   ` Shane Morris
     [not found] ` <35A33F66-EF03-4659-ABA1-F25082DBFE41@gmail.com>
2013-12-31 17:46   ` Krystian Lewandowski
2013-12-31 19:18     ` erik quanstrom
2013-12-31 19:37       ` Shane Morris
2013-12-31 19:48         ` Skip Tavakkolian
2013-12-31 19:50         ` erik quanstrom
2013-12-31 20:45           ` Shane Morris
2013-12-31 22:03             ` erik quanstrom
2013-12-31 22:17               ` Shane Morris
2013-12-31 22:52                 ` erik quanstrom
2013-12-31 22:57           ` Krystian Lewandowski [this message]
2013-12-31 23:16             ` Shane Morris
2013-12-31 23:35               ` Shane Morris
2014-01-01  0:04               ` Krystian Lewandowski
2014-01-01  0:12                 ` Shane Morris
2014-01-01  1:12     ` Matthew Veety
2014-01-01 11:38     ` Richard Miller
2014-01-01 22:16     ` erik quanstrom
2014-02-28 23:30       ` Krystian Lewandowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54A95F7A-CCA3-42EA-AAFD-08C9B01E9F10@gmail.com \
    --to=krystian.lew@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).