linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [RFC 1/3] i2c: sh_mobile: add DMA support
Date: Mon, 3 Nov 2014 09:58:48 +0100	[thread overview]
Message-ID: <CAMuHMdX1-ANQQhZkfKG67-TSKEUO6sFeiUMkkA323Ww4Cw9JrA@mail.gmail.com> (raw)
In-Reply-To: <1414752678-26078-2-git-send-email-wsa@the-dreams.de>

Hi Wolfram,

On Fri, Oct 31, 2014 at 11:51 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c

> +static struct dma_chan *sh_mobile_i2c_request_dma_chan(struct device *dev,
> +                                             enum dma_transfer_direction dir,
> +                                             dma_addr_t port_addr)
> +{
> +       dma_cap_mask_t mask;
> +       struct dma_chan *chan;
> +       struct dma_slave_config cfg;
> +       int ret;
> +
> +       dma_cap_zero(mask);
> +       dma_cap_set(DMA_SLAVE, mask);
> +
> +       chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
> +                               (void *)0UL, dev, dir == DMA_MEM_TO_DEV ? "tx" : "rx");

Given you only support DT DMA configuration (you always pass (void *)0UL
as the channel ID), I think you can call dma_request_slave_channel(dev,
dir == DMA_MEM_TO_DEV ? "tx" : "rx") directly instead of using the
dma_request_slave_channel_compat() wrapper.

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

  parent reply	other threads:[~2014-11-03  8:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 10:51 [RFC 0/3] i2c: sh_mobile: add DMA support Wolfram Sang
2014-10-31 10:51 ` [RFC 1/3] " Wolfram Sang
2014-11-02 22:04   ` Laurent Pinchart
2014-11-03  7:47     ` Wolfram Sang
2014-11-03  8:58   ` Geert Uytterhoeven [this message]
     [not found]     ` <CAMuHMdX1-ANQQhZkfKG67-TSKEUO6sFeiUMkkA323Ww4Cw9JrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 10:19       ` Wolfram Sang
     [not found] ` <1414752678-26078-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-10-31 10:51   ` [RFC 2/3] ARM: shmobile: r8a7790: add DMA nodes for IIC Wolfram Sang
     [not found]     ` <1414752678-26078-3-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-02 21:47       ` Laurent Pinchart
2014-11-03  9:04     ` Geert Uytterhoeven
2014-10-31 10:51 ` [RFC 3/3] ARM: shmobile: r8a7791: " Wolfram Sang
2014-11-02 21:47   ` Laurent Pinchart
     [not found]   ` <1414752678-26078-4-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-03  9:04     ` Geert Uytterhoeven
2014-11-02 21:14 ` [RFC 0/3] i2c: sh_mobile: add DMA support Laurent Pinchart
2014-11-02 21:53   ` Wolfram Sang

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=CAMuHMdX1-ANQQhZkfKG67-TSKEUO6sFeiUMkkA323Ww4Cw9JrA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).