orgads / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
e336be
From 70ecdd3d8b36cd2bb960bc4e7ae047fbb94c031b Mon Sep 17 00:00:00 2001
e336be
From: "Cho, Yu-Chen" <acho@suse.com>
e336be
Date: Tue, 2 Oct 2018 17:57:04 +0800
e336be
Subject: [PATCH] Bluetooth: btsdio: Do not bind to non-removable BCM43430
e336be
e336be
BCM43430 devices soldered onto the PCB (non-removable)
e336be
use an UART connection for bluetooth.
e336be
But also advertise btsdio support on their 3th sdio function.
e336be
e336be
Signed-off-by: Cho, Yu-Chen <acho@suse.com>
e336be
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
e336be
---
e336be
 drivers/bluetooth/btsdio.c | 14 +++++++++-----
e336be
 1 file changed, 9 insertions(+), 5 deletions(-)
e336be
e336be
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
e336be
index 20142bc77554..282d1af1d3ba 100644
e336be
--- a/drivers/bluetooth/btsdio.c
e336be
+++ b/drivers/bluetooth/btsdio.c
e336be
@@ -293,13 +293,17 @@ static int btsdio_probe(struct sdio_func *func,
e336be
 		tuple = tuple->next;
e336be
 	}
e336be
 
e336be
-	/* BCM43341 devices soldered onto the PCB (non-removable) use an
e336be
-	 * uart connection for bluetooth, ignore the BT SDIO interface.
e336be
+	/* Broadcom devices soldered onto the PCB (non-removable) use an
e336be
+	 * UART connection for Bluetooth, ignore the BT SDIO interface.
e336be
 	 */
e336be
 	if (func->vendor == SDIO_VENDOR_ID_BROADCOM &&
e336be
-	    func->device == SDIO_DEVICE_ID_BROADCOM_43341 &&
e336be
-	    !mmc_card_is_removable(func->card->host))
e336be
-		return -ENODEV;
e336be
+	    !mmc_card_is_removable(func->card->host)) {
e336be
+		switch (func->device) {
e336be
+		case SDIO_DEVICE_ID_BROADCOM_43341:
e336be
+		case SDIO_DEVICE_ID_BROADCOM_43430:
e336be
+			return -ENODEV;
e336be
+		}
e336be
+	}
e336be
 
e336be
 	data = devm_kzalloc(&func->dev, sizeof(*data), GFP_KERNEL);
e336be
 	if (!data)
e336be
-- 
e336be
2.20.1
e336be