Advertisement
Guest User

uio_pdrv_genirq example

a guest
Sep 22nd, 2015
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # put in /etc/modprobe.d/uio.conf
  2. #
  3. # make driver match on compatible = "uio";
  4. options uio_pdrv_genirq of_id=uio
  5.  
  6.  
  7. # put in /etc/udev/rules.d/uio.rules
  8. #
  9. # create named symlink to locate the device easily
  10. # (assumes your kernel is new enough to have of_node symlinks in sysfs)
  11. SUBSYSTEM=="uio", SYMLINK+="uio/%s{device/of_node/uio-alias}"
  12. #
  13. # give some group access rights (adjust as needed)
  14. SUBSYSTEM=="uio", GROUP="users", MODE="0660"
  15.  
  16.  
  17. # example device tree node to give userspace direct access to ADC
  18. &tscadc {
  19. status = "okay";
  20. compatible = "uio";
  21. uio-alias = "adc";
  22. };
  23.  
  24.  
  25. # device will appear as /dev/uio/adc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement