On 2 November 2015 at 06:22, William Hermans <[email protected]> wrote:
> *Correct, pretty much anything can be used from userspace like that, >> although some people will frown at you for bypassing the kernel if you do.* >> > > So maybe to you, and others this seems like an argument. > No, I said *some people*. :-) I personally much prefer to directly access peripherals than go through thick layers of overhead to ultimately accomplish exactly the same time. I even setup DMA transfers from userspace ;-) > Actually, my ideal "elegant" way to use the registers for peripherals. > Would be by using the PRU's through remoteproc / rpmsg. > Why? Using PRUs to access peripherals makes no sense to me either, unless you need *really* tight timing. > It seems as though I should read up on *uio_pdrv_genirq *though*. *Granted, > "IRQ" to me spells "trouble". As when using hardware like this, as such. > An uio device in general behaves like a chunk of /dev/mem, corresponding to the register range declared in DT. It's a little safer than /dev/mem since the device only gives access to that predeclared range, and as I mentioned you get benefits like being able to have the kernel automatically enable the module in PRCM when you open the device (and disable it again after closing it). The "genirq" is in the name because it also includes a generic way to receive IRQs if you wish to: you should declare the interrupt in DT, after opening the device you write (u32)1 to it to enable interrupts and read(u32) from it to wait for an interrupt, or you can use poll() or any other event loop. At most one IRQ is supported per device, but you can just declare extra uio devices in DT consisting of just an IRQ (no regs) if you need them. IRQ latency test on an RT kernel, with a userspace process waiting for a GPIO-triggered IRQ and pulsing another GPIO in response. Not great but good enough for many purposes: > The uio driver for the ADC > No such thing exists. Are you confusing uio with iio? I never really explored iio in much detail, using direct userspace access was more convenient. Was hoping to "spot" some uio buffer layout goodness :) I have absolutely no idea what you could mean by that. -- 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.
