From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH v2 0/4] Introduce class devices
Date: Tue, 11 Jun 2024 07:12:33 +0200 [thread overview]
Message-ID: <20240611051237.4126918-1-s.hauer@pengutronix.de> (raw)
Several subsystems already have a struct device embedded in their
subsystems specific structs. Allow to register these as class devices.
This way we collect devices of the same type on a list and can show
informations about these in a generic way.
Sascha Hauer (4):
net: use for_each_netdev()
base: add class device support
net: register eth class
watchdog: register watchdog class
Changes since v1:
- s/DECLARE_CLASS/DEFINE_DEV_CLASS
- explain why linker lists are used in commit message
- better Kconfig help test for class command
commands/Kconfig | 6 +++++
commands/Makefile | 1 +
commands/class.c | 30 ++++++++++++++++++++++
drivers/base/Makefile | 1 +
drivers/base/class.c | 41 +++++++++++++++++++++++++++++++
drivers/watchdog/wd_core.c | 14 ++++++-----
include/asm-generic/barebox.lds.h | 7 ++++++
include/device.h | 21 ++++++++++++++++
include/net.h | 4 +--
net/eth.c | 12 +++++----
net/ifup.c | 2 +-
11 files changed, 125 insertions(+), 14 deletions(-)
create mode 100644 commands/class.c
create mode 100644 drivers/base/class.c
--
2.39.2
next reply other threads:[~2024-06-11 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 5:12 Sascha Hauer [this message]
2024-06-11 5:12 ` [PATCH v2 1/4] net: use for_each_netdev() Sascha Hauer
2024-06-11 5:12 ` [PATCH v2 2/4] base: add class device support Sascha Hauer
2024-06-11 5:12 ` [PATCH v2 3/4] net: register eth class Sascha Hauer
2024-06-11 5:12 ` [PATCH v2 4/4] watchdog: register watchdog class Sascha Hauer
2024-06-13 6:41 ` [PATCH v2 0/4] Introduce class devices Sascha Hauer
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=20240611051237.4126918-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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