]> git.neil.brown.name Git - plato.git/commitdiff
Add udev rules for GTA04.
authorNeilBrown <neilb@suse.de>
Sun, 22 Apr 2012 05:48:58 +0000 (15:48 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 22 Apr 2012 05:48:58 +0000 (15:48 +1000)
- stable names for Option 3G tty devices
- stable names for input devices
- current setting for different usb cables.

Signed-off-by: NeilBrown <neilb@suse.de>
config/udev-rules/hso.rules [new file with mode: 0644]
config/udev-rules/input.rules [new file with mode: 0644]
config/udev-rules/usb.rules [new file with mode: 0644]

diff --git a/config/udev-rules/hso.rules b/config/udev-rules/hso.rules
new file mode 100644 (file)
index 0000000..214a622
--- /dev/null
@@ -0,0 +1,3 @@
+# Give stable names to the various tty devices from the Option 3G module.
+
+SUBSYSTEM=="tty", KERNEL=="ttyHS*", ATTR{hsotype}=="?*", ATTRS{busnum}=="?*", SYMLINK+="ttyHS_$attr{hsotype}", OPTIONS+="string_escape=replace"
diff --git a/config/udev-rules/input.rules b/config/udev-rules/input.rules
new file mode 100644 (file)
index 0000000..73f67ba
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Give stable names to the various input devices on the GTA04
+
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0,15,*f50,51*", SYMLINK="input/rumble"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0,3,*a0,1,2,*", SYMLINK+="input/accel"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0,1,*k74,*", SYMLINK+="input/power"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0,1,*kA9,*", SYMLINK+="input/aux"
diff --git a/config/udev-rules/usb.rules b/config/udev-rules/usb.rules
new file mode 100644 (file)
index 0000000..d736b87
--- /dev/null
@@ -0,0 +1,8 @@
+
+# set the current draw for the usb port depending on cable type:
+# normal usb Cable (ID not connected) 500mA
+# Openmoko Charger (id pin had 47Kohm resistance) 851mA (max currently
+# supported by kernel).
+
+SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="floating", ATTR{../../max_current}="500000"
+SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="102k", ATTR{../../max_current}="851000"