Re: How to register a new "function" in configfs?

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

 



Ajay,

Quick question (as someone who has been down this road), do you need to do a kernel driver or could you just use the functionfs support to implement everything in userspace?  I found that path to be much easier and less error-prone (and one of these days I'm going to be contributing some documentation changes to make some things clearer...) and I was able to get my IPP-USB implementation up and running very quickly.


> On Sep 11, 2021, at 1:43 AM, Ajay Garg <ajaygargnsit@xxxxxxxxx> wrote:
> 
> Hi All.
> 
> As a first step, I have been able to load a gadget on configfs, which
> binds to the function "gser" (thus loading up the usb_f_serial module
> when the gadget mounts). Things work well till here.
> 
> Now, I have written a brand-new gadget-side device-driver, trying to
> create a new function "gusb", via DECLARE_USB_FUNCTION_INIT.
> However, now when I try to load the gadget for binding to "gusb", I
> get the error that the function cannot be found.
> 
> Seems that firing up a new gadget-side driver, that registers a new
> function via DECLARE_USB_FUNCTION_INIT, is not enough to make the new
> function visible across the kernel.
> 
> Kindly let know what I am missing.
> Will be grateful for pointers.
> 
> 
> Thanks and Regards,
> Ajay
> 

________________________
Michael Sweet







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

  Powered by Linux