Re: [PATCH 1/2] mfd: hi655x: Reference required regulator driver

From: Lee Jones
Date: Thu Mar 23 2017 - 12:31:24 EST


On Mon, 20 Mar 2017, Jeremy Linton wrote:

> The hisi pmic requires an independent regulator driver to be
> loaded so that devices dependent on the pmic/regulator are
> started properly. Currently there is only a single compatible
> regulator driver in the tree, so reference it with a module soft
> dependency so that modprobe loads it whenever the hisi pmic
> driver is loaded.

This is a new one on my, but it sounds okay.

OOI, what happens when there are lots of compatible drivers?

> Signed-off-by: Jeremy Linton <lintonrjeremy@xxxxxxxxx>
> ---
> drivers/mfd/hi655x-pmic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c
> index ba706ad..56e027d 100644
> --- a/drivers/mfd/hi655x-pmic.c
> +++ b/drivers/mfd/hi655x-pmic.c
> @@ -184,3 +184,4 @@ module_platform_driver(hi655x_pmic_driver);
> MODULE_AUTHOR("Chen Feng <puck.chen@xxxxxxxxxxxxx>");
> MODULE_DESCRIPTION("Hisilicon hi655x PMIC driver");
> MODULE_LICENSE("GPL v2");
> +MODULE_SOFTDEP("post: hi655x-regulator");

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog