bluetooth: add change for btfm slimbus driver

Makefile and Kconfig changes to enable BTFM Slimbus driver as module.

CRs-fixed: 2589921
Change-Id: I25528bbcb1423fc144d1142cdf115b1a49eea75f
Signed-off-by: himta ram <hram@codeaurora.org>
This commit is contained in:
himta ram 2019-12-19 13:17:12 +05:30
commit 6b27421594
4 changed files with 15 additions and 37 deletions

View file

@ -449,37 +449,15 @@ config MSM_BT_POWER
into the kernel or say M to compile as a module.
config BTFM_SLIM
tristate "MSM Bluetooth/FM Slimbus Driver"
tristate "MSM Bluetooth/FM Slimbus Device"
depends on MSM_BT_POWER
select SLIMBUS
help
This enables BT/FM slimbus driver to get multiple audio channel.
This will make use of slimbus platform driver and slimbus codec
driver to communicate with slimbus machine driver and LPSS which
is Slimbus master.
Slimbus slave initialization and configuration will be done through
this driver.
Say Y here to compile support for Bluetooth/FM Slimbus driver
into the kernel or say M to compile as a module.
config BTFM_SLIM_WCN3990
tristate "MSM Bluetooth/FM WCN3990 Device"
select BTFM_SLIM
help
This enables specific driver handle for WCN3990 device.
It is designed to adapt any future BT/FM device to implement a specific
chip initialization process and control.
Say Y here to compile support for Bluetooth slimbus driver
into the kernel or say M to compile as a module.
config BT_SLIM_QCA6390
tristate "MSM Bluetooth QCA6390 Device"
select BTFM_SLIM
help
This enables specific driver handle for QCA6390 device.
It is designed to adapt any future BT/FM device to implement a specific
chip initialization process and control.
This will make use of slimbus platform driver and slimbus
codec driver to communicate with slimbus machine driver and LPSS which
is Slimbus master.Slimbus slave initialization and configuration
will be done through this driver.
Say Y here to compile support for Bluetooth slimbus driver
into the kernel or say M to compile as a module.

View file

@ -33,10 +33,9 @@ obj-$(CONFIG_BT_HCIRSI) += btrsi.o
obj-$(CONFIG_MSM_BT_POWER) += btpower.o
obj-$(CONFIG_BTFM_SLIM) += btfm_slim.o
obj-$(CONFIG_BTFM_SLIM) += btfm_slim_codec.o
obj-$(CONFIG_BTFM_SLIM_WCN3990) += btfm_slim_slave.o
obj-$(CONFIG_BT_SLIM_QCA6390) += btfm_slim_slave.o
bt_fm_slim-objs := btfm_slim.o btfm_slim_codec.o btfm_slim_slave.o
obj-$(CONFIG_BTFM_SLIM) += bt_fm_slim.o
btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o

View file

@ -12,6 +12,7 @@
#include <linux/debugfs.h>
#include <linux/ratelimit.h>
#include <linux/slab.h>
#include <linux/btpower.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@ -19,7 +20,6 @@
#include <sound/tlv.h>
#include "btfm_slim.h"
#include "btfm_slim_slave.h"
#include <linux/bluetooth-power.h>
int btfm_slim_write(struct btfmslim *btfmslim,
uint16_t reg, int bytes, void *src, uint8_t pgd)
@ -308,7 +308,7 @@ static int btfm_slim_alloc_port(struct btfmslim *btfmslim)
if (!btfmslim)
return ret;
chipset_ver = get_chipset_version();
chipset_ver = btpower_get_chipset_version();
BTFMSLIM_INFO("chipset soc version:%x", chipset_ver);
rx_chs = btfmslim->rx_chs;
@ -543,7 +543,8 @@ static int btfm_slim_probe(struct slim_device *slim)
BTFMSLIM_ERR("error, registering slimbus codec failed");
goto free;
}
ret = bt_register_slimdev(&slim->dev);
ret = btpower_register_slimdev(&slim->dev);
if (ret < 0) {
btfm_slim_unregister_codec(&slim->dev);
goto free;

View file

@ -43,8 +43,8 @@ struct bluetooth_power_platform_data {
int (*bt_power_setup)(int id); /* Bluetooth power setup function */
};
int bt_register_slimdev(struct device *dev);
int get_chipset_version(void);
int btpower_register_slimdev(struct device *dev);
int btpower_get_chipset_version(void);
#define BT_CMD_SLIM_TEST 0xbfac
#define BT_CMD_PWR_CTRL 0xbfad