From: Tomek The Messenger <tomekthemessenger@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: module_platform_driver vs module_init
Date: Tue, 28 Apr 2020 15:56:37 +0200 [thread overview]
Message-ID: <CAA4NGysyXXnH+aiXMRzzkQWEHt_TujZEy4gLs5A=B-LmCWwOaA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 369 bytes --]
Hi
If I have to parse some properties from dts and none file operations are
set for user space what is better to use platform driver or just
module_init?
If I use module_init(my_init) then in my_init I need to use:
'of_find_compatible_node' in order to find node in device tree and parse
properties.
For platform driver I have it on entry: pdev->dev->of_node
BR
Tomek
[-- Attachment #1.2: Type: text/html, Size: 499 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
reply other threads:[~2020-04-28 13:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAA4NGysyXXnH+aiXMRzzkQWEHt_TujZEy4gLs5A=B-LmCWwOaA@mail.gmail.com' \
--to=tomekthemessenger@gmail.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 NNTP newsgroup(s).