Skip to contentSkip to conversation

mfd randconfig fixes

PATCH Applied Arnd Bergmann 2 participants 7 messages Jun 5, 2014 – Jun 6, 2014 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

cover mfd randconfig fixes

Hi Samuel and Lee,

Here are three small bug fixes for problems I found during randconfig testing in MFD. Please apply to an appropriate tree.

Arnd Bergmann (3):
mfd: UCB1x00: enable modular build
mfd: davinci voicecodec need regmap_mmio
mfd: STw481x: allow modular build

 drivers/mfd/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/3 mfd: UCB1x00: enable modular build

The UCB1200 / UCB1300 driver uses the MCP_SA11X0 driver, which can be a loadable module, but this results in a link error when UCB1200 itself is built-in:

drivers/built-in.o: In function `ucb1x00_io_set_dir':
:(.text+0x4a364): undefined reference to mcp_reg_write' drivers/built-in.o: In function ucb1x00_io_write':
:(.text+0x4a3dc): undefined reference to mcp_reg_write' drivers/built-in.o: In function ucb1x00_io_read':
:(.text+0x4a400): undefined reference to mcp_reg_read' drivers/built-in.o: In function ucb1x00_adc_enable':
:(.text+0x4a460): undefined reference to `mcp_enable'
...

This can easily be resolved by making CONFIG_MCP_UCB1200 itself a tristate option, since that causes Kconfig to track the dependency correctly.

---
 drivers/mfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/Kconfig +1 -1
index ee8204c..4370692 100644
@@ -1248,7 +1248,7 @@ config MCP_SA11X0
 
 # Chip drivers
 config MCP_UCB1200
-	bool "Support for UCB1200 / UCB1300"
+	tristate "Support for UCB1200 / UCB1300"
 	depends on MCP_SA11X0
 	select MCP
 
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 2/3 mfd: davinci voicecodec need regmap_mmio

In reply to Arnd Bergmann

Without REGMAP_MMIO, building that driver results in a link error:

drivers/built-in.o: In function `davinci_vc_probe':
:(.init.text+0x3c1c): undefined reference to `devm_regmap_init_mmio_clk'

This adds a Kconfig 'select' statement as the usual way to ensure that REGMAP_MMIO is enabled.

---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/Kconfig +1 -0
index 4370692..2dd838f 100644
@@ -760,6 +760,7 @@ config MFD_SYSCON
 config MFD_DAVINCI_VOICECODEC
 	tristate
 	select MFD_CORE
+	select REGMAP_MMIO
 
 config MFD_TI_AM335X_TSCADC
 	tristate "TI ADC / Touch Screen chip support"
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH 3/3 mfd: STw481x: allow modular build

In reply to Arnd Bergmann

This driver depends on I2C, which may be a loadable module. While you'd probably want both to be built-in in practice, allowing a modular build avoids possible randconfig link errors.

---
 drivers/mfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/Kconfig +1 -1
index 2dd838f..6cc4b6a 100644
@@ -1226,7 +1226,7 @@ config MFD_WM8994
 	  functionaltiy of the device other drivers must be enabled.
 
 config MFD_STW481X
-	bool "Support for ST Microelectronics STw481x"
+	tristate "Support for ST Microelectronics STw481x"
 	depends on I2C && ARCH_NOMADIK
 	select REGMAP_I2C
 	select MFD_CORE
Signature · 1 line
1.8.3.2
Applied
#2 lore raw

Re: [PATCH 1/3] mfd: UCB1x00: enable modular build

In reply to Arnd Bergmann
Quoted 14 lines

The UCB1200 / UCB1300 driver uses the MCP_SA11X0 driver, which can be a loadable module, but this results in a link error when UCB1200 itself is built-in:

drivers/built-in.o: In function `ucb1x00_io_set_dir':
:(.text+0x4a364): undefined reference to mcp_reg_write' drivers/built-in.o: In function ucb1x00_io_write':
:(.text+0x4a3dc): undefined reference to mcp_reg_write' drivers/built-in.o: In function ucb1x00_io_read':
:(.text+0x4a400): undefined reference to mcp_reg_read' drivers/built-in.o: In function ucb1x00_adc_enable':
:(.text+0x4a460): undefined reference to `mcp_enable'
...

Quoted 8 lines

This can easily be resolved by making CONFIG_MCP_UCB1200 itself a tristate option, since that causes Kconfig to track the dependency correctly.

---
 drivers/mfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Quoted 13 lines
drivers/mfd/Kconfig +1 -1
index ee8204c..4370692 100644
@@ -1248,7 +1248,7 @@ config MCP_SA11X0
 
 # Chip drivers
 config MCP_UCB1200
-	bool "Support for UCB1200 / UCB1300"
+	tristate "Support for UCB1200 / UCB1300"
 	depends on MCP_SA11X0
 	select MCP
 
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#4 lore raw

Re: [PATCH 2/3] mfd: davinci voicecodec need regmap_mmio

In reply to Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

Without REGMAP_MMIO, building that driver results in a link error:

drivers/built-in.o: In function `davinci_vc_probe':
:(.init.text+0x3c1c): undefined reference to `devm_regmap_init_mmio_clk'

Quoted 7 lines

This adds a Kconfig 'select' statement as the usual way to ensure that REGMAP_MMIO is enabled.

---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Quoted 12 lines
drivers/mfd/Kconfig +1 -0
index 4370692..2dd838f 100644
@@ -760,6 +760,7 @@ config MFD_SYSCON
 config MFD_DAVINCI_VOICECODEC
 	tristate
 	select MFD_CORE
+	select REGMAP_MMIO
 
 config MFD_TI_AM335X_TSCADC
 	tristate "TI ADC / Touch Screen chip support"
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#6 lore raw

Re: [PATCH 3/3] mfd: STw481x: allow modular build

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

This driver depends on I2C, which may be a loadable module. While you'd probably want both to be built-in in practice, allowing a modular build avoids possible randconfig link errors.

---
 drivers/mfd/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Quoted 13 lines
drivers/mfd/Kconfig +1 -1
index 2dd838f..6cc4b6a 100644
@@ -1226,7 +1226,7 @@ config MFD_WM8994
 	  functionaltiy of the device other drivers must be enabled.
 
 config MFD_STW481X
-	bool "Support for ST Microelectronics STw481x"
+	tristate "Support for ST Microelectronics STw481x"
 	depends on I2C && ARCH_NOMADIK
 	select REGMAP_I2C
 	select MFD_CORE
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog