From a9be3fd4ccbad02f696ba4cdcb2d92b006e6563b Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Thu, 10 May 2018 09:31:02 +0900 Subject: [PATCH] Add bt-driver-insmod.service trigger logic Change-Id: I0e4b4b994d7a0c74440d495c70d7f96ee914bb68 --- bt-core/bt-core-adapter.c | 8 ++++++++ bt-core/include/bt-core-adapter.h | 1 + 2 files changed, 9 insertions(+) diff --git a/bt-core/bt-core-adapter.c b/bt-core/bt-core-adapter.c index 9c68257..186562f 100644 --- a/bt-core/bt-core-adapter.c +++ b/bt-core/bt-core-adapter.c @@ -196,6 +196,14 @@ static int __bt_stack_up(void) return -1; } + /* We need to insert BT driver module by using 'insmod' in case of ARTIK530, + * and 'insmod' should be executed by systemd not bt-core. */ + ret = __bt_call_systemact_service(BT_SYSTEMACT_BT_DRIVER_INSMOD); + if (ret < 0) { + BT_ERR("Failed to call systemact service"); + return -1; + } + /* activate Bluez */ ret = __bt_call_systemact_service(BT_SYSTEMACT_BLUEZ_START); if (ret < 0) { diff --git a/bt-core/include/bt-core-adapter.h b/bt-core/include/bt-core-adapter.h index 91e6159..603b024 100755 --- a/bt-core/include/bt-core-adapter.h +++ b/bt-core/include/bt-core-adapter.h @@ -40,6 +40,7 @@ extern "C" { #define BT_SYSTEMACT_BLUETOOTH_SHARE_START "/run/.bluetooth_share_start" #define BT_SYSTEMACT_RFKILL_UNBLOCK "/run/.rfkill_unblock" #define BT_SYSTEMACT_RFKILL_BLOCK "/run/.rfkill_block" +#define BT_SYSTEMACT_BT_DRIVER_INSMOD "/run/.bt_driver_insmod" #define BT_CORE_TYPE (bt_core_get_type()) -- 2.7.4