mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
	linux-sound@vger.kernel.org, linux-spi@vger.kernel.org,
	"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
	"Amélie Delaunay" <amelie.delaunay@foss.st.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v4 01/10] dmaengine: Move enum dma_slave_buswidth to a new header
Date: Mon, 14 Sep 2026 16:40:45 +0100	[thread overview]
Message-ID: <aqgVSNnyXZQpsqYn@nsa> (raw)
In-Reply-To: <aqgCQvRw9fns__0d@SMW015318>

On Mon, Sep 14, 2026 at 09:18:42AM -0500, Frank Li wrote:
> On Fri, Sep 11, 2026 at 06:25:36PM +0100, Nuno Sá wrote:
> > In preparation for the bitmap based bus width capabilities, move
> > enum dma_slave_buswidth out of linux/dmaengine.h into a new
> > include/linux/dma/engine/types.h.
> >
> > linux/dmaengine.h is included nearly everywhere, so growing it with the
> > new interface would make every one of its users pay for it. Keeping the
> > basic types in a separate header lets the new interface live next to it
> > without that cost. linux/dmaengine.h includes the new header, so its
> > users are unaffected.
> >
> > While at it, add the missing kernel-doc for the enum members. The block
> > already opened with /**, so kernel-doc expected every member to be
> > described and warned about each one of them. Describe the UNDEFINED case
> > in particular, as its meaning depends on where the value is used.
> >
> > No functional change intended.
> >
> > Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> >  include/linux/dma/engine/types.h | 41 ++++++++++++++++++++++++++++++++++++++++
> >  include/linux/dmaengine.h        | 20 +++-----------------
> 
> I think it is good to split dmengine consumer and provider header files to
> hidden dmaengine's detail.
> 

Makes sense but that is a much bigger effort. Hopefully that does not
block the current split (series)?

- Nuno Sá

> suggest name
> 	dma/engine.h
> 
> so we can start move more API to this files.
> 
> after all user include this consumer header file,  old
> include/linux/dmaengine.h rename to include/linux/dmaengine-provider.h,
> which only include by dmaengine drivers.
> 
> Frank
> 
> >  2 files changed, 44 insertions(+), 17 deletions(-)
> >
> > diff --git a/include/linux/dma/engine/types.h b/include/linux/dma/engine/types.h
> > new file mode 100644
> > index 000000000000..2e8a266e42ef
> > --- /dev/null
> > +++ b/include/linux/dma/engine/types.h
> > @@ -0,0 +1,41 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > +/*
> > + * Basic types shared by the DMA engine interfaces.
> > + */
> > +#ifndef LINUX_DMA_ENGINE_TYPES_H
> > +#define LINUX_DMA_ENGINE_TYPES_H
> > +
> > +#include <linux/types.h>
> > +
> > +/**
> > + * enum dma_slave_buswidth - defines bus width of the DMA slave
> > + * device, source or target buses
> > + * @DMA_SLAVE_BUSWIDTH_UNDEFINED: no bus width specified. In a
> > + *	&struct dma_slave_config it lets the controller pick a width, typically
> > + *	derived from the transfer itself. In a bus width mask it is a width a
> > + *	controller genuinely accepts, meaning it imposes no constraint of its
> > + *	own.
> > + * @DMA_SLAVE_BUSWIDTH_1_BYTE: 1 byte wide bus
> > + * @DMA_SLAVE_BUSWIDTH_2_BYTES: 2 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_3_BYTES: 3 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_4_BYTES: 4 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_8_BYTES: 8 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_16_BYTES: 16 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_32_BYTES: 32 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_64_BYTES: 64 bytes wide bus
> > + * @DMA_SLAVE_BUSWIDTH_128_BYTES: 128 bytes wide bus
> > + */
> > +enum dma_slave_buswidth {
> > +	DMA_SLAVE_BUSWIDTH_UNDEFINED = 0,
> > +	DMA_SLAVE_BUSWIDTH_1_BYTE = 1,
> > +	DMA_SLAVE_BUSWIDTH_2_BYTES = 2,
> > +	DMA_SLAVE_BUSWIDTH_3_BYTES = 3,
> > +	DMA_SLAVE_BUSWIDTH_4_BYTES = 4,
> > +	DMA_SLAVE_BUSWIDTH_8_BYTES = 8,
> > +	DMA_SLAVE_BUSWIDTH_16_BYTES = 16,
> > +	DMA_SLAVE_BUSWIDTH_32_BYTES = 32,
> > +	DMA_SLAVE_BUSWIDTH_64_BYTES = 64,
> > +	DMA_SLAVE_BUSWIDTH_128_BYTES = 128,
> > +};
> > +
> > +#endif /* LINUX_DMA_ENGINE_TYPES_H */
> > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> > index fe33a20abc61..573e5ea34707 100644
> > --- a/include/linux/dmaengine.h
> > +++ b/include/linux/dmaengine.h
> > @@ -12,6 +12,9 @@
> >  #include <linux/scatterlist.h>
> >  #include <linux/bitmap.h>
> >  #include <linux/types.h>
> > +
> > +#include <linux/dma/engine/types.h>
> > +
> >  #include <asm/page.h>
> >
> >  /**
> > @@ -384,23 +387,6 @@ struct dma_chan_dev {
> >  	bool chan_dma_dev;
> >  };
> >
> > -/**
> > - * enum dma_slave_buswidth - defines bus width of the DMA slave
> > - * device, source or target buses
> > - */
> > -enum dma_slave_buswidth {
> > -	DMA_SLAVE_BUSWIDTH_UNDEFINED = 0,
> > -	DMA_SLAVE_BUSWIDTH_1_BYTE = 1,
> > -	DMA_SLAVE_BUSWIDTH_2_BYTES = 2,
> > -	DMA_SLAVE_BUSWIDTH_3_BYTES = 3,
> > -	DMA_SLAVE_BUSWIDTH_4_BYTES = 4,
> > -	DMA_SLAVE_BUSWIDTH_8_BYTES = 8,
> > -	DMA_SLAVE_BUSWIDTH_16_BYTES = 16,
> > -	DMA_SLAVE_BUSWIDTH_32_BYTES = 32,
> > -	DMA_SLAVE_BUSWIDTH_64_BYTES = 64,
> > -	DMA_SLAVE_BUSWIDTH_128_BYTES = 128,
> > -};
> > -
> >  /**
> >   * struct dma_slave_config - dma slave channel runtime config
> >   * @direction: whether the data shall go in or out on this slave
> >
> > --
> > 2.55.0
> >

  reply	other threads:[~2026-09-14 15:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 17:25 [PATCH v4 00/10] dmaengine: Support bus widths of 32 bytes and above Nuno Sá
2026-09-11 17:25 ` [PATCH v4 01/10] dmaengine: Move enum dma_slave_buswidth to a new header Nuno Sá
2026-09-12  7:57   ` Andy Shevchenko
2026-09-14 14:18   ` Frank Li
2026-09-14 15:40     ` Nuno Sá [this message]
2026-09-15  7:29     ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 02/10] dmaengine: Support bus widths of 32 bytes and above Nuno Sá
2026-09-14  8:05   ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 03/10] dmaengine: dma-axi-dmac: Use bus width capability helpers Nuno Sá
2026-09-11 17:25 ` [PATCH v4 04/10] dmaengine: dw-axi-dmac: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 05/10] dmaengine: qcom: gpi: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 06/10] dmaengine: stm32-dma3: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 07/10] iio: buffer-dmaengine: Use dma_slave_caps bus width accessors Nuno Sá
2026-09-14  8:06   ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 08/10] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers Nuno Sá
2026-09-14  8:12   ` Andy Shevchenko
2026-09-14 15:39     ` Nuno Sá
2026-09-15  7:31       ` Andy Shevchenko
2026-09-11 17:25 ` [PATCH v4 09/10] spi: dw: " Nuno Sá
2026-09-11 17:25 ` [PATCH v4 10/10] dmaengine: Drop legacy bus width fields from dma_slave_caps Nuno Sá

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqgVSNnyXZQpsqYn@nsa \
    --to=nuno.sa@analog.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Frank.Li@kernel.org \
    --cc=Frank.li@oss.nxp.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®