mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] i2c: add coredevice_i2c_driver() macro
@ 2020-05-11 16:50 Lucas Stach
  2020-05-11 16:50 ` [PATCH 2/3] mfd: stpmic1: move to coredevice level Lucas Stach
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Lucas Stach @ 2020-05-11 16:50 UTC (permalink / raw)
  To: barebox

Some i2c device want to be coredevices. Add a macro to avoid
boilerplate code.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 include/i2c/i2c.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index a694e4ab2ff1..cb65c43e4110 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -318,6 +318,8 @@ static inline int i2c_driver_register(struct driver_d *drv)
 	return register_driver(drv);
 }
 
+#define coredevice_i2c_driver(drv) \
+	register_driver_macro(coredevice, i2c, drv)
 #define device_i2c_driver(drv) \
 	register_driver_macro(device, i2c, drv)
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-12  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 16:50 [PATCH 1/3] i2c: add coredevice_i2c_driver() macro Lucas Stach
2020-05-11 16:50 ` [PATCH 2/3] mfd: stpmic1: move to coredevice level Lucas Stach
2020-05-11 16:50 ` [PATCH 3/3] regulator: " Lucas Stach
2020-05-12  5:45 ` [PATCH 1/3] i2c: add coredevice_i2c_driver() macro Ahmad Fatoum
2020-05-12  7:49 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox