Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46942c38 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Add conditional check before requesting gpio"

parents f4dfd154 669c9af0
Loading
Loading
Loading
Loading
+22 −17
Original line number Diff line number Diff line
@@ -398,6 +398,10 @@ static int bt_configure_gpios(int on)
			bt_power_src_status[BT_RESET_GPIO] =
				gpio_get_value(bt_reset_gpio);
		}

		pr_info("xo_reset_gpio(%d)\n", xo_reset_gpio);

		if (xo_reset_gpio > 0) {
			rc = gpio_request(xo_reset_gpio, "xo_reset_gpio_n");
			if (rc) {
				pr_err("%s: unable to request gpio %d (%d)\n",
@@ -419,6 +423,7 @@ static int bt_configure_gpios(int on)
						__func__);
				}
			}
		}
		msleep(50);
		/*  Check  if  SW_CTRL  is  asserted  */
		if  (bt_sw_ctrl_gpio  >=  0)  {