blob: b21ff04dd14bb3718bb0d4eb1f97f3651364f691 [file] [log] [blame]
#!/bin/sh
#
# bluetooth
#
# PCMCIA Bluetooth device initialization
# Written by Maxim Krasnyanskiy <maxk@qualcomm.com>
#
# This script requires new cardmgr and expects following
# environment variables FUNCTION, VENDORID, CARDNAME
#
#
# $Id$
#
if [ -r ./shared ]; then . ./shared ; else . /etc/pcmcia/shared ; fi
# Get device attributes
get_info $DEVICE
#
# Serial devices
#
start_serial() {
/sbin/hciattach $DEVICE $VENDORID
}
stop_serial() {
return
}
suspend_serial() {
do_fuser -k -HUP /dev/$DEVICE > /dev/null
}
resume_serial() {
start_serial
}
start=
stop=
suspend=
resume=
check=
cksum=
case "$FUNCTION" in
2) # Serial
if ! echo $CARDNAME | grep -i 'bluetooth' > /dev/null 2>&1; then
exit
fi
start=start_serial
stop=stop_serial
suspend=suspend_serial
resume=resume_serial
;;
esac
eval \$$ACTION
exit 0