Open mweal-ed opened 10 years ago
Sorry about making you fix the formatting. I am new to github and am still learning some of the features.
Sorry, the smart ass in me couldn't help it. And honestly, it's a pain, especially when editing the README.md. I this website to help me with that since I don't like the idea of committing and pushing just to find out if it formats correctly!
I'm using the following on CentOS 7.2, because I like having deterministic spidev numbers, and because I needed to use $kernel
instead of $id
from above. It sets the bus to 2210
and the chipselect to the symbol number. Ex: GP5
is exposed at /dev/spidev2210.5
.
SUBSYSTEM=="usb", ATTR{idVendor}=="04d8", ATTR{idProduct}=="00de", RUN="/usr/bin/sh -c '/usr/bin/echo -n $kernel:1.0 > $sys/bus/usb/drivers/usbhid/unbind; /usr/bin/echo -n $kernel:1.0 > $sys/bus/usb/drivers/mcp2210/bind'"
SUBSYSTEM=="spidev", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00de", PROGRAM="/usr/bin/sh -c '/usr/bin/echo %k | /usr/bin/cut -f 2 -d .'" SYMLINK="spidev2210.%c"
Oh cool! Thanks!
Per your note in the readme file. I use the following for a udev rule and it seems to work for me on ubuntu 14.04 x86_64
Edited 6-21-14 by Daniel Santos: formatting