diff mbox series

iio: Fix build error for ltc2664

Message ID 20241023082309.1002917-1-ruanjinjie@huawei.com (mailing list archive)
State Handled Elsewhere
Headers show
Series iio: Fix build error for ltc2664 | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 147.51s
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1295.70s
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1499.60s
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 21.09s
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 22.84s
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.41s
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 44.92s
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.00s
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.59s
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.02s
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.03s

Commit Message

Jinjie Ruan Oct. 23, 2024, 8:23 a.m. UTC
If REGMAP_SPI is n and LTC2664 is y, the following build error occurs:

	riscv64-unknown-linux-gnu-ld: drivers/iio/dac/ltc2664.o: in function `ltc2664_probe':
	ltc2664.c:(.text+0x714): undefined reference to `__devm_regmap_init_spi'

Select REGMAP_SPI for LTC2664 to fix it.

Fixes: 4cc2fc445d2e ("iio: dac: ltc2664: Add driver for LTC2664 and LTC2672")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/iio/dac/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Javier Carrasco Oct. 23, 2024, 8:41 a.m. UTC | #1
On 23/10/2024 10:23, Jinjie Ruan wrote:
> If REGMAP_SPI is n and LTC2664 is y, the following build error occurs:
> 
> 	riscv64-unknown-linux-gnu-ld: drivers/iio/dac/ltc2664.o: in function `ltc2664_probe':
> 	ltc2664.c:(.text+0x714): undefined reference to `__devm_regmap_init_spi'
> 
> Select REGMAP_SPI for LTC2664 to fix it.
> 
> Fixes: 4cc2fc445d2e ("iio: dac: ltc2664: Add driver for LTC2664 and LTC2672")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>  drivers/iio/dac/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> index 45e337c6d256..ae6d04c758d1 100644
> --- a/drivers/iio/dac/Kconfig
> +++ b/drivers/iio/dac/Kconfig
> @@ -381,6 +381,7 @@ config LTC2664
>  	tristate "Analog Devices LTC2664 and LTC2672 DAC SPI driver"
>  	depends on SPI
>  	select REGMAP
> +	select REGMAP_SPI

Should you not replace REGMAP with REGMAP_SPI instead?


>  	help
>  	  Say yes here to build support for Analog Devices
>  	  LTC2664 and LTC2672 converters (DAC).


Best regards,
Javier Carrasco
Nuno Sá Oct. 23, 2024, 10:17 a.m. UTC | #2
On Wed, 2024-10-23 at 10:41 +0200, Javier Carrasco wrote:
> On 23/10/2024 10:23, Jinjie Ruan wrote:
> > If REGMAP_SPI is n and LTC2664 is y, the following build error occurs:
> > 
> > 	riscv64-unknown-linux-gnu-ld: drivers/iio/dac/ltc2664.o: in
> > function `ltc2664_probe':
> > 	ltc2664.c:(.text+0x714): undefined reference to
> > `__devm_regmap_init_spi'
> > 
> > Select REGMAP_SPI for LTC2664 to fix it.
> > 
> > Fixes: 4cc2fc445d2e ("iio: dac: ltc2664: Add driver for LTC2664 and
> > LTC2672")
> > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> > ---
> >  drivers/iio/dac/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> > index 45e337c6d256..ae6d04c758d1 100644
> > --- a/drivers/iio/dac/Kconfig
> > +++ b/drivers/iio/dac/Kconfig
> > @@ -381,6 +381,7 @@ config LTC2664
> >  	tristate "Analog Devices LTC2664 and LTC2672 DAC SPI driver"
> >  	depends on SPI
> >  	select REGMAP
> > +	select REGMAP_SPI
> 
> Should you not replace REGMAP with REGMAP_SPI instead?

Yes, I think so... The commit title could also be improved

"iio: dac: kconfig: ..."

With that:

Reviewed-by: Nuno Sa <nuno.sa@analog.com>

> 
> 
> >  	help
> >  	  Say yes here to build support for Analog Devices
> >  	  LTC2664 and LTC2672 converters (DAC).
> 
> 
> Best regards,
> Javier Carrasco
diff mbox series

Patch

diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index 45e337c6d256..ae6d04c758d1 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -381,6 +381,7 @@  config LTC2664
 	tristate "Analog Devices LTC2664 and LTC2672 DAC SPI driver"
 	depends on SPI
 	select REGMAP
+	select REGMAP_SPI
 	help
 	  Say yes here to build support for Analog Devices
 	  LTC2664 and LTC2672 converters (DAC).