Re: [PATCH 05/12] regulator: Introduce tps68470-regulator driver

From: Mark Brown
Date: Mon Oct 11 2021 - 06:42:17 EST


On Fri, Oct 08, 2021 at 06:21:14PM +0200, Hans de Goede wrote:

> +++ b/drivers/regulator/tps68470-regulator.c
> @@ -0,0 +1,194 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Regulator driver for TPS68470 PMIC
> + *

Please make the entire comment a C++ one so things look more
intentional.

> +
> +/*
> + * The ACPI tps68470 probe-ordering depends on the clk/gpio/regulator drivers
> + * being registered before the MFD cells are created (the MFD driver calls
> + * acpi_dev_clear_dependencies() after the cell creation).
> + * subsys_initcall() ensures this when the drivers are builtin.
> + */
> +static int __init tps68470_regulator_init(void)
> +{
> + return platform_driver_register(&tps68470_regulator_driver);
> +}
> +subsys_initcall(tps68470_regulator_init);

If this is actually required then the driver is broken for modular use
which frankly is just generally broken. I don't understand why this
driver would require this when other drivers don't, or what the actual
requirement is here - what does the call do and why is the ordering
important?

Attachment: signature.asc
Description: PGP signature