Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: Lucas Tanure <tanure@linux.com>
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: API between modules
Date: Thu, 18 May 2023 08:16:18 +0100	[thread overview]
Message-ID: <CAJX_Q+3w6uE0rC9deYxkA0bNxNGuaj6GbQTH3_f8QWtUWYXQdA@mail.gmail.com> (raw)

Hi,

I have two kernel modules that need to talk over an API, and right
now, they are statically linked together, but I am looking for a
better way to separate them and share an API between them.

A few years ago, I did the HDA component:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/sound/pci/hda/hda_component.h

Using the component API:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/linux/component.h

Are there other ways for a module to wait for another module to load
and use its API?
Is there a default way to do that?

I know that with MFD devices, you can have children, but that's not
the case. My modules are not related in that way.

Thanks
Lucas

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2023-05-18  7:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  7:16 Lucas Tanure [this message]
2023-05-18 10:33 ` API between modules Greg KH
2023-05-19  6:30 ` Prathu Baronia
2023-05-27  7:19   ` Release of my Kernel Development Tool Lucas Tanure

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=CAJX_Q+3w6uE0rC9deYxkA0bNxNGuaj6GbQTH3_f8QWtUWYXQdA@mail.gmail.com \
    --to=tanure@linux.com \
    --cc=kernelnewbies@kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).