Thread (5 messages) 5 messages, 3 authors, 2021-11-14
STALE1689d

[PATCH v2] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors

From: Randy Dunlap <hidden>
Date: 2021-11-10 02:38:09
Also in: linux-iio, lkml

MIPS does not always provide clk*() interfaces and there are no
always-present stubs for them, so depending on "MIPS || COMPILE_TEST"
is not strong enough to prevent build errors.

Likewise MACH_INGENIC_SOC || COMPILE_TEST is not strong enough
since if only COMPILE_TEST=y (with some other MIPS MACH_ or CPU or
BOARD setting), there are still the same build errors.

It looks like depending on MACH_INGENIC is the only thing that is
sufficient here in order to prevent build errors.

mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'

Fixes: 1a78daea107d ("IIO: add Ingenic JZ47xx ADC driver.")
Signed-off-by: Randy Dunlap <redacted>
Reported-by: kernel test robot <redacted>
Cc: Artur Rojek <redacted>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: linux-mips@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andy Shevchenko <redacted>
---
v2: use MACH_INGENIC instead of MACH_INGENIC_SOC (thanks, Paul)

 drivers/iio/adc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20211105.orig/drivers/iio/adc/Kconfig
+++ linux-next-20211105/drivers/iio/adc/Kconfig
@@ -501,7 +501,7 @@ config INA2XX_ADC
 
 config INGENIC_ADC
 	tristate "Ingenic JZ47xx SoCs ADC driver"
-	depends on MIPS || COMPILE_TEST
+	depends on MACH_INGENIC
 	select IIO_BUFFER
 	help
 	  Say yes here to build support for the Ingenic JZ47xx SoCs ADC unit.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help