From: NeilBrown Date: Sun, 22 Apr 2012 05:48:58 +0000 (+1000) Subject: Add udev rules for GTA04. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=4e8d54721a32f27e0f8750daf9be1d1e8a0dfada;p=plato.git Add udev rules for GTA04. - stable names for Option 3G tty devices - stable names for input devices - current setting for different usb cables. Signed-off-by: NeilBrown --- diff --git a/config/udev-rules/hso.rules b/config/udev-rules/hso.rules new file mode 100644 index 0000000..214a622 --- /dev/null +++ b/config/udev-rules/hso.rules @@ -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 index 0000000..73f67ba --- /dev/null +++ b/config/udev-rules/input.rules @@ -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 index 0000000..d736b87 --- /dev/null +++ b/config/udev-rules/usb.rules @@ -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"