All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: Jerry Zhang <zhangjerry@google.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Cc: 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 09:55:27 +0200	[thread overview]
Message-ID: <98c4dfe9-18db-d2d9-a44b-1ea068d17310@samsung.com> (raw)

Hi,

W dniu 17.04.2018 o 03:17, Jerry Zhang pisze:
> Control_config is a group under gadget that acts

<snip>

>   
> @@ -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?

> +	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.

> +
> +	if (usb_add_config_only(&gi->cdev, &gi->control_config.c))
> +		goto err;
> +	list_del(&gi->control_config.c.list);
> +
>   	return &gi->group;
>   err:
>   	kfree(gi);
> 

Andrzej
---
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  7:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17  7:55 Andrzej Pietrasiewicz [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 21:51 Jerry Zhang
2018-04-17  8:46 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=98c4dfe9-18db-d2d9-a44b-1ea068d17310@samsung.com \
    --to=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 \
    --cc=zhangjerry@google.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.