All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Fri, 1 Aug 2014 10:57:07 +0200	[thread overview]
Message-ID: <20140801085707.GI3952@lukather> (raw)
In-Reply-To: <53DB490A.5040709@metafoo.de>

On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote:
> On 07/31/2014 07:37 PM, Maxime Ripard wrote:
> >On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote:
> >>On 07/31/2014 06:13 PM, Maxime Ripard wrote:
> >>[...]
> >>> From what you're saying, and judging from the drivers that already
> >>>implement it, can't it be moved directly to the framework itself ?
> >>>
> >>
> >>What exactly do you mean by moving it directly to the framework? The
> >>slave_caps API is part of the DMAengine framework.
> >
> >Not its implementation, which is defined by each and every driver,
> >while the behaviour of device_slave_caps is rather generic.
> >
> 
> Do you mean something like adding a dma_slave_caps struct field to
> the DMA channel that gets initialized when the channel is created
> and then remove the callback? That makes some sense.

I was rather thinking into something like:
  - Splitting device_control into independant functions
  - Then, knowing if you support pause/resume/terminate is trivial:
    either you implement the callback, or you don't
  - Putting the supported width and direction into fields of struct
    dma_device, which can eventually be used by the framework to
    filter out invalid configurations before calling the relevant
    callbacks
  - That would then be trivial to get from the framework, without
    calling any callback

> I think the main reason why we use a callback right now is that in
> earlier revisions of the API it was possible to pass a slave_config
> and the result would be the capabilities of the DMA channel for this
> particular config. But this was dropped before the final version was
> merged upstream.

Ah, that would explain yes.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140801/29c7db8a/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: "Vinod Koul" <vinod.koul@intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
	"Russell King" <linux@arm.linux.org.uk>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Antoine Ténart" <antoine@free-electrons.com>,
	"Thomas Petazzoni" <thomas@free-electrons.com>,
	"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
	"Boris Brezillon" <boris@free-electrons.com>,
	"Matt Porter" <matt.porter@linaro.org>,
	laurent.pinchart@ideasonboard.com, ludovic.desroches@atmel.com,
	"Gregory Clement" <gregory.clement@free-electrons.com>,
	"Nicolas Ferre" <nicolas.ferre@atmel.com>
Subject: Re: [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Fri, 1 Aug 2014 10:57:07 +0200	[thread overview]
Message-ID: <20140801085707.GI3952@lukather> (raw)
In-Reply-To: <53DB490A.5040709@metafoo.de>

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

On Fri, Aug 01, 2014 at 10:00:10AM +0200, Lars-Peter Clausen wrote:
> On 07/31/2014 07:37 PM, Maxime Ripard wrote:
> >On Thu, Jul 31, 2014 at 06:54:11PM +0200, Lars-Peter Clausen wrote:
> >>On 07/31/2014 06:13 PM, Maxime Ripard wrote:
> >>[...]
> >>> From what you're saying, and judging from the drivers that already
> >>>implement it, can't it be moved directly to the framework itself ?
> >>>
> >>
> >>What exactly do you mean by moving it directly to the framework? The
> >>slave_caps API is part of the DMAengine framework.
> >
> >Not its implementation, which is defined by each and every driver,
> >while the behaviour of device_slave_caps is rather generic.
> >
> 
> Do you mean something like adding a dma_slave_caps struct field to
> the DMA channel that gets initialized when the channel is created
> and then remove the callback? That makes some sense.

I was rather thinking into something like:
  - Splitting device_control into independant functions
  - Then, knowing if you support pause/resume/terminate is trivial:
    either you implement the callback, or you don't
  - Putting the supported width and direction into fields of struct
    dma_device, which can eventually be used by the framework to
    filter out invalid configurations before calling the relevant
    callbacks
  - That would then be trivial to get from the framework, without
    calling any callback

> I think the main reason why we use a callback right now is that in
> earlier revisions of the API it was possible to pass a slave_config
> and the result would be the capabilities of the DMA channel for this
> particular config. But this was dropped before the final version was
> merged upstream.

Ah, that would explain yes.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-08-01  8:57 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 16:03 [PATCH] Documentation: dmaengine: Add a documentation for the dma controller API Maxime Ripard
2014-07-30 16:03 ` Maxime Ripard
2014-07-30 16:06 ` Vinod Koul
2014-07-30 16:06   ` Vinod Koul
2014-07-31  7:44   ` Maxime Ripard
2014-07-31  7:44     ` Maxime Ripard
2014-07-31 11:56     ` Vinod Koul
2014-07-31 11:56       ` Vinod Koul
2014-07-31 16:23       ` Maxime Ripard
2014-07-31 16:23         ` Maxime Ripard
2014-08-01 17:13         ` Vinod Koul
2014-08-01 17:13           ` Vinod Koul
2014-08-02 14:49           ` Maxime Ripard
2014-08-02 14:49             ` Maxime Ripard
2014-08-02 15:17             ` Russell King - ARM Linux
2014-08-02 15:17               ` Russell King - ARM Linux
2014-08-02 19:06               ` Maxime Ripard
2014-08-02 19:06                 ` Maxime Ripard
2014-08-05 16:25             ` Vinod Koul
2014-08-05 16:25               ` Vinod Koul
2014-07-31 12:44     ` Lars-Peter Clausen
2014-07-31 12:44       ` Lars-Peter Clausen
2014-07-31 16:13       ` Maxime Ripard
2014-07-31 16:13         ` Maxime Ripard
2014-07-31 16:54         ` Lars-Peter Clausen
2014-07-31 16:54           ` Lars-Peter Clausen
2014-07-31 17:37           ` Maxime Ripard
2014-07-31 17:37             ` Maxime Ripard
2014-08-01  8:00             ` Lars-Peter Clausen
2014-08-01  8:00               ` Lars-Peter Clausen
2014-08-01  8:57               ` Maxime Ripard [this message]
2014-08-01  8:57                 ` Maxime Ripard
2014-08-01 17:15                 ` Vinod Koul
2014-08-01 17:15                   ` Vinod Koul
2014-08-01 18:09                   ` Lars-Peter Clausen
2014-08-01 18:09                     ` Lars-Peter Clausen
2014-08-02 15:13                     ` Maxime Ripard
2014-08-02 15:13                       ` Maxime Ripard
2014-08-04  7:16                       ` Lars-Peter Clausen
2014-08-04  7:16                         ` Lars-Peter Clausen
2014-07-31 13:22     ` Russell King - ARM Linux
2014-07-31 13:22       ` Russell King - ARM Linux
2014-07-31 16:41       ` Maxime Ripard
2014-07-31 16:41         ` Maxime Ripard
2014-08-01 14:53         ` Russell King - ARM Linux
2014-08-01 14:53           ` Russell King - ARM Linux
2014-08-02 15:11           ` Maxime Ripard
2014-08-02 15:11             ` Maxime Ripard
2014-08-02 15:29             ` Russell King - ARM Linux
2014-08-02 15:29               ` Russell King - ARM Linux
2014-08-02 19:05               ` Maxime Ripard
2014-08-02 19:05                 ` Maxime Ripard
2014-08-01 17:22       ` Vinod Koul
2014-08-01 17:22         ` Vinod Koul
2014-08-05  8:16 ` Geert Uytterhoeven
2014-08-05  8:16   ` Geert Uytterhoeven
2014-08-14  8:53 ` Ludovic Desroches
2014-08-14  8:53   ` Ludovic Desroches
2014-08-14  8:57   ` Russell King - ARM Linux
2014-08-14  8:57     ` Russell King - ARM Linux
2014-08-19 13:45     ` Vinod Koul
2014-08-19 13:45       ` Vinod Koul
2014-08-19 14:44       ` Russell King - ARM Linux
2014-08-19 14:44         ` Russell King - ARM Linux
2014-08-19 14:57         ` Vinod Koul
2014-08-19 14:57           ` Vinod Koul

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=20140801085707.GI3952@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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 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.