usb-hub/gnss-init: handle potential enabling within bootloader
The bootloader might already release the usb-hub, the v2x module and the gnss modem from reset. Thus the usb-hub and the gnss modem are put into reset first so that a proper enumeration would be possible. BugzID: 72787 Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
09903e21fc
commit
c2eabcb4e9
|
|
@ -83,4 +83,7 @@ if [[ "$?" != "0" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# add a sleep to settle a potential off and on switching
|
||||
sleep 0.5
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ Before=gpsd.service
|
|||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
ExecStartPre=/usr/bin/usb-hub-reset on
|
||||
ExecStart=/usr/bin/echo releasing usb hub from reset
|
||||
ExecStop=/usr/bin/echo set usb hub into reset state
|
||||
ExecStartPre=/usr/bin/usb-hub-reset off
|
||||
ExecStart=/usr/bin/echo releasing usb hub from reset...
|
||||
ExecStartPost=/usr/bin/usb-hub-reset on
|
||||
ExecStop=/usr/bin/echo set usb hub into reset state...
|
||||
ExecStopPost=/usr/bin/usb-hub-reset off
|
||||
|
||||
RemainAfterExit=yes
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ After=usb-hub-reset.service v2x-ieee802.11p.service
|
|||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
ExecStartPre=/bin/sh -c "echo 0 > /sys/class/leds/gnss_rst/brightness"
|
||||
ExecStart=/usr/bin/echo start
|
||||
ExecStop=/usr/bin/echo stop
|
||||
ExecStartPre=/bin/sh -c "echo 255 > /sys/class/leds/gnss_rst/brightness && sleep 1"
|
||||
ExecStart=/usr/bin/echo releasing gnss modem from reset...
|
||||
ExecStartPost=/bin/sh -c "echo 0 > /sys/class/leds/gnss_rst/brightness"
|
||||
ExecStop=/usr/bin/echo setting gnss modem into reset...
|
||||
ExecStopPost=/bin/sh -c "echo 255 > /sys/class/leds/gnss_rst/brightness"
|
||||
|
||||
RemainAfterExit=yes
|
||||
|
|
|
|||
Loading…
Reference in New Issue