public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies
@ 2022-12-15 16:52 Arnd Bergmann
  2022-12-18 14:22 ` Serge Semin
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2022-12-15 16:52 UTC (permalink / raw)
  To: Mark Brown, Serge Semin, Ramil Zaripov
  Cc: Arnd Bergmann, linux-spi, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting a symbol with additional dependencies requires
adding the same dependency here:

WARNING: unmet direct dependencies detected for MUX_MMIO
  Depends on [n]: MULTIPLEXER [=y] && OF [=n]
  Selected by [y]:
  - SPI_DW_BT1 [=y] && SPI [=y] && SPI_MASTER [=y] && SPI_DESIGNWARE [=y] && (MIPS_BAIKAL_T1 || COMPILE_TEST [=y])

Alternatively, we could drop this 'select' and require users to manually
put it into their .config as we do for other drivers.

Fixes: 7218838109fe ("spi: dw-bt1: Fix undefined devm_mux_control_get symbol")
Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/spi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 3b1c0878bb85..1884e4083088 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -294,6 +294,7 @@ config SPI_DW_MMIO
 config SPI_DW_BT1
 	tristate "Baikal-T1 SPI driver for DW SPI core"
 	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
+	depends on OF
 	select MULTIPLEXER
 	select MUX_MMIO
 	help
-- 
2.35.1


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

* Re: [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies
  2022-12-15 16:52 [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies Arnd Bergmann
@ 2022-12-18 14:22 ` Serge Semin
  2022-12-18 17:56   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Serge Semin @ 2022-12-18 14:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Serge Semin, Ramil Zaripov, Arnd Bergmann, linux-spi,
	linux-kernel

Hi Arnd

On Thu, Dec 15, 2022 at 05:52:34PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Selecting a symbol with additional dependencies requires
> adding the same dependency here:
> 
> WARNING: unmet direct dependencies detected for MUX_MMIO
>   Depends on [n]: MULTIPLEXER [=y] && OF [=n]
>   Selected by [y]:
>   - SPI_DW_BT1 [=y] && SPI [=y] && SPI_MASTER [=y] && SPI_DESIGNWARE [=y] && (MIPS_BAIKAL_T1 || COMPILE_TEST [=y])
> 
> Alternatively, we could drop this 'select' and require users to manually
> put it into their .config as we do for other drivers.

Thanks for the patch. Seeing the driver is only implicitly dependent
from the mux-mmio driver (via the device described in the device tree
blob) I'd suggest to either drop the MUX_MMIO config reverse
dependency or convert it to the weak one - 'imply' (if it will solve
the problem).

-Serge(y)

> 
> Fixes: 7218838109fe ("spi: dw-bt1: Fix undefined devm_mux_control_get symbol")
> Fixes: abf00907538e ("spi: dw: Add Baikal-T1 SPI Controller glue driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/spi/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 3b1c0878bb85..1884e4083088 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -294,6 +294,7 @@ config SPI_DW_MMIO
>  config SPI_DW_BT1
>  	tristate "Baikal-T1 SPI driver for DW SPI core"
>  	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
> +	depends on OF
>  	select MULTIPLEXER
>  	select MUX_MMIO
>  	help
> -- 
> 2.35.1
> 

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

* Re: [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies
  2022-12-18 14:22 ` Serge Semin
@ 2022-12-18 17:56   ` Arnd Bergmann
  2022-12-18 19:25     ` Serge Semin
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2022-12-18 17:56 UTC (permalink / raw)
  To: Serge Semin, Arnd Bergmann
  Cc: Mark Brown, Serge Semin, Ramil Zaripov, linux-spi, linux-kernel

On Sun, Dec 18, 2022, at 15:22, Serge Semin wrote:
> Hi Arnd
>
> On Thu, Dec 15, 2022 at 05:52:34PM +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> Selecting a symbol with additional dependencies requires
>> adding the same dependency here:
>> 
>> WARNING: unmet direct dependencies detected for MUX_MMIO
>>   Depends on [n]: MULTIPLEXER [=y] && OF [=n]
>>   Selected by [y]:
>>   - SPI_DW_BT1 [=y] && SPI [=y] && SPI_MASTER [=y] && SPI_DESIGNWARE [=y] && (MIPS_BAIKAL_T1 || COMPILE_TEST [=y])
>> 
>> Alternatively, we could drop this 'select' and require users to manually
>> put it into their .config as we do for other drivers.
>
> Thanks for the patch. Seeing the driver is only implicitly dependent
> from the mux-mmio driver (via the device described in the device tree
> blob) I'd suggest to either drop the MUX_MMIO config reverse
> dependency or convert it to the weak one - 'imply' (if it will solve
> the problem).

Ok, I'll send a new patch. I don't want to use 'imply' though, that
tends to cause other problems because almost nobody understands what
it actually does.

      Arnd

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

* Re: [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies
  2022-12-18 17:56   ` Arnd Bergmann
@ 2022-12-18 19:25     ` Serge Semin
  0 siblings, 0 replies; 4+ messages in thread
From: Serge Semin @ 2022-12-18 19:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Mark Brown, Serge Semin, Ramil Zaripov, linux-spi,
	linux-kernel

On Sun, Dec 18, 2022 at 06:56:24PM +0100, Arnd Bergmann wrote:
> On Sun, Dec 18, 2022, at 15:22, Serge Semin wrote:
> > Hi Arnd
> >
> > On Thu, Dec 15, 2022 at 05:52:34PM +0100, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@arndb.de>
> >> 
> >> Selecting a symbol with additional dependencies requires
> >> adding the same dependency here:
> >> 
> >> WARNING: unmet direct dependencies detected for MUX_MMIO
> >>   Depends on [n]: MULTIPLEXER [=y] && OF [=n]
> >>   Selected by [y]:
> >>   - SPI_DW_BT1 [=y] && SPI [=y] && SPI_MASTER [=y] && SPI_DESIGNWARE [=y] && (MIPS_BAIKAL_T1 || COMPILE_TEST [=y])
> >> 
> >> Alternatively, we could drop this 'select' and require users to manually
> >> put it into their .config as we do for other drivers.
> >
> > Thanks for the patch. Seeing the driver is only implicitly dependent
> > from the mux-mmio driver (via the device described in the device tree
> > blob) I'd suggest to either drop the MUX_MMIO config reverse
> > dependency or convert it to the weak one - 'imply' (if it will solve
> > the problem).
> 

> Ok, I'll send a new patch. I don't want to use 'imply' though, that
> tends to cause other problems because almost nobody understands what
> it actually does.

Ok. Dropping it will be also suitable solution. I'll make sure our
defconfigs will be updated afterwards.

-Serge(y)

> 
>       Arnd

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

end of thread, other threads:[~2022-12-18 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 16:52 [PATCH] spi: dw_bt1: fix MUX_MMIO dependencies Arnd Bergmann
2022-12-18 14:22 ` Serge Semin
2022-12-18 17:56   ` Arnd Bergmann
2022-12-18 19:25     ` Serge Semin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox