lkml.org 
[lkml]   [2012]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 0/2] USB gadget - configfs
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?

>
> Joel


Sebastian


\
 
 \ /
  Last update: 2012-08-20 13:41    [W:0.160 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site