Skip to content

Commit 060930a

Browse files
committed
Add udev rules
1 parent b907295 commit 060930a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

60-cros_ec_python.rules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CrOS_EC_Python udev rules
2+
3+
# LPC Access
4+
KERNEL=="port", TAG+="uaccess"
5+
6+
# /dev/cros_ec Access
7+
KERNEL=="cros_ec", TAG+="uaccess"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ pip install cros-ec-python[lpc]
2424
### Permissions
2525
Since we're playing around with actual hardware, we're going to need some pretty high permissions.
2626

27+
The recommended way is to copy [`60-cros_ec_python.rules`](60-cros_ec_python.rules) to `/etc/udev/rules.d/` and run:
28+
29+
```bash
30+
sudo udevadm control --reload-rules
31+
sudo udevadm trigger
32+
```
33+
34+
This will give the current user access to both `/dev/cros_ec` for the Linux Device interface, and the IO ports for the LPC interface.
35+
2736
#### Linux Device Interface
2837
This library requires write permission to `/dev/cros_ec` when using the Linux Device interface,
2938
which is usually only accessible by root. You can either run your script as root, add a udev rule,

0 commit comments

Comments
 (0)