All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
@ 2018-01-30 13:21 Geert Uytterhoeven
  2018-01-30 15:03   ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-01-30 13:21 UTC (permalink / raw)
  To: Jonathan Cameron, Arnaud Pouliquen, Mark Brown
  Cc: linux-iio, alsa-devel, linux-kernel, Geert Uytterhoeven

If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!

Add a dependency on HAS_DMA to fix this.

Fixes: e2e6771c64625165 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/iio/adc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 39e3b345a6c84033..d976c64107c8e9fd 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -683,6 +683,7 @@ config STM32_DFSDM_CORE
 config STM32_DFSDM_ADC
 	tristate "STMicroelectronics STM32 dfsdm adc"
 	depends on (ARCH_STM32 && OF) || COMPILE_TEST
+	depends on HAS_DMA
 	select STM32_DFSDM_CORE
 	select REGMAP_MMIO
 	select IIO_BUFFER_HW_CONSUMER
-- 
2.7.4

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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
  2018-01-30 13:21 [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA Geert Uytterhoeven
@ 2018-01-30 15:03   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-01-30 15:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jonathan Cameron, Arnaud Pouliquen, linux-iio, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
> If NO_DMA=y:
> 
>     ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
> 
> Add a dependency on HAS_DMA to fix this.

Once again I have to ask why we're doing this per driver and not having
the few architectures that have this issue set something up.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
@ 2018-01-30 15:03   ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-01-30 15:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-iio, alsa-devel, Arnaud Pouliquen, linux-kernel, Jonathan Cameron


[-- Attachment #1.1: Type: text/plain, Size: 350 bytes --]

On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
> If NO_DMA=y:
> 
>     ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
> 
> Add a dependency on HAS_DMA to fix this.

Once again I have to ask why we're doing this per driver and not having
the few architectures that have this issue set something up.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
@ 2018-01-30 15:31     ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-01-30 15:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jonathan Cameron, Arnaud Pouliquen, linux-iio,
	ALSA Development Mailing List, Linux Kernel Mailing List

Hi Mark,

On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>>
>>     ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
>>
>> Add a dependency on HAS_DMA to fix this.
>
> Once again I have to ask why we're doing this per driver and not having
> the few architectures that have this issue set something up.

Because doing so would lead us to

    depends on COMPILE_TEST || HAS_DMA

in many places. Is that any better?

I agree we could indeed use DMA dummies in cases where a driver uses:

   depends on ARCH_FOO || ARCH_BAR || COMPILE_TEST
   depends on HAS_DMA

But we also have generic options like:

    config ATA_BMDMA
            bool "ATA BMDMA support"
            depends on HAS_DMA

And even architecture-specific drivers for SoCs that may or not have DMA:

config HASH_DEV_STM32
        tristate "Support for STM32 hash accelerators"
        depends on ARCH_STM32
        depends on HAS_DMA

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
@ 2018-01-30 15:31     ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-01-30 15:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jonathan Cameron, Arnaud Pouliquen,
	linux-iio-u79uwXL29TY76Z2rM5mHXA, ALSA Development Mailing List,
	Linux Kernel Mailing List

Hi Mark,

On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Tue, Jan 30, 2018 at 02:21:46PM +0100, Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>>
>>     ERROR: "bad_dma_ops" [drivers/iio/adc/stm32-dfsdm-adc.ko] undefined!
>>
>> Add a dependency on HAS_DMA to fix this.
>
> Once again I have to ask why we're doing this per driver and not having
> the few architectures that have this issue set something up.

Because doing so would lead us to

    depends on COMPILE_TEST || HAS_DMA

in many places. Is that any better?

I agree we could indeed use DMA dummies in cases where a driver uses:

   depends on ARCH_FOO || ARCH_BAR || COMPILE_TEST
   depends on HAS_DMA

But we also have generic options like:

    config ATA_BMDMA
            bool "ATA BMDMA support"
            depends on HAS_DMA

And even architecture-specific drivers for SoCs that may or not have DMA:

config HASH_DEV_STM32
        tristate "Support for STM32 hash accelerators"
        depends on ARCH_STM32
        depends on HAS_DMA

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
  2018-01-30 15:31     ` Geert Uytterhoeven
@ 2018-01-30 16:35       ` Mark Brown
  -1 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-01-30 16:35 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jonathan Cameron, Arnaud Pouliquen, linux-iio,
	ALSA Development Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

On Tue, Jan 30, 2018 at 04:31:24PM +0100, Geert Uytterhoeven wrote:
> On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown <broonie@kernel.org> wrote:

> > Once again I have to ask why we're doing this per driver and not having
> > the few architectures that have this issue set something up.

> Because doing so would lead us to

>     depends on COMPILE_TEST || HAS_DMA

> in many places. Is that any better?

Honestly I'd just not have any dependency here, I'm not sure the DMA
dependencies are really covering a good percentage of what's really
likely to be found on these platforms.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA
@ 2018-01-30 16:35       ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2018-01-30 16:35 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-iio, ALSA Development Mailing List, Arnaud Pouliquen,
	Linux Kernel Mailing List, Jonathan Cameron


[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]

On Tue, Jan 30, 2018 at 04:31:24PM +0100, Geert Uytterhoeven wrote:
> On Tue, Jan 30, 2018 at 4:03 PM, Mark Brown <broonie@kernel.org> wrote:

> > Once again I have to ask why we're doing this per driver and not having
> > the few architectures that have this issue set something up.

> Because doing so would lead us to

>     depends on COMPILE_TEST || HAS_DMA

> in many places. Is that any better?

Honestly I'd just not have any dependency here, I'm not sure the DMA
dependencies are really covering a good percentage of what's really
likely to be found on these platforms.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2018-01-30 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 13:21 [PATCH] iio: adc: STM32_DFSDM_ADC should depend on HAS_DMA Geert Uytterhoeven
2018-01-30 15:03 ` Mark Brown
2018-01-30 15:03   ` Mark Brown
2018-01-30 15:31   ` Geert Uytterhoeven
2018-01-30 15:31     ` Geert Uytterhoeven
2018-01-30 16:35     ` Mark Brown
2018-01-30 16:35       ` Mark Brown

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.