diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-10-08 15:25:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-04 15:05:25 +0100 |
commit | c6919d5e0cd168a732034d8dc19fdc3dff683a2b (patch) | |
tree | 5136c2316bb3fcfd0bdbf677d99e6818b47ce016 /include/linux/usb | |
parent | 16c8373ecf7b3c723a8e765d798ea413bc8345a6 (diff) | |
download | linux-stable-c6919d5e0cd168a732034d8dc19fdc3dff683a2b.tar.gz linux-stable-c6919d5e0cd168a732034d8dc19fdc3dff683a2b.tar.bz2 linux-stable-c6919d5e0cd168a732034d8dc19fdc3dff683a2b.zip |
usb: roles: Add usb_role_switch_find_by_fwnode()
Simple wrapper function that searches USB role switches with
class_find_device_by_fwnode().
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20191008122600.22340-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/role.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/role.h b/include/linux/usb/role.h index 2d77f97df72d..efac3af83d6b 100644 --- a/include/linux/usb/role.h +++ b/include/linux/usb/role.h @@ -51,6 +51,9 @@ struct usb_role_switch *fwnode_usb_role_switch_get(struct fwnode_handle *node); void usb_role_switch_put(struct usb_role_switch *sw); struct usb_role_switch * +usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode); + +struct usb_role_switch * usb_role_switch_register(struct device *parent, const struct usb_role_switch_desc *desc); void usb_role_switch_unregister(struct usb_role_switch *sw); |