Re: [PATCHv2] usb: gadget: composite: Provide a list of available functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



17 lip 2014 09:13 "Andrzej Pietrasiewicz" <andrzej.p@xxxxxxxxxxx> napisał(a):
>
> W dniu 16.07.2014 16:45, Felipe Balbi pisze:
>>
>> On Wed, Jul 16, 2014 at 09:58:31AM +0200, Sebastian Andrzej Siewior wrote:
>>>
>>> On 07/14/2014 12:36 PM, Andrzej Pietrasiewicz wrote:
>
>
> <snip>
>
>>> Since target and its userland tool (targetcli) is available for
>>> sometime now, maybe a look on those will give an idea on how the
>>> problem has been solved once _and_ whether it is good or not.
>>
>>
>> I agree with Sebastian here. At the end of the day, we don't expect
>> users to go fiddle with configfs directly and rather use libgadget
>> through a tool that uses it.
>>
>
> I don't have a strong opinion here, either.
>
> It is libusbg (that's how the library is actually called now) that
> should now. The thing is _how_ it should know: it can either be
> given a config file, or discover what's available.
>
> I believe we should take the best from both worlds:
>
> - there is a config file distributed with libusbg,
> - there is some generic way to handle functions not known
> at the moment of library's release
>
> @Krzysztof:
> @Matt:
> what do you think?
>

In my opinion the target client is not libusbg but a layer above it,
let's call it gadget tool and gadget daemon. Libusbg should provide
convenient API for all functions which has been merged to kernel.
Library doesn't need to know which functions are available, it only
need to know how to configure them if the are available. If some
function is not available usbg_create_function() will simply fail with
suitable error code.

The problem is in a tool or a daemon. User should be able to discover
set of available functions using gadget tool or daemon. Currently it
is possible only by iterating through all supported in libusbg
functions and trying to create each of it. It's not a good method. In
my opinion it's more a hack that a solution.

There is a method to discover list of functions which are compiled as
kernel modules but without access to kernel config, tool and a daemon
are unable to discover which USB functions has been compiled into
kernel.

--
BR's
Krzysztof Opasiak
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux