[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120820111938.GH2102@dhcp-172-17-9-228.mtv.corp.google.com>
Date: Mon, 20 Aug 2012 04:19:38 -0700
From: Joel Becker <jlbec@...lplan.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
'Kyungmin Park' <kyungmin.park@...sung.com>,
'Felipe Balbi' <balbi@...com>,
'Greg Kroah-Hartman' <gregkh@...uxfoundation.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
'Alan Stern' <stern@...land.harvard.edu>
Subject: Re: [RFC 0/2] USB gadget - configfs
On Mon, Aug 20, 2012 at 01:01:03PM +0200, Sebastian Andrzej Siewior wrote:
> On 08/20/2012 07:59 AM, Joel Becker wrote:
> > I think what you want here is a symlink. Create a directory
> >high in the tree called 'ready' or 'available', and when you want to
> >lock the device in place, symlink it into that directory. This will pin
> >the item. You can also make use of the ->allow_link() and ->drop_link()
> >callbacks to prevent symlinking an item until it is fully configured,
> >and prevent unlinking an item that is in use.
> >
> > $ ln -s /cfg/usb-function-gadget/G1/C1/F1/f_mass_storage/lun0 \
> > /cfg/usb-function-gadget/ready/
> >
> >or something like that.
>
> That would be something like
>
> $ ln -s /cfg/usb-function-gadget/G1 \
> /cfg/usb-function-gadget/udcs/udc1/
>
> Where we "bind" the complete gadget (G1) including the mass storage
> configuration to the UDC (udc1 in this example).
>
> At this point we could snapshot the complete configuration so we have
> it persistent and if somebody changes attributes within /cfg/usb-
> function-gadget/G1 it doesn't matter because we have the copy.
>
> Is it _this_ what you want us to do? A snapshot?
No, I don't see why you would snapshot. You can, btw, reject
->store_attribute() operations once you are in a "ready" state. That's
different from preventing the removal of items.
Joel
--
The Graham Corollary:
The longer a socially-moderated news website exists, the
probability of an old Paul Graham link appearing at the top
approaches certainty.
http://www.jlbec.org/
jlbec@...lplan.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists