2020-07-07 09:04:31

by Christoph Fritz

[permalink] [raw]
Subject: [PATCH] regulator: fan53880: fix Kconfig dependency

Currently the fan53880 regulator driver needs a device tree to get
probed, this patch provides the necessary dependency.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Christoph Fritz <[email protected]>
---
drivers/regulator/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index d47055db999d..76ef4b2de2e7 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -338,7 +338,7 @@ config REGULATOR_FAN53555

config REGULATOR_FAN53880
tristate "Fairchild FAN53880 Regulator"
- depends on I2C
+ depends on I2C && OF
select REGMAP_I2C
help
This driver supports Fairchild (ON Semiconductor) FAN53880
--
2.20.1



2020-07-07 10:22:27

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regulator: fan53880: fix Kconfig dependency

On Tue, Jul 07, 2020 at 11:03:23AM +0200, Christoph Fritz wrote:
> Currently the fan53880 regulator driver needs a device tree to get
> probed, this patch provides the necessary dependency.

It doesn't need it to run so it's better to leave an || COMPILE_TEST in
there at least and fix the warning with ifdefs and/or annotations.


Attachments:
(No filename) (336.00 B)
signature.asc (499.00 B)
Download all attachments

2020-07-07 10:58:48

by Christoph Fritz

[permalink] [raw]
Subject: [PATCH] regulator: fan53880: Add support for COMPILE_TEST

This patch adds support for COMPILE_TEST while fixing a warning when
no support for device tree is there.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Christoph Fritz <[email protected]>
---
drivers/regulator/Kconfig | 2 +-
drivers/regulator/fan53880.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index d47055db999d..1cc3c93a9621 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -338,7 +338,7 @@ config REGULATOR_FAN53555

config REGULATOR_FAN53880
tristate "Fairchild FAN53880 Regulator"
- depends on I2C
+ depends on I2C && (OF || COMPILE_TEST)
select REGMAP_I2C
help
This driver supports Fairchild (ON Semiconductor) FAN53880
diff --git a/drivers/regulator/fan53880.c b/drivers/regulator/fan53880.c
index 285acc705a55..c45baf581299 100644
--- a/drivers/regulator/fan53880.c
+++ b/drivers/regulator/fan53880.c
@@ -152,11 +152,13 @@ static int fan53880_i2c_probe(struct i2c_client *i2c,
return 0;
}

+#ifdef CONFIG_OF
static const struct of_device_id fan53880_dt_ids[] = {
{ .compatible = "onnn,fan53880", },
{}
};
MODULE_DEVICE_TABLE(of, fan53880_dt_ids);
+#endif

static const struct i2c_device_id fan53880_i2c_id[] = {
{ "fan53880", },
--
2.20.1

2020-07-07 14:21:28

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regulator: fan53880: Add support for COMPILE_TEST

On Tue, 07 Jul 2020 12:57:31 +0200, Christoph Fritz wrote:
> This patch adds support for COMPILE_TEST while fixing a warning when
> no support for device tree is there.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: fan53880: Add support for COMPILE_TEST
commit: 318b8a09f295cbf86fd504bcff3769b1fc4a936b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark