|
@@ -38,6 +38,8 @@ struct btfmslim *btfm_slim_drv_data;
|
|
|
|
|
|
static int btfm_num_ports_open;
|
|
static int btfm_num_ports_open;
|
|
|
|
|
|
|
|
+static bool is_registered;
|
|
|
|
+
|
|
int btfm_slim_write(struct btfmslim *btfmslim,
|
|
int btfm_slim_write(struct btfmslim *btfmslim,
|
|
uint16_t reg, uint8_t reg_val, uint8_t pgd)
|
|
uint16_t reg, uint8_t reg_val, uint8_t pgd)
|
|
{
|
|
{
|
|
@@ -577,7 +579,11 @@ static int btfm_slim_status(struct slim_device *sdev,
|
|
btfm_slim = dev_get_drvdata(dev);
|
|
btfm_slim = dev_get_drvdata(dev);
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_BTFM_SLIM)
|
|
#if IS_ENABLED(CONFIG_BTFM_SLIM)
|
|
- ret = btfm_slim_register_codec(btfm_slim);
|
|
|
|
|
|
+ if (!is_registered) {
|
|
|
|
+ ret = btfm_slim_register_codec(btfm_slim);
|
|
|
|
+ if (ret == 0)
|
|
|
|
+ is_registered = true;
|
|
|
|
+ }
|
|
#else
|
|
#else
|
|
btfm_slim_get_hwep_details(sdev, btfm_slim);
|
|
btfm_slim_get_hwep_details(sdev, btfm_slim);
|
|
ret = btfm_slim_register_hw_ep(btfm_slim);
|
|
ret = btfm_slim_register_hw_ep(btfm_slim);
|
|
@@ -613,6 +619,7 @@ static int btfm_slim_probe(struct slim_device *slim)
|
|
pr_info("%s: name = %s\n", __func__, dev_name(&slim->dev));
|
|
pr_info("%s: name = %s\n", __func__, dev_name(&slim->dev));
|
|
/*this as true during the probe then slimbus won't check for logical address*/
|
|
/*this as true during the probe then slimbus won't check for logical address*/
|
|
slim->is_laddr_valid = true;
|
|
slim->is_laddr_valid = true;
|
|
|
|
+ is_registered = false;
|
|
|
|
|
|
dev_set_name(&slim->dev, "%s", BTFMSLIM_DEV_NAME);
|
|
dev_set_name(&slim->dev, "%s", BTFMSLIM_DEV_NAME);
|
|
pr_info("%s: name = %s\n", __func__, dev_name(&slim->dev));
|
|
pr_info("%s: name = %s\n", __func__, dev_name(&slim->dev));
|