From 8fe730c3b768f5f875e3fff5ba8a0bc5e8cbeb9f Mon Sep 17 00:00:00 2001 From: Dmitry Perchanov Date: Wed, 22 Nov 2023 13:44:07 +0200 Subject: [PATCH] udev: fix warnings reported by udevadm verify Fixing udev rule for iio power off on boot. Followed by #11842 Signed-off-by: Dmitry Perchanov --- config/99-realsense-d4xx-mipi-dfu.rules | 2 +- config/99-realsense-libusb.rules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/99-realsense-d4xx-mipi-dfu.rules b/config/99-realsense-d4xx-mipi-dfu.rules index 8a66ccfe44..ac06cd15b4 100644 --- a/config/99-realsense-d4xx-mipi-dfu.rules +++ b/config/99-realsense-d4xx-mipi-dfu.rules @@ -1,6 +1,6 @@ # Device rules for Intel RealSense MIPI devices. # DFU rules -SUBSYSTEM=="d4xx-class",KERNEL=="d4xx-dfu*", GROUP="video", MODE="0660" +SUBSYSTEM=="d4xx-class", KERNEL=="d4xx-dfu*", GROUP="video", MODE="0660" # video links for SDK, binding for ipu6 SUBSYSTEM=="video4linux", ATTR{name}=="DS5 mux *", RUN+="/bin/bash -c 'rs_ipu6_d457_bind.sh > /dev/kmsg; rs-enum.sh -q > /dev/kmsg'" diff --git a/config/99-realsense-libusb.rules b/config/99-realsense-libusb.rules index 4da4b0c3c4..d57682d843 100644 --- a/config/99-realsense-libusb.rules +++ b/config/99-realsense-libusb.rules @@ -87,4 +87,4 @@ KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", MODE:="0777", DRIVER=="hid_sensor*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0b6b", RUN+="/bin/sh -c ' chmod -R 0777 /sys/%p && chmod 0777 /dev/%k'" # For products with motion_module, if (kernels is 4.15 and up) and (device name is "accel_3d") wait, in another process, until (enable flag is set to 1 or 200 mSec passed) and then set it to 0. -KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5|0afe|0aff|0b00|0b01|0b3a|0b3d|0b56|0b5c|0b64|0b68|0b6a|0b6b", RUN+="/bin/sh -c '(major=`uname -r | cut -d \".\" -f1` && minor=`uname -r | cut -d \".\" -f2` && (([ $major -eq 4 ] && [ $minor -ge 15 ]) || [ $major -ge 5 ])) && (enamefile=/sys/%p/name && [ `cat $enamefile` = \"accel_3d\" ]) && enfile=/sys/%p/buffer/enable && echo \"COUNTER=0; while [ \$COUNTER -lt 20 ] && grep -q 0 $enfile; do sleep 0.01; COUNTER=\$((COUNTER+1)); done && echo 0 > $enfile\" | at now'" +KERNEL=="iio*", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0ad5|0afe|0aff|0b00|0b01|0b3a|0b3d|0b56|0b5c|0b64|0b68|0b6a|0b6b", RUN+="/bin/sh -c '(major=`uname -r | cut -d \".\" -f1` && minor=`uname -r | cut -d \".\" -f2` && (([ $$major -eq 4 ] && [ $$minor -ge 15 ]) || [ $$major -ge 5 ])) && (enamefile=/sys/%p/name && [ `cat $$enamefile` = \"accel_3d\" ]) && enfile=/sys/%p/buffer/enable && echo \"COUNTER=0; while [ \$$COUNTER -lt 20 ] && grep -q 0 $$enfile; do sleep 0.01; COUNTER=\$$((COUNTER+1)); done && echo 0 > $$enfile\" | at now'"