From: Brandon I <[email protected]> Reply-To: <[email protected]> Date: Friday, March 7, 2014 at 3:22 PM To: beagleboard <[email protected]> Subject: Re: [beagleboard] Re: Writing 8-bit data to GPIO pins - does one have to do it a bit at a time?
>> > When you use user space drivers, you no longer have that protection. > > Since this is so off topic I'll just say, anyone interested about this topic, > there is plenty of tutorials and articles about sane user space device > drivers, along with production quality open source drivers. The acceptance of > the concept is somewhat new, and there are many misconceptions. Reading the article you sighted, there are several issues with UIO, namely no interrupt handling, no resource management, no memory management, etc. For example, you have to use a Kernel mode interrupt handler and then your user space UIO driver has to read and block until an interrupt occurs. After the interrupt occurs, the scheduler has to schedule your UIO driver to run before your driver can respond to the interrupt. That is going to be very slow compared to a kernel driver interrupt handler. The application on the user side has to take care of memory and resource management rather than relying on the core driver components already available in the kernel. I¹m not saying that UIO isn¹t a good idea. Understand the benefits and limitations of UIO before pursuing this direction. Regards, John > > > On Fri, Mar 7, 2014 at 2:02 PM, John Syn <[email protected]> wrote: >> >> From: Brandon I <[email protected]> >> Reply-To: <[email protected]> >> Date: Friday, March 7, 2014 at 1:27 PM >> To: <[email protected]> >> Cc: <[email protected]> >> Subject: [beagleboard] Re: Writing 8-bit data to GPIO pins - does one have >> to do it a bit at a time? >> >>>> user space should not know how you talk to it physically >>> >>> I don't think this is generally accepted, otherwise user space device >>> drivers wouldn't exist: >>> http://www.embedded.com/design/operating-systems/4401769/Device-drivers-in-u >>> ser-space >>> >>> With user space device drivers, you're free to push as little or as much >>> into the kernel as you like. >> The normal practice is that a badly behaving user space application should >> not kill your complete system. Only the user space app should die. When you >> use user space drivers, you no longer have that protection. User space >> drivers are generally not a good idea unless you want to avoid the >> user/kernel switching delays. >> >> Regards, >> John >>> >>> -Brandon >>> >>> On Thursday, March 6, 2014 12:06:43 PM UTC-8, robert.berger wrote: >>>> Hi, >>>> >>>> On Thursday, March 6, 2014 11:25:14 AM UTC+2, [email protected] wrote: >>>>> All the examples and libraries (Python mostly) that I can find for >>>>> doing IO to the GPIO pins seem to handle only a bit at a time. This >>>>> is fine for things like driving relays and LEDs but makes little sense >>>>> for 8-bit data. >>>>> >>>> >>>> Taking your example. If we are talking about a device you want to connect >>>> to your beagle user space should not know how you talk to it physically and >>>> whether it's 8-bit data or i2c or something else underneath. Having said >>>> that there was/is some attempt to do what you want in kernel space [1] and >>>> it's called block GPIO [2] but I don't think it made it into mainline. >>>> >>>> Regards, >>>> >>>> Robert >>>> >>>> [1] http://lwn.net/Articles/533632/ <http://lwn.net/Articles/533632/> >>>> [2] http://lwn.net/Articles/533557/ <http://lwn.net/Articles/533557/> >>> >>> -- >>> For more options, visit http://beagleboard.org/discuss >>> --- >>> You received this message because you are subscribed to the Google Groups >>> "BeagleBoard" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> >>> For more options, visit https://groups.google.com/d/optout. >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to a topic in the Google >> Groups "BeagleBoard" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/beagleboard/91ikp6Mxi0s/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
