[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200311191501.8165-5-bryan.odonoghue@linaro.org>
Date: Wed, 11 Mar 2020 19:14:58 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: balbi@...nel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
bjorn.andersson@...aro.org, jackp@...eaurora.org, robh@...nel.org,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Andy Gross <agross@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Philipp Zabel <p.zabel@...gutronix.de>
Subject: [PATCH 4/7] usb: dwc3: qcom: Add support for usb-conn-gpio connectors
This patch adds a routine to find a usb-conn-gpio in the main DWC3 code.
This will be useful in a subsequent patch where we will reuse the current
extcon VBUS notifier with usb-conn-gpio.
Cc: Andy Gross <agross@...nel.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Lee Jones <lee.jones@...aro.org>
Cc: Felipe Balbi <balbi@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Philipp Zabel <p.zabel@...gutronix.de>
Cc: linux-arm-msm@...r.kernel.org
Cc: linux-usb@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Acked-by: Felipe Balbi <balbi@...nel.org>
Tested-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
---
drivers/usb/dwc3/dwc3-qcom.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 1dfd024cd06b..6f4b2b3cffce 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -550,6 +550,21 @@ static const struct dwc3_acpi_pdata sdm845_acpi_pdata = {
.ss_phy_irq_index = 2
};
+static bool dwc3_qcom_find_gpio_usb_connector(struct platform_device *pdev)
+{
+ struct device_node *np;
+ bool retval = false;
+
+ np = of_get_child_by_name(pdev->dev.of_node, "connector");
+ if (np) {
+ if (of_device_is_compatible(np, "gpio-usb-b-connector"))
+ retval = true;
+ }
+ of_node_put(np);
+
+ return retval;
+}
+
static int dwc3_qcom_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
--
2.25.1
Powered by blists - more mailing lists