xref: /OK3568_Linux_fs/device/rockchip/common/images/oem/oem_uvcc/RkLunch-suspend.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyunkillall -9 aicamera.sh
4*4882a593Smuzhiyunkillall smart_display_service
5*4882a593Smuzhiyunifconfig usb0 down
6*4882a593Smuzhiyunkillall dbserver
7*4882a593Smuzhiyunkillall aiserver
8*4882a593Smuzhiyun#sleep for aiserver deint over
9*4882a593Smuzhiyunsleep .6
10*4882a593Smuzhiyunkillall uvc_app
11*4882a593Smuzhiyunkillall ispserver
12*4882a593Smuzhiyunkillall uac_app
13*4882a593Smuzhiyunsleep .1
14*4882a593Smuzhiyunwhile [[ true ]]; do
15*4882a593Smuzhiyun	PID=`busybox ps |grep uvc_app |grep -v grep | wc -l`
16*4882a593Smuzhiyun	if [ $PID -le 0 ]; then
17*4882a593Smuzhiyun		echo "uvc_app die, wake..."
18*4882a593Smuzhiyun		echo none > /sys/kernel/config/usb_gadget/rockchip/UDC
19*4882a593Smuzhiyun		rmdir /sys/kernel/config/usb_gadget/rockchip/functions/rndis.gs0
20*4882a593Smuzhiyun		break
21*4882a593Smuzhiyun	fi
22*4882a593Smuzhiyundone
23*4882a593Smuzhiyunkillall -9 aiserver
24*4882a593Smuzhiyunecho "All Stop Application to suspend now..."
25