summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--Android.mk49
-rw-r--r--conf/asus/grouper/Android.mk14
-rw-r--r--conf/asus/grouper/bt_vendor.conf5
-rw-r--r--conf/meson/Android.mk14
-rw-r--r--conf/meson/bt_vendor.conf5
-rw-r--r--conf/moto/wingray/Android.mk14
-rw-r--r--conf/moto/wingray/bt_vendor.conf5
-rw-r--r--conf/samsung/crespo/Android.mk14
-rw-r--r--conf/samsung/crespo/bt_vendor.conf5
-rw-r--r--conf/samsung/crespo4g/Android.mk14
-rw-r--r--conf/samsung/crespo4g/bt_vendor.conf5
-rw-r--r--conf/samsung/maguro/Android.mk14
-rw-r--r--conf/samsung/maguro/bt_vendor.conf5
-rwxr-xr-xgen-buildcfg.sh25
-rwxr-xr-xinclude/bt_vendor_brcm.h103
-rw-r--r--[-rwxr-xr-x]include/vnd_40183_lpm.txt0
-rw-r--r--include/vnd_angler.txt17
-rw-r--r--include/vnd_anthias.txt10
-rw-r--r--include/vnd_bass.txt16
-rw-r--r--include/vnd_carp.txt14
-rw-r--r--include/vnd_crespo.txt8
-rw-r--r--include/vnd_crespo4g.txt8
-rw-r--r--include/vnd_dory.txt14
-rw-r--r--include/vnd_dragon.txt9
-rw-r--r--include/vnd_flounder.txt10
-rw-r--r--include/vnd_flounder64.txt10
-rw-r--r--include/vnd_flounder_lte.txt10
-rw-r--r--include/vnd_fugu.txt11
-rw-r--r--[-rwxr-xr-x]include/vnd_generic.txt1
-rw-r--r--[-rwxr-xr-x]include/vnd_generic_x86.txt1
-rw-r--r--include/vnd_grouper.txt10
-rw-r--r--include/vnd_hammerhead.txt15
-rw-r--r--include/vnd_lenok.txt16
-rw-r--r--include/vnd_maguro.txt8
-rw-r--r--include/vnd_mako.txt8
-rw-r--r--include/vnd_manta.txt10
-rw-r--r--[-rwxr-xr-x]include/vnd_meson6.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson6_lpm.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson8.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson8_lpm.txt0
-rw-r--r--include/vnd_nemo.txt16
-rw-r--r--include/vnd_phantasm.txt8
-rw-r--r--include/vnd_puffer.txt15
-rw-r--r--include/vnd_shamu.txt14
-rw-r--r--include/vnd_smelt.txt14
-rw-r--r--include/vnd_sparrow.txt10
-rw-r--r--include/vnd_sprat.txt21
-rw-r--r--include/vnd_stingray.txt8
-rw-r--r--include/vnd_sturgeon.txt14
-rw-r--r--include/vnd_tetra.txt15
-rw-r--r--include/vnd_tilapia.txt10
-rw-r--r--include/vnd_toro.txt9
-rw-r--r--include/vnd_tuna.txt9
-rw-r--r--include/vnd_wingray.txt8
-rw-r--r--include/vnd_wren.txt10
-rwxr-xr-xsrc/bt_vendor_brcm.c23
-rwxr-xr-xsrc/hardware.c543
-rwxr-xr-xsrc/upio.c93
-rwxr-xr-xsrc/userial_vendor.c29
-rwxr-xr-xvnd_buildcfg.mk4
60 files changed, 1223 insertions, 147 deletions
diff --git a/src/userial_vendor.c b/src/userial_vendor.c
index 09bf954..3ff518b 100755
--- a/src/userial_vendor.c
+++ b/src/userial_vendor.c
@@ -31,6 +31,7 @@
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
+#include <string.h>
#include "bt_vendor_brcm.h"
#include "userial.h"
#include "userial_vendor.h"
@@ -51,10 +52,6 @@
#define VND_PORT_NAME_MAXLEN 256
-#if (BT_WAKE_VIA_PROC == TRUE)
-#define TIOCSETBTPORT 0x5489
-#define TIOCCLRBTPORT 0x5490
-#endif
/******************************************************************************
** Local type definitions
******************************************************************************/
@@ -141,6 +138,19 @@ void userial_ioctl_init_bt_wake(int fd)
{
uint32_t bt_wake_state;
+#if (BT_WAKE_USERIAL_LDISC==TRUE)
+ int ldisc = N_BRCM_HCI; /* brcm sleep mode support line discipline */
+
+ /* attempt to load enable discipline driver */
+ if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0)
+ {
+ VNDUSERIALDBG("USERIAL_Open():fd %d, TIOCSETD failed: error %d for ldisc: %d",
+ fd, errno, ldisc);
+ }
+#endif
+
+
+
/* assert BT_WAKE through ioctl */
ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL);
ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, &bt_wake_state);
@@ -257,10 +267,6 @@ int userial_vendor_open(tUSERIAL_CFG *p_cfg)
#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE)
userial_ioctl_init_bt_wake(vnd_userial.fd);
#endif
-#if (BT_WAKE_VIA_PROC == TRUE)
- /* set bluesleep uart port */
- ioctl(vnd_userial.fd, TIOCSETBTPORT, NULL);
-#endif
ALOGI("device fd = %d open", vnd_userial.fd);
@@ -287,11 +293,10 @@ void userial_vendor_close(void)
/* de-assert bt_wake BEFORE closing port */
ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL);
#endif
-#if (BT_WAKE_VIA_PROC == TRUE)
- ioctl(vnd_userial.fd, TIOCCLRBTPORT, NULL);
-#endif
- ALOGI("device fd = %d close", vnd_userial.fd);
+ ALOGI("device fd = %d close", vnd_userial.fd);
+ // flush Tx before close to make sure no chars in buffer
+ tcflush(vnd_userial.fd, TCIOFLUSH);
if ((result = close(vnd_userial.fd)) < 0)
ALOGE( "close(fd:%d) FAILED result:%d", vnd_userial.fd, result);