Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # put in /etc/modprobe.d/uio.conf
- #
- # make driver match on compatible = "uio";
- options uio_pdrv_genirq of_id=uio
- # put in /etc/udev/rules.d/uio.rules
- #
- # create named symlink to locate the device easily
- # (assumes your kernel is new enough to have of_node symlinks in sysfs)
- SUBSYSTEM=="uio", SYMLINK+="uio/%s{device/of_node/uio-alias}"
- #
- # give some group access rights (adjust as needed)
- SUBSYSTEM=="uio", GROUP="users", MODE="0660"
- # example device tree node to give userspace direct access to ADC
- &tscadc {
- status = "okay";
- compatible = "uio";
- uio-alias = "adc";
- };
- # device will appear as /dev/uio/adc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement