diff mbox

[2/4] regulator: Enable compile testing for Maxim and Samsung PMIC drivers

Message ID 1475441897-15730-3-git-send-email-krzk@kernel.org
State Not Applicable
Headers show

Commit Message

Krzysztof Kozlowski Oct. 2, 2016, 8:58 p.m. UTC
Most of Maxim and Samsung PMIC/MUIC regulator drivers can be compile
tested to increase build coverage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/regulator/Kconfig | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Mark Brown Oct. 4, 2016, 2:40 a.m. UTC | #1
On Sun, Oct 02, 2016 at 10:58:15PM +0200, Krzysztof Kozlowski wrote:
> Most of Maxim and Samsung PMIC/MUIC regulator drivers can be compile
> tested to increase build coverage.

All these drivers already just depend on the MFDs which don't have any
weird architecture dependencies - the main goal with COMPILE_TEST is
usually to eliminate dependencies which just can't be selected so they
can be built at all.  Given that there's no easy way to select
everything in a subsystem otherwise does this buy us a lot?
Krzysztof Kozlowski Oct. 4, 2016, 9:30 a.m. UTC | #2
On Tue, Oct 04, 2016 at 04:40:55AM +0200, Mark Brown wrote:
> On Sun, Oct 02, 2016 at 10:58:15PM +0200, Krzysztof Kozlowski wrote:
> > Most of Maxim and Samsung PMIC/MUIC regulator drivers can be compile
> > tested to increase build coverage.
> 
> All these drivers already just depend on the MFDs which don't have any
> weird architecture dependencies - the main goal with COMPILE_TEST is
> usually to eliminate dependencies which just can't be selected so they
> can be built at all.  Given that there's no easy way to select
> everything in a subsystem otherwise does this buy us a lot?

Initially I thought similar - if parent MFD driver can be
compile-tested, then these children do not need that flag...

However the MFD drivers depend on I2C which (currently) cannot be
removed for compile testing. On the other hand, regulator drivers do not
need that dependency so you can compile-test them with I2C=n. That is
the main benefit. If you wish, I can add this information to the commit
msg.

Best regards,
Krzysztof
diff mbox

Patch

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 936f7ccc9736..1ce7e3633b63 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -379,7 +379,7 @@  config REGULATOR_MAX1586
 
 config REGULATOR_MAX77620
 	tristate "Maxim 77620/MAX20024 voltage regulator"
-	depends on MFD_MAX77620
+	depends on MFD_MAX77620 || COMPILE_TEST
 	help
 	  This driver controls Maxim MAX77620 voltage output regulator
 	  via I2C bus. The provided regulator is suitable for Tegra
@@ -453,7 +453,7 @@  config REGULATOR_MAX8998
 
 config REGULATOR_MAX77686
 	tristate "Maxim 77686 regulator"
-	depends on MFD_MAX77686
+	depends on MFD_MAX77686 || COMPILE_TEST
 	help
 	  This driver controls a Maxim 77686 regulator
 	  via I2C bus. The provided regulator is suitable for
@@ -461,7 +461,7 @@  config REGULATOR_MAX77686
 
 config REGULATOR_MAX77693
 	tristate "Maxim 77693/77843 regulator"
-	depends on (MFD_MAX77693 || MFD_MAX77843)
+	depends on MFD_MAX77693 || MFD_MAX77843 || COMPILE_TEST
 	help
 	  This driver controls a Maxim 77693/77843 regulators via I2C bus.
 	  The regulators include two LDOs, 'SAFEOUT1', 'SAFEOUT2'
@@ -470,7 +470,7 @@  config REGULATOR_MAX77693
 
 config REGULATOR_MAX77802
 	tristate "Maxim 77802 regulator"
-	depends on MFD_MAX77686
+	depends on MFD_MAX77686 || COMPILE_TEST
 	help
 	  This driver controls a Maxim 77802 regulator
 	  via I2C bus. The provided regulator is suitable for
@@ -669,14 +669,14 @@  config REGULATOR_RT5033
 
 config REGULATOR_S2MPA01
 	tristate "Samsung S2MPA01 voltage regulator"
-	depends on MFD_SEC_CORE
+	depends on MFD_SEC_CORE || COMPILE_TEST
 	help
 	 This driver controls Samsung S2MPA01 voltage output regulator
 	 via I2C bus. S2MPA01 has 10 Bucks and 26 LDO outputs.
 
 config REGULATOR_S2MPS11
 	tristate "Samsung S2MPS11/13/14/15/S2MPU02 voltage regulator"
-	depends on MFD_SEC_CORE
+	depends on MFD_SEC_CORE || COMPILE_TEST
 	help
 	 This driver supports a Samsung S2MPS11/13/14/15/S2MPU02 voltage
 	 output regulator via I2C bus. The chip is comprised of high efficient
@@ -685,7 +685,7 @@  config REGULATOR_S2MPS11
 
 config REGULATOR_S5M8767
 	tristate "Samsung S5M8767A voltage regulator"
-	depends on MFD_SEC_CORE
+	depends on MFD_SEC_CORE || COMPILE_TEST
 	help
 	 This driver supports a Samsung S5M8767A voltage output regulator
 	 via I2C bus. S5M8767A have 9 Bucks and 28 LDOs output and