[systemd-devel] [SOLVED] Re: udev rule for GPIO "chip"

2016-12-17 Thread Ian Pilcher

On 12/17/2016 10:59 AM, Ian Pilcher wrote:

I am trying to write a udev rule that will match a GPIO "chip" (not
a particular GPIO).

The device in question is:

 # udevadm info -q all -p
/sys/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195
 P: /devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195
 E:
DEVPATH=/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195
 E: SUBSYSTEM=gpio

I am trying (unsuccessfully) to match it with this rule:

 ACTION=="add",
DEVPATH=="/sys/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195",RUN+="/usr/sbin/modprobe
n5550_board"


Aargh!  I needed to remove the leading "/sys" from the path.

--

Ian Pilcher arequip...@gmail.com
 "I grew up before Mark Zuckerberg invented friendship" 


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] udev rule for GPIO "chip"

2016-12-17 Thread Ian Pilcher

I am trying to write a udev rule that will match a GPIO "chip" (not
a particular GPIO).

The device in question is:

 # udevadm info -q all -p 
/sys/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195

 P: /devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195
 E: 
DEVPATH=/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195

 E: SUBSYSTEM=gpio

I am trying (unsuccessfully) to match it with this rule:

 ACTION=="add", 
DEVPATH=="/sys/devices/pci:00/:00:1f.0/gpio_ich.1.auto/gpio/gpiochip195",RUN+="/usr/sbin/modprobe 
n5550_board"


When I load the gpio_ich module, I get this:

 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: Validate module index
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: Check if link 
configuration needs reloading.
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2749 queued, 
'add' 'module'
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2749 forked 
new worker [2218]

 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2218]: seq 2749 running
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2750 queued, 
'add' 'gpio'
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2750 forked 
new worker [2219]
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2218]: no db file to 
read /run/udev/data/+module:gpio_ich: No such file or directory
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2751 queued, 
'add' 'drivers'
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[616]: seq 2751 forked 
new worker [2220]
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2218]: passed unknown 
number of bytes to netlink monitor 0x7fabfce76f00
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2218]: seq 2749 
processed with 0

 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2219]: seq 2750 running
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2220]: seq 2751 running
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2219]: no db file to 
read /run/udev/data/+gpio:gpiochip195: No such file or directory
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2220]: no db file to 
read /run/udev/data/+drivers:gpio_ich: No such file or directory
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2219]: no db file to 
read /run/udev/data/+platform:gpio_ich.1.auto: No such file or directory
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2219]: passed unknown 
number of bytes to netlink monitor 0x7fabfce8a5c0
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2219]: seq 2750 
processed with 0
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2220]: no db file to 
read /run/udev/data/+subsystem:drivers: No such file or directory
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2220]: passed unknown 
number of bytes to netlink monitor 0x7fabfce8a9e0
 Dec 17 10:43:27 n5550.penurio.us systemd-udevd[2220]: seq 2751 
processed with 0

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: cleanup idle workers
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: Validate module index
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2218]: Unload module index
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: Check if link 
configuration needs reloading.

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2220]: Unload module index
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2218]: Unloaded link 
configuration context.

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2219]: Unload module index
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2220]: Unloaded link 
configuration context.
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[2219]: Unloaded link 
configuration context.

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2218] exit
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2218] 
cleaned up

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2219] exit
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2219] 
cleaned up

 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2220] exit
 Dec 17 10:43:30 n5550.penurio.us systemd-udevd[616]: worker [2220] 
cleaned up


(I have also tried
DEVPATH=="/sys/devices/pci:00/:00:1f.0/gpio_ich.1.auto" with the
same lack of success.)

What am I doing wrong?

--

Ian Pilcher arequip...@gmail.com
 "I grew up before Mark Zuckerberg invented friendship" 


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel