mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <balbi@kernel.org>, <mathias.nyman@intel.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<rogerq@ti.com>
Subject: [PATCH 2/3] usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested
Date: Thu, 17 Nov 2016 17:01:20 +0200	[thread overview]
Message-ID: <1479394881-13863-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1479394881-13863-1-git-send-email-rogerq@ti.com>

From: Felipe Balbi <balbi@ti.com>

In case 'quirk-broken-port-ped' property is passed in via device property,
we should enable the corresponding BROKEN_PED quirk flag for XHCI core.

[rogerq@ti.com] Updated code from platform data to device property
and added DT binding.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 +
 drivers/usb/host/xhci-plat.c                       | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 966885c..7790c81 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -26,6 +26,7 @@ Required properties:
 Optional properties:
   - clocks: reference to a clock
   - usb3-lpm-capable: determines if platform is USB3 LPM capable
+  - quirk-broken-port-ped: set if the controller has broken port disable mechanism
 
 Example:
 	usb@f0931000 {
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index ed56bf9..e4de741 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -223,6 +223,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
 	if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable"))
 		xhci->quirks |= XHCI_LPM_SUPPORT;
 
+	if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
+		xhci->quirks |= XHCI_BROKEN_PORT_PED;
+
 	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
 		xhci->shared_hcd->can_do_streams = 1;
 
-- 
2.7.4

  parent reply	other threads:[~2016-11-17 18:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 15:01 [PATCH 0/3] usb: xhci: Add broken port disable quirk Roger Quadros
2016-11-17 15:01 ` [PATCH 1/3] usb: xhci: add quirk flag for broken PED bits Roger Quadros
2016-11-18 10:49   ` Sergei Shtylyov
2016-11-21 11:51     ` Roger Quadros
2016-11-21 11:51   ` [PATCH v2 " Roger Quadros
2016-11-21 11:56     ` Felipe Balbi
2016-11-21 13:05       ` Roger Quadros
2016-11-21 13:09     ` [PATCH v3 " Roger Quadros
2016-11-17 15:01 ` Roger Quadros [this message]
2016-11-17 15:01 ` [PATCH 3/3] usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions Roger Quadros
2017-01-03 12:37 ` [PATCH 0/3] usb: xhci: Add broken port disable quirk Roger Quadros
2017-01-03 12:53   ` Felipe Balbi
2017-01-03 16:32     ` Mathias Nyman
2017-01-24 14:59     ` Roger Quadros
2017-01-26  9:19       ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479394881-13863-3-git-send-email-rogerq@ti.com \
    --to=rogerq@ti.com \
    --cc=balbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®