aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--GTA04/udev-rules/charging.rules6
-rw-r--r--GTA04/udev-rules/sensor.rules3
2 files changed, 9 insertions, 0 deletions
diff --git a/GTA04/udev-rules/charging.rules b/GTA04/udev-rules/charging.rules
new file mode 100644
index 0000000..b9ebed8
--- /dev/null
+++ b/GTA04/udev-rules/charging.rules
@@ -0,0 +1,6 @@
+# 500 mA charger
+SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="floating", ATTR{../../max_current}="500000"
+# 1A charger
+SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="102k", ATTR{../../max_current}="851000"
+# 2A charger
+SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="GND", ATTR{../../max_current}="851000"
diff --git a/GTA04/udev-rules/sensor.rules b/GTA04/udev-rules/sensor.rules
new file mode 100644
index 0000000..e391bda
--- /dev/null
+++ b/GTA04/udev-rules/sensor.rules
@@ -0,0 +1,3 @@
+# see http://www.reactivated.net/writing_udev_rules.html#sysfsmatch
+SUBSYSTEM=="iio", KERNEL=="iio:device[0-9]*", ATTRS{name}=="itg3200", SYMLINK="iio:gyroscope"
+SUBSYSTEM=="iio", KERNEL=="iio:device[0-9]*", ATTRS{name}=="hmc5843", SYMLINK="iio:magnetometer"