* [PATCH 2/3] mfd: stpmic1: move to coredevice level
2020-05-11 16:50 [PATCH 1/3] i2c: add coredevice_i2c_driver() macro Lucas Stach
@ 2020-05-11 16:50 ` Lucas Stach
2020-05-11 16:50 ` [PATCH 3/3] regulator: " Lucas Stach
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lucas Stach @ 2020-05-11 16:50 UTC (permalink / raw)
To: barebox
The PMIC provides regulators, which are needed before other
devices can probe.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/mfd/stpmic1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c
index ab13ded0ecfe..d22758bd6105 100644
--- a/drivers/mfd/stpmic1.c
+++ b/drivers/mfd/stpmic1.c
@@ -94,4 +94,4 @@ static struct driver_d stpmic1_i2c_driver = {
.of_compatible = DRV_OF_COMPAT(stpmic1_dt_ids),
};
-device_i2c_driver(stpmic1_i2c_driver);
+coredevice_i2c_driver(stpmic1_i2c_driver);
--
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
* [PATCH 3/3] regulator: stpmic1: move to coredevice level
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 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: Lucas Stach @ 2020-05-11 16:50 UTC (permalink / raw)
To: barebox
Those regulators are needed by other devices. Probe them early.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/regulator/stpmic1_regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c
index aaaba092c1a4..71a4ae80c392 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -433,4 +433,4 @@ static struct driver_d stpmic1_regulator_driver = {
.probe = stpmic1_regulator_probe,
.of_compatible = DRV_OF_COMPAT(stpmic1_regulator_of_match),
};
-device_platform_driver(stpmic1_regulator_driver);
+coredevice_platform_driver(stpmic1_regulator_driver);
--
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
* Re: [PATCH 1/3] i2c: add coredevice_i2c_driver() macro
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 ` Ahmad Fatoum
2020-05-12 7:49 ` Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2020-05-12 5:45 UTC (permalink / raw)
To: Lucas Stach, barebox
On 5/11/20 6:50 PM, Lucas Stach wrote:
> Some i2c device want to be coredevices. Add a macro to avoid
> boilerplate code.
For all three patches:
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>
> 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)
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] i2c: add coredevice_i2c_driver() macro
2020-05-11 16:50 [PATCH 1/3] i2c: add coredevice_i2c_driver() macro Lucas Stach
` (2 preceding siblings ...)
2020-05-12 5:45 ` [PATCH 1/3] i2c: add coredevice_i2c_driver() macro Ahmad Fatoum
@ 2020-05-12 7:49 ` Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2020-05-12 7:49 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
On Mon, May 11, 2020 at 06:50:17PM +0200, Lucas Stach wrote:
> 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(+)
This reminds me of your deep-probe series, I should maybe nack this
patch ;)
Sascha
>
> 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
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread