All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Zhang <zhangjerry@google.com>
To: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, Michal Nazarewicz <mina86@mina86.com>,
	Krzysztof Opasiak <kopasiak90@gmail.com>,
	Badhri Jagan Sridharan <badhri@google.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	felixhaedicke@web.de
Subject: [2/3] usb: gadget: configfs: Create control_config group
Date: Tue, 17 Apr 2018 21:51:09 +0000	[thread overview]
Message-ID: <CA+JE3beAZh83UNtr3NUhn4PtEXKupBUGAh-szNN2EbGnKATXqg@mail.gmail.com> (raw)

> >> @@ -1461,6 +1499,18 @@ static struct config_group *gadgets_make(
> >>      if (!gi->composite.gadget_driver.function)
> >>              goto err;
> >>
> >> +    gi->control_config.c.label = "control_config";
> >> +    /* composite requires some value, but it doesn't matter */
> >> +    gi->control_config.c.bConfigurationValue = 42;
> >
> > If I understand correctly this is never exposed to the host, is it?
That's right. It won't be in cdev so it doesn't show up in the actual
descriptors and as such can't be enabled.

> >
> >> +    INIT_LIST_HEAD(&gi->control_config.func_list);
> >> +    config_group_init_type_name(&gi->control_config.group,
> >> +                    "control_config", &gadget_config_type);
> >> +    configfs_add_default_group(&gi->control_config.group, &gi->group);
> >
> > Since it is a config I'd rather this be put inside the "configs" group.
> > Configs created by the user must be named following the
> > <config name>.<bConfigurationValue> pattern, so there will be no
conflict
> > with any other conf. The name can be "control" then.
> >

> Answering my own doubts: this could be ok from the kernel point of view,
> but existing userspace (libusbgx) already assumes that in the configs
directory
> there are only entries of the form <config>.<number> and anything other
than that
> will cause it to report error.
Makes sense. I would be fine either way but it sounds like we're stuck
because of that library.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-04-17 21:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 21:51 Jerry Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-21  1:21 [2/3] usb: gadget: configfs: Create control_config group Jerry Zhang
2018-04-19 19:17 Krzysztof Opasiak
2018-04-19 19:02 Jerry Zhang
2018-04-19 18:32 Krzysztof Opasiak
2018-04-17  8:46 Andrzej Pietrasiewicz
2018-04-17  7:55 Andrzej Pietrasiewicz
2018-04-17  1:17 Jerry Zhang

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=CA+JE3beAZh83UNtr3NUhn4PtEXKupBUGAh-szNN2EbGnKATXqg@mail.gmail.com \
    --to=zhangjerry@google.com \
    --cc=andrzej.p@samsung.com \
    --cc=badhri@google.com \
    --cc=balbi@kernel.org \
    --cc=felixhaedicke@web.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kopasiak90@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=mina86@mina86.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.