public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Eddie Huang <eddie.huang@mediatek.com>
Cc: Sascha Hauer <kernel@pengutronix.de>,
	srv_heupstream@mediatek.com, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Xudong Chen <xudong.chen@mediatek.com>,
	Liguo Zhang <liguo.zhang@mediatek.com>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v7 2/3] I2C: mediatek: Add driver for MediaTek I2C controller
Date: Mon, 18 May 2015 08:37:42 +0200	[thread overview]
Message-ID: <20150518063742.GA1545@katana> (raw)
In-Reply-To: <1431928701.22349.22.camel@mtksdaap41>

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

> > > +		rpaddr = dma_map_single(i2c->adap.dev.parent, msgs->buf,
> > > +						msgs->len, DMA_FROM_DEVICE);
> > 
> > I think you shouldn't use the adapter device here and later, but the dma
> > channel device.
> > 
> In MTK SoC, each I2C controller has its own DMA, and this DMA can't be
> used by other hardware.
> So I tend to use DMA directly, not through DMA channel.
> Even so, "i2c->adap.dev.parent" is not suitable here. I will change to
> use i2c->dev here. (Reference i2c-at91.c).

The better reference would be i2c-sh_mobile.c, especially commit
8cfcae9f0595bf0d145a67cfaa1051804a301d7c ("i2c: sh_mobile: use proper
device for mapping DMA memory") ;) The request to use the DMA channel
device came from the DMA folks, so if there is no real reason for an
exception, please use the channel device.


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

  reply	other threads:[~2015-05-18  6:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  8:37 [PATCH v7 0/3] ARM: mediatek: Add driver for Mediatek I2C Eddie Huang
2015-05-06  8:37 ` [PATCH v7 1/3] dt-bindings: Add I2C bindings for mt65xx/mt81xx Eddie Huang
2015-05-12 12:37   ` wsa
2015-05-12 12:45     ` Sascha Hauer
2015-05-06  8:37 ` [PATCH v7 2/3] I2C: mediatek: Add driver for MediaTek I2C controller Eddie Huang
2015-05-12 12:58   ` wsa
2015-05-18  5:58     ` Eddie Huang
2015-05-18  6:37       ` Wolfram Sang [this message]
2015-05-18  7:42         ` Eddie Huang
2015-05-18  9:05           ` Wolfram Sang
2015-05-06  8:37 ` [PATCH v7 3/3] I2C: mediatek: Add driver for MediaTek MT8173 " Eddie Huang
2015-05-12 13:00   ` wsa
2015-05-07  7:39 ` [PATCH v7 0/3] ARM: mediatek: Add driver for Mediatek I2C Lee Jones
2015-05-07  7:54   ` Eddie Huang
2015-05-07  8:27     ` Lee Jones
2015-05-12 12:45 ` Sascha Hauer

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=20150518063742.GA1545@katana \
    --to=wsa@the-dreams.de \
    --cc=devicetree@vger.kernel.org \
    --cc=eddie.huang@mediatek.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kernel@pengutronix.de \
    --cc=liguo.zhang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=xudong.chen@mediatek.com \
    /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