Matthijs,

Where would be a good start to read up on uio ? I've been reading around,
but have not found anything of much use yet. Also, that pastebin you gave,
this is *everything* needed to use an uio adc ?

But for instance, assuming the pastebin you gave is everything needed(
which would be awesome ), how do I know how this adc uio "object" is set up
? e.g. how would i write a userspace driver for it ? I have so many
questions, but no idea where to start looking for answers . . .

On Tue, Nov 3, 2015 at 8:49 PM, Matthijs van Duin <[email protected]
> wrote:

> On 4 November 2015 at 03:40, Pierre-Louis Constant <[email protected]>
> wrote:
>
>> you guys provided me enough info leads for a whole year of insomnia.
>>
>
> haha, sorry :-)
>
>
>> 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.
>>
>>
>> Righteo, so far I was using the somewhat slow (but easy) way thyrough FS,
>> however I am stuck with running my program as root, as I can't access the
>> PWM (or hardware) as normal user. Using the mmap() method would be
>> permission free, would it ?
>>
>
> other way around: you can simply change owner/group/permissions in sysfs
> if you want to (although obviously it won't persist across reboots, hence
> would need to be done e.g. in an udev rule).
>
> /dev/mem however always requires root permissions to open. You can of
> course open it and then drop permissions (and close the descriptor after
> mmapping the regions you need). The same is true for other files and
> devices of course, including sysfs files.
>
> uio is the cleanest here: the pastebin I linked to actually included an
> example udev rule for setting group and permissions.
>
> sysfs files aren't devices hence you can't set their permissions in the
> same way but need to do something ugly like RUN="/bin/chmod ...". It's
> still wise to do it in an udev rule rather than a fixed startup script
> since it may run too early and the files may not exist yet.
>
> --
> 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.

Reply via email to