@@ -17,6 +17,7 @@
#include <linux/crc32.h>
#include <linux/string_helpers.h>
#include <linux/gpio/consumer.h>
+#include <linux/regulator/consumer.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -1522,6 +1523,11 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
{
struct hci_dev *hdev;
struct btnxpuart_dev *nxpdev;
+ int ret;
+
+ ret = devm_regulator_get_enable(&serdev->dev, "vin");
+ if (ret)
+ return dev_err_probe(&serdev->dev, ret, "Failed to enable VIN\n");
nxpdev = devm_kzalloc(&serdev->dev, sizeof(*nxpdev), GFP_KERNEL);
if (!nxpdev)
As bluetooth controller is usually part of a WiFi/BT combo chip, it is important that each driver references the common supply. This prevents bluetooth to be powered down if WiFi driver is not loaded or removed. Signed-off-by: Loic Poulain <loic.poulain@linaro.org> --- drivers/bluetooth/btnxpuart.c | 6 ++++++ 1 file changed, 6 insertions(+)