lkml.org 
[lkml]   [2019]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 8/8] usb: dwc3: Add Amlogic G12A DWC3 glue
Hi Neil,

> > +static int dwc3_meson_g12a_debugfs_init(struct dwc3_meson_g12a *priv)
> > +{
> > + priv->root = debugfs_create_dir("dwc3-meson-g12a", NULL);
> > + if (IS_ERR(priv->root))
> > + return PTR_ERR(priv->root);
> > +
> > + debugfs_create_file("mode_force", 0600, priv->root, priv,
> > + &dwc3_meson_g12a_mode_force_fops);
> > +
> > + debugfs_create_file("otg_id", 0400, priv->root, priv,
> > + &dwc3_meson_g12a_otg_id_fops);
> > +
> > + return 0;
> > +}
I just stumbled across the "USB role switch framework", see [0]
it seems to provide a userspace API as well and two in-kernel drivers
are using this framework already
(drivers/usb/gadget/udc/renesas_usb3.c,
drivers/usb/roles/intel-xhci-usb-role-switch.c)


[0] https://elixir.bootlin.com/linux/v5.0-rc8/source/drivers/usb/roles/class.c#L246

\
 
 \ /
  Last update: 2019-03-02 11:30    [W:0.072 / U:2.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site