bluetooth: hci_nxp: move vendor specific setup to its dedicated place
Some vendor specific setup was done inside the open() HCI function, those should be inside setup() function instead. Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
This commit is contained in:
parent
26d56eb0a5
commit
5c308e0344
2 changed files with 14 additions and 1 deletions
|
@ -112,6 +112,7 @@ config BT_DA1469X
|
||||||
|
|
||||||
config BT_NXP
|
config BT_NXP
|
||||||
bool "NXP HCI driver"
|
bool "NXP HCI driver"
|
||||||
|
select BT_HCI_SETUP
|
||||||
help
|
help
|
||||||
NXP HCI bluetooth interface
|
NXP HCI bluetooth interface
|
||||||
|
|
||||||
|
|
|
@ -312,7 +312,18 @@ static int bt_nxp_open(void)
|
||||||
LOG_ERR("HCI open failed");
|
LOG_ERR("HCI open failed");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} while (false);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int bt_nxp_setup(const struct bt_hci_setup_params *params)
|
||||||
|
{
|
||||||
|
ARG_UNUSED(params);
|
||||||
|
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
do {
|
||||||
#if CONFIG_HCI_NXP_SET_CAL_DATA
|
#if CONFIG_HCI_NXP_SET_CAL_DATA
|
||||||
ret = bt_nxp_set_calibration_data();
|
ret = bt_nxp_set_calibration_data();
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -345,7 +356,7 @@ static int bt_nxp_open(void)
|
||||||
LOG_ERR("Failed to configure controller autosleep");
|
LOG_ERR("Failed to configure controller autosleep");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_HCI_NXP_ENABLE_AUTO_SLEEP */
|
||||||
} while (false);
|
} while (false);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -373,6 +384,7 @@ static int bt_nxp_close(void)
|
||||||
static const struct bt_hci_driver drv = {
|
static const struct bt_hci_driver drv = {
|
||||||
.name = "BT NXP",
|
.name = "BT NXP",
|
||||||
.open = bt_nxp_open,
|
.open = bt_nxp_open,
|
||||||
|
.setup = bt_nxp_setup,
|
||||||
.close = bt_nxp_close,
|
.close = bt_nxp_close,
|
||||||
.send = bt_nxp_send,
|
.send = bt_nxp_send,
|
||||||
.bus = BT_HCI_DRIVER_BUS_IPM,
|
.bus = BT_HCI_DRIVER_BUS_IPM,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue