All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Garg <ajaygargnsit@gmail.com>
To: linux-usb@vger.kernel.org
Subject: How to register a new "function" in configfs?
Date: Sat, 11 Sep 2021 11:13:48 +0530	[thread overview]
Message-ID: <CAHP4M8Vc+0eChmJDnLLa3ibuzGLOnc5hJ1Nk09794RHEJ7tEPw@mail.gmail.com> (raw)

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

             reply	other threads:[~2021-09-11  5:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  5:43 Ajay Garg [this message]
2021-09-11 14:31 ` How to register a new "function" in configfs? Michael Sweet
2021-09-11 14:58   ` Ajay Garg
2021-09-15 14:54     ` Ajay Garg
     [not found]     ` <CAHP4M8W-z_L3r0kDbW943A6hm9y3gXzYJd=ZOpi+w9okS1zaaQ@mail.gmail.com>
2021-09-17 14:17       ` Michael Sweet
2021-09-17 15:25         ` Ajay Garg
2021-09-18  7:30           ` Ajay Garg

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=CAHP4M8Vc+0eChmJDnLLa3ibuzGLOnc5hJ1Nk09794RHEJ7tEPw@mail.gmail.com \
    --to=ajaygargnsit@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.