blob: 1b2e577c60dc9abeb58538bdfa120b0ead3daefc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/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
#
if [ -r ./shared ]; then . ./shared ; else . /etc/pcmcia/shared ; fi
# Get device attributes
get_info $DEVICE
#
# Serial devices
#
start_serial() {
IRQ=`setserial /dev/$DEVICE | sed -e 's/.*IRQ: //'`
setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ
/usr/sbin/hciattach $DEVICE $MANFID
}
stop_serial() {
do_fuser -k -HUP /dev/$DEVICE > /dev/null
}
suspend_serial() {
stop_serial
}
resume_serial() {
start_serial
}
start=
stop=
suspend=
resume=
check=
cksum=
case "$FUNCID" in
2) # Serial
start=start_serial
stop=stop_serial
suspend=suspend_serial
resume=resume_serial
;;
esac
eval \$$ACTION
exit 0
|