devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] USB: add device-tree support for interfaces
@ 2017-11-09 17:07 Johan Hovold
  2017-11-09 17:07 ` [PATCH 1/8] dt-bindings: usb: fix example hub node name Johan Hovold
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Johan Hovold @ 2017-11-09 17:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Rob Herring, Mark Rutland, Arnd Bergmann, Alan Stern, Peter Chen,
	linux-usb, devicetree, linux-kernel, Johan Hovold,
	Rafał Miłecki, Florian Fainelli

This series adds support for representing USB interfaces in device tree
by implementing support for "interface nodes" and "combined nodes" from
the OF specification.

This is needed to be able to describe non-discoverable properties of
permanently attached USB devices and their interfaces such as any
i2c-clients connected to a USB-i2c bridge (e.g. the dln2 mfd) or,
eventually, devices connected to usb-serial converters (to be used with
serdev).

As part of this series the current binding for USB devices is cleaned
up and some already-used properties of "host-controller nodes" and "hub
nodes" are explicitly defined.

While doing this work I realised that a broken binding for USB-port LED
triggers had recently been merged. This trigger implementation assumes
an undocumented and conflicting binding for USB (root) hub ports, which
in fact lack a representation in device tree (the child nodes of hub
nodes represent the attached USB devices):

	80dc6e1cd85f ("dt-bindings: leds: document new trigger-sources property")

In this series I only address an of_node leak in the trigger
implementation and add a FIXME about the port/device mixup. Note that
some broadcom dts have already started using such a "port" binding:

	a503cf0cbe66 ("ARM: dts: BCM53573: Specify USB ports of on-SoC controllers")
	69d22c70ac9a ("ARM: dts: BCM5301X: Specify USB ports for each controller")

To fix this, any triggers need to be described using properties of the
host-controller (or hub) rather than of their children.

Johan


Johan Hovold (8):
  dt-bindings: usb: fix example hub node name
  dt-bindings: usb: fix reg-property port-number range
  dt-bindings: usb: clean up compatible property
  dt-bindings: usb: document hub and host-controller properties
  dt-bindings: usb: add interface binding
  USB: add device-tree support for interfaces
  USB: ledtrig-usbport: fix of-node leak
  USB: of: clean up device-node helper

 .../devicetree/bindings/usb/usb-device.txt         | 99 +++++++++++++++++++---
 drivers/usb/core/ledtrig-usbport.c                 | 10 ++-
 drivers/usb/core/message.c                         | 18 ++--
 drivers/usb/core/of.c                              | 95 ++++++++++++++++++---
 drivers/usb/core/usb.c                             |  3 +-
 include/linux/usb/of.h                             | 21 ++++-
 6 files changed, 208 insertions(+), 38 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-11-17 16:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 17:07 [PATCH 0/8] USB: add device-tree support for interfaces Johan Hovold
2017-11-09 17:07 ` [PATCH 1/8] dt-bindings: usb: fix example hub node name Johan Hovold
2017-11-15 15:44   ` Rob Herring
2017-11-09 17:07 ` [PATCH 2/8] dt-bindings: usb: fix reg-property port-number range Johan Hovold
2017-11-09 17:07 ` [PATCH 4/8] dt-bindings: usb: document hub and host-controller properties Johan Hovold
     [not found]   ` <20171109170723.10960-5-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-15 15:46     ` Rob Herring
2017-11-16  8:45       ` Johan Hovold
2017-11-16 14:32         ` Rob Herring
2017-11-09 17:07 ` [PATCH 5/8] dt-bindings: usb: add interface binding Johan Hovold
2017-11-09 17:07 ` [PATCH 6/8] USB: add device-tree support for interfaces Johan Hovold
2017-11-09 17:07 ` [PATCH 7/8] USB: ledtrig-usbport: fix of-node leak Johan Hovold
2017-11-09 17:07 ` [PATCH 8/8] USB: of: clean up device-node helper Johan Hovold
     [not found] ` <20171109170723.10960-1-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-09 17:07   ` [PATCH 3/8] dt-bindings: usb: clean up compatible property Johan Hovold
2017-11-16 14:43   ` [PATCH 0/8] USB: add device-tree support for interfaces Rob Herring
2017-11-16 16:12     ` Johan Hovold
2017-11-16 18:33       ` Rob Herring
     [not found]         ` <CAL_JsqKFpa6_0nB5ftgFRvwqMN8aBGymASZY7ZeykN0MD6UWbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-17 16:30           ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).