summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2015-05-22 16:43:52 -0700
committerThierry Strudel <tstrudel@google.com>2015-05-26 17:06:49 -0700
commit98b0cf52a3c76ef1aefef3225fcb5c597ad6e030 (patch)
treef8d6035a51a20d82db95f966f95926691db96d01
parenteb09cf53b220462206b34bfca4b0fc5930f86888 (diff)
downloadbullhead-98b0cf52a3c76ef1aefef3225fcb5c597ad6e030.tar.gz
sensorhub init: use ueventd to set gpios perms
Bug: 21399322 Change-Id: I34c9aab2b1d2ebea295958f2a1bc13e93e63b5e4 Signed-off-by: Thierry Strudel <tstrudel@google.com>
-rw-r--r--init.bullhead.sensorhub.rc17
-rw-r--r--ueventd.bullhead.rc8
2 files changed, 9 insertions, 16 deletions
diff --git a/init.bullhead.sensorhub.rc b/init.bullhead.sensorhub.rc
index a96c462..78737ff 100644
--- a/init.bullhead.sensorhub.rc
+++ b/init.bullhead.sensorhub.rc
@@ -1,21 +1,6 @@
on post-fs
- write /sys/class/gpio/export 59
- write /sys/class/gpio/export 60
- write /sys/class/gpio/export 65
- write /sys/class/gpio/export 66
- chown system system /sys/class/gpio/gpio59
- chown system system /sys/class/gpio/gpio59/value
- chown system system /sys/class/gpio/gpio59/direction
- chown system system /sys/class/gpio/gpio60
- chown system system /sys/class/gpio/gpio60/value
- chown system system /sys/class/gpio/gpio60/direction
- chown system system /sys/class/gpio/gpio65
- chown system system /sys/class/gpio/gpio65/value
- chown system system /sys/class/gpio/gpio65/direction
- chown system system /sys/class/gpio/gpio66
- chown system system /sys/class/gpio/gpio66/value
- chown system system /sys/class/gpio/gpio66/direction
+ chown system system /sys/class/gpio/export
## set gpio75 as input to power the hall sensor when connected to AP
write /sys/class/gpio/export 75
write /sys/class/gpio/gpio75/direction in
diff --git a/ueventd.bullhead.rc b/ueventd.bullhead.rc
index 39dc7e6..8704a51 100644
--- a/ueventd.bullhead.rc
+++ b/ueventd.bullhead.rc
@@ -77,3 +77,11 @@
/dev/block/platform/soc.0/f9824900.sdhci/by-name/persistent 0600 system system
# sensor HUB
/dev/spidev7.0 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio59 value 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio59 direction 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio60 value 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio60 direction 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio65 value 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio65 direction 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio66 value 0640 system system
+/sys/devices/soc.0/fd510000.pinctrl/gpio/gpio66 direction 0640 system system