From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] spi: add coredevice_spi_driver macro as well
Date: Fri, 7 Aug 2020 09:29:05 +0200 [thread overview]
Message-ID: <20200807072905.2488-1-a.fatoum@pengutronix.de> (raw)
Some drivers would benefit from earlier probing, e.g. because they
provide regulators. Add a macro to make registration of such drivers
easier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/spi/spi.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/spi/spi.h b/include/spi/spi.h
index 66e0500d04c0..c5efca1cc31c 100644
--- a/include/spi/spi.h
+++ b/include/spi/spi.h
@@ -515,6 +515,8 @@ static inline int spi_driver_register(struct driver_d *drv)
return register_driver(drv);
}
+#define coredevice_spi_driver(drv) \
+ register_driver_macro(coredevice,spi,drv)
#define device_spi_driver(drv) \
register_driver_macro(device,spi,drv)
--
2.28.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-08-07 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 7:29 Ahmad Fatoum [this message]
2020-08-10 6:38 ` 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=20200807072905.2488-1-a.fatoum@pengutronix.de \
--to=a.fatoum@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