usb: roles: Allow the role switches to be named
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 2 Mar 2020 13:53:50 +0000 (16:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Mar 2020 10:12:50 +0000 (11:12 +0100)
commite5256194cb51ced7a2f656590f1e2132235d442c
tree473086f90ceca12fc5774061fe49748bd2b126e0
parentbce3052f0c165685a074e50136e4d341bcd59f4a
usb: roles: Allow the role switches to be named

The switch devices have been named by using the name of the
parent device as base for now, but if for example the
parent device controls multiple muxes, that will not work.

Adding an optional member "name" to the switch descriptor
that can be used for naming the switch during registration.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200302135353.56659-7-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/roles/class.c
include/linux/usb/role.h