mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: "'Sebastian Andrzej Siewior'" <bigeasy@linutronix.de>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	"'Kyungmin Park'" <kyungmin.park@samsung.com>,
	"'Felipe Balbi'" <balbi@ti.com>,
	"'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
	"'Joel Becker'" <jlbec@evilplan.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"'Michal Nazarewicz'" <mina86@mina86.com>
Subject: RE: [RFC][PATCH] fs: configfs: programmatically create config groups
Date: Wed, 28 Nov 2012 15:09:54 +0100	[thread overview]
Message-ID: <001201cdcd72$0c424d50$24c6e7f0$%p@samsung.com> (raw)
In-Reply-To: <50B5CD8C.9060902@linutronix.de>

On Wednesday, November 28, 2012 9:39 AM Sebastian Andrzej Siewior wrote:

<snip>

> >
> > so that we can create the endpoint directories.
> > And now what? What names shall the user use for the endpoint
> > directories? Oh, that's simple: just see what the endpoint
> > directories' names are. But wait, aren't we just creating them?
> >
> > Please also see Michał's point about user interface.
> 
> Yeah I did. Now I'm okay with creating new directories but we should keep
> this to a minimum and encode as much information possible in directory's
> name.
> 

I think I've identified one more case where programmatic creation/removal
of configfs directories is required. There is a general agreement that
binding/unbinding the gadgets will be achieved with using symlinks between
configfs representations of udcs and gadgets. So we need to represent
udcs in configfs. Suppose that the udc driver for user's platform
is modular, e.g. s3c-hsotg.ko. Now, after:

$ modprobe s3c-hsotg

I would _very_ much like the s3c-hsotg or something similar to appear
_automatically_ under $CONFIGFS_ROOT/udcs, e.g.:

$ ls $CONFIGFS_ROOT/udcs

s3c-hsotg

If there can be more instances than 1, then probably I would want

s3c-hsotg.0 	s3c-hsotg.1 ....

or something like that.

It would be _very_ frustrating for the user to have to guess
what name to use _if_ the relevant directory were to be
created manually with mkdir. Conversely, what would

$ rmdir s3c-hsotg

mean? Should it cause the s3c-hsotg.ko to unload?

All the above problems are elegantly solved with programmatic
creation and removal of configfs directories: in the udcs
config_group there is no make_item nor make_group, so mkdir
is not allowed, but instead the directories appear and
disappear as udcs come and go.

Andrzej



      reply	other threads:[~2012-11-28 14:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  8:35 Andrzej Pietrasiewicz
2012-11-26  8:35 ` [RFC][PATCH] fs: configfs: allow other kernel parts to " Andrzej Pietrasiewicz
2012-11-26 13:14 ` [RFC][PATCH] fs: configfs: " Michal Nazarewicz
2012-11-26 16:30 ` Sebastian Andrzej Siewior
2012-11-26 16:56   ` Michal Nazarewicz
2012-11-26 17:06     ` Sebastian Andrzej Siewior
2012-11-26 17:54       ` Michal Nazarewicz
2012-11-27 15:20         ` Sebastian Andrzej Siewior
2012-11-28  7:08           ` Nicholas A. Bellinger
2012-11-27  8:57   ` Andrzej Pietrasiewicz
2012-11-27 14:32     ` Michal Nazarewicz
2012-11-27 15:59     ` Sebastian Andrzej Siewior
2012-11-27 16:23       ` Michal Nazarewicz
2012-11-28  8:15         ` Sebastian Andrzej Siewior
2012-11-28 13:05           ` Michal Nazarewicz
2012-11-28 13:50             ` Sebastian Andrzej Siewior
2012-11-28 14:24               ` Michal Nazarewicz
2012-11-28 18:52                 ` Sebastian Andrzej Siewior
2012-12-07 23:18               ` Joel Becker
2012-12-10 11:57                 ` Andrzej Pietrasiewicz
2012-12-10 14:17                   ` Andrzej Pietrasiewicz
2012-12-10 14:34                     ` Felipe Balbi
2012-12-10 15:27                       ` Andrzej Pietrasiewicz
2012-12-12  1:10                     ` Joel Becker
2012-12-11 21:27                   ` Joel Becker
2012-12-14 12:18                 ` Sebastian Andrzej Siewior
2012-11-28  8:10       ` Andrzej Pietrasiewicz
2012-11-28  8:38         ` Sebastian Andrzej Siewior
2012-11-28 14:09           ` Andrzej Pietrasiewicz [this message]

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='001201cdcd72$0c424d50$24c6e7f0$%p@samsung.com' \
    --to=andrzej.p@samsung.com \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlbec@evilplan.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®