#!/bin/sh -e

start() {
    echo 3 > /sys/devices/platform/gpio-keys-polled.0/input/input1/poll
    ddgo-pnp-controller &
}

stop() {
    killall -q ddgo-pnp-controller
    echo 0 >"/sys/class/android_usb/android0/enable"
}

case "$1" in
start)
	start
;;
stop)
	stop
;;
restart)
	stop
	start
;;
*)
	echo "$0: Please use start, stop, or restart."
	exit 1
;;
esac
