All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies
@ 2019-01-21 14:11 Jarkko Nikula
  2019-01-21 22:35 ` Randy Dunlap
  2019-01-30 13:09 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Jarkko Nikula @ 2019-01-21 14:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Lee Jones, Randy Dunlap, Hans de Goede, Rajmohan Mani, linux-i2c,
	Jarkko Nikula, Stable

INTEL_SOC_PMIC, INTEL_SOC_PMIC_CHTWC and MFD_TPS68470 select the
I2C_DESIGNWARE_PLATFORM without its dependencies making it possible to see
warning and build error like below:

WARNING: unmet direct dependencies detected for I2C_DESIGNWARE_PLATFORM
  Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ACPI [=y] && COMMON_CLK [=n] || !ACPI [=y])
  Selected by [y]:
  - MFD_TPS68470 [=y] && HAS_IOMEM [=y] && ACPI [=y] && I2C [=y]=y

/usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_resume':
i2c-designware-platdrv.c:(.text+0x62): undefined reference to `i2c_dw_prepare_clk'
/usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_suspend':
i2c-designware-platdrv.c:(.text+0x9a): undefined reference to `i2c_dw_prepare_clk'
/usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_probe':
i2c-designware-platdrv.c:(.text+0x41c): undefined reference to `i2c_dw_prepare_clk'
/usr/bin/ld: i2c-designware-platdrv.c:(.text+0x438): undefined reference to `i2c_dw_read_comp_param'
/usr/bin/ld: i2c-designware-platdrv.c:(.text+0x545): undefined reference to `i2c_dw_probe'
/usr/bin/ld: i2c-designware-platdrv.c:(.text+0x727): undefined reference to `i2c_dw_probe_slave'

Fix this by making above options to depend on I2C_DESIGNWARE_PLATFORM
being built-in. I2C_DESIGNWARE_PLATFORM is a visible symbol with
dependencies so in general the select should be avoided.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: acebcff9eda8 ("mfd: intel_soc_pmic: Select designware i2c-bus driver")
Fixes: de85d79f4aab ("mfd: Add Cherry Trail Whiskey Cove PMIC driver")
Fixes: 9bbf6a15ce19 ("mfd: Add support for TPS68470 device")
Cc: Stable <stable@vger.kernel.org> # v4.14+
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/mfd/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index f461460a2aeb..6a84a8ecd4a9 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -519,10 +519,10 @@ config INTEL_SOC_PMIC
 	bool "Support for Crystal Cove PMIC"
 	depends on ACPI && HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK
 	depends on X86 || COMPILE_TEST
+	depends on I2C_DESIGNWARE_PLATFORM=y
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ
-	select I2C_DESIGNWARE_PLATFORM
 	help
 	  Select this option to enable support for Crystal Cove PMIC
 	  on some Intel SoC systems. The PMIC provides ADC, GPIO,
@@ -548,10 +548,10 @@ config INTEL_SOC_PMIC_CHTWC
 	bool "Support for Intel Cherry Trail Whiskey Cove PMIC"
 	depends on ACPI && HAS_IOMEM && I2C=y && COMMON_CLK
 	depends on X86 || COMPILE_TEST
+	depends on I2C_DESIGNWARE_PLATFORM=y
 	select MFD_CORE
 	select REGMAP_I2C
 	select REGMAP_IRQ
-	select I2C_DESIGNWARE_PLATFORM
 	help
 	  Select this option to enable support for the Intel Cherry Trail
 	  Whiskey Cove PMIC found on some Intel Cherry Trail systems.
@@ -1420,9 +1420,9 @@ config MFD_TPS65217
 config MFD_TPS68470
 	bool "TI TPS68470 Power Management / LED chips"
 	depends on ACPI && I2C=y
+	depends on I2C_DESIGNWARE_PLATFORM=y
 	select MFD_CORE
 	select REGMAP_I2C
-	select I2C_DESIGNWARE_PLATFORM
 	help
 	  If you say yes here you get support for the TPS68470 series of
 	  Power Management / LED chips.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies
  2019-01-21 14:11 [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies Jarkko Nikula
@ 2019-01-21 22:35 ` Randy Dunlap
  2019-01-30 13:09 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2019-01-21 22:35 UTC (permalink / raw)
  To: Jarkko Nikula, linux-kernel
  Cc: Lee Jones, Hans de Goede, Rajmohan Mani, linux-i2c, Stable

On 1/21/19 6:11 AM, Jarkko Nikula wrote:
> INTEL_SOC_PMIC, INTEL_SOC_PMIC_CHTWC and MFD_TPS68470 select the
> I2C_DESIGNWARE_PLATFORM without its dependencies making it possible to see
> warning and build error like below:
> 
> WARNING: unmet direct dependencies detected for I2C_DESIGNWARE_PLATFORM
>   Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ACPI [=y] && COMMON_CLK [=n] || !ACPI [=y])
>   Selected by [y]:
>   - MFD_TPS68470 [=y] && HAS_IOMEM [=y] && ACPI [=y] && I2C [=y]=y
> 
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_resume':
> i2c-designware-platdrv.c:(.text+0x62): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_suspend':
> i2c-designware-platdrv.c:(.text+0x9a): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_probe':
> i2c-designware-platdrv.c:(.text+0x41c): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x438): undefined reference to `i2c_dw_read_comp_param'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x545): undefined reference to `i2c_dw_probe'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x727): undefined reference to `i2c_dw_probe_slave'
> 
> Fix this by making above options to depend on I2C_DESIGNWARE_PLATFORM
> being built-in. I2C_DESIGNWARE_PLATFORM is a visible symbol with
> dependencies so in general the select should be avoided.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: acebcff9eda8 ("mfd: intel_soc_pmic: Select designware i2c-bus driver")
> Fixes: de85d79f4aab ("mfd: Add Cherry Trail Whiskey Cove PMIC driver")
> Fixes: 9bbf6a15ce19 ("mfd: Add support for TPS68470 device")
> Cc: Stable <stable@vger.kernel.org> # v4.14+
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/mfd/Kconfig | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index f461460a2aeb..6a84a8ecd4a9 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -519,10 +519,10 @@ config INTEL_SOC_PMIC
>  	bool "Support for Crystal Cove PMIC"
>  	depends on ACPI && HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK
>  	depends on X86 || COMPILE_TEST
> +	depends on I2C_DESIGNWARE_PLATFORM=y
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> -	select I2C_DESIGNWARE_PLATFORM
>  	help
>  	  Select this option to enable support for Crystal Cove PMIC
>  	  on some Intel SoC systems. The PMIC provides ADC, GPIO,
> @@ -548,10 +548,10 @@ config INTEL_SOC_PMIC_CHTWC
>  	bool "Support for Intel Cherry Trail Whiskey Cove PMIC"
>  	depends on ACPI && HAS_IOMEM && I2C=y && COMMON_CLK
>  	depends on X86 || COMPILE_TEST
> +	depends on I2C_DESIGNWARE_PLATFORM=y
>  	select MFD_CORE
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> -	select I2C_DESIGNWARE_PLATFORM
>  	help
>  	  Select this option to enable support for the Intel Cherry Trail
>  	  Whiskey Cove PMIC found on some Intel Cherry Trail systems.
> @@ -1420,9 +1420,9 @@ config MFD_TPS65217
>  config MFD_TPS68470
>  	bool "TI TPS68470 Power Management / LED chips"
>  	depends on ACPI && I2C=y
> +	depends on I2C_DESIGNWARE_PLATFORM=y
>  	select MFD_CORE
>  	select REGMAP_I2C
> -	select I2C_DESIGNWARE_PLATFORM
>  	help
>  	  If you say yes here you get support for the TPS68470 series of
>  	  Power Management / LED chips.
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies
  2019-01-21 14:11 [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies Jarkko Nikula
  2019-01-21 22:35 ` Randy Dunlap
@ 2019-01-30 13:09 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2019-01-30 13:09 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-kernel, Randy Dunlap, Hans de Goede, Rajmohan Mani,
	linux-i2c, Stable

On Mon, 21 Jan 2019, Jarkko Nikula wrote:

> INTEL_SOC_PMIC, INTEL_SOC_PMIC_CHTWC and MFD_TPS68470 select the
> I2C_DESIGNWARE_PLATFORM without its dependencies making it possible to see
> warning and build error like below:
> 
> WARNING: unmet direct dependencies detected for I2C_DESIGNWARE_PLATFORM
>   Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ACPI [=y] && COMMON_CLK [=n] || !ACPI [=y])
>   Selected by [y]:
>   - MFD_TPS68470 [=y] && HAS_IOMEM [=y] && ACPI [=y] && I2C [=y]=y
> 
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_resume':
> i2c-designware-platdrv.c:(.text+0x62): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_suspend':
> i2c-designware-platdrv.c:(.text+0x9a): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: drivers/i2c/busses/i2c-designware-platdrv.o: in function `dw_i2c_plat_probe':
> i2c-designware-platdrv.c:(.text+0x41c): undefined reference to `i2c_dw_prepare_clk'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x438): undefined reference to `i2c_dw_read_comp_param'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x545): undefined reference to `i2c_dw_probe'
> /usr/bin/ld: i2c-designware-platdrv.c:(.text+0x727): undefined reference to `i2c_dw_probe_slave'
> 
> Fix this by making above options to depend on I2C_DESIGNWARE_PLATFORM
> being built-in. I2C_DESIGNWARE_PLATFORM is a visible symbol with
> dependencies so in general the select should be avoided.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: acebcff9eda8 ("mfd: intel_soc_pmic: Select designware i2c-bus driver")
> Fixes: de85d79f4aab ("mfd: Add Cherry Trail Whiskey Cove PMIC driver")
> Fixes: 9bbf6a15ce19 ("mfd: Add support for TPS68470 device")
> Cc: Stable <stable@vger.kernel.org> # v4.14+
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>  drivers/mfd/Kconfig | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-30 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 14:11 [PATCH] mfd: Fix I2C_DESIGNWARE_PLATFORM dependencies Jarkko Nikula
2019-01-21 22:35 ` Randy Dunlap
2019-01-30 13:09 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.