I have written my gpio driver and register it with the system using udev. This created all my device files but the permission they are created is 600. how can I change this default permission to 666 or any other. Since I have to run my program reading this file using sudo.
Should i write any rules in udev.. please explain. Or should i change operating permission of my program within my program itself to root.
Update: my udev rules.d contains
40-scratch.rules
:
ATTRS{idVendor}=="0694", ATTRS{idProduct}=="0003", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
and 99-input.rules
:
SUBSYSTEM=="input", GROUP="input", MODE="0660"
and udev.conf
:
udev_log="err"