Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752154AbbERGiN (ORCPT ); Mon, 18 May 2015 02:38:13 -0400 Received: from sauhun.de ([89.238.76.85]:45453 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbbERGiH (ORCPT ); Mon, 18 May 2015 02:38:07 -0400 Date: Mon, 18 May 2015 08:37:42 +0200 From: Wolfram Sang To: Eddie Huang Cc: Sascha Hauer , srv_heupstream@mediatek.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Matthias Brugger , Xudong Chen , Liguo Zhang , 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 Message-ID: <20150518063742.GA1545@katana> References: <1430901427-65146-1-git-send-email-eddie.huang@mediatek.com> <1430901427-65146-3-git-send-email-eddie.huang@mediatek.com> <20150512125832.GB4447@schokonusskuchen.bad> <1431928701.22349.22.camel@mtksdaap41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <1431928701.22349.22.camel@mtksdaap41> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2158 Lines: 53 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > > + rpaddr =3D dma_map_single(i2c->adap.dev.parent, msgs->buf, > > > + msgs->len, DMA_FROM_DEVICE); > >=20 > > I think you shouldn't use the adapter device here and later, but the dma > > channel device. > >=20 > 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. --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVWYizAAoJEBQN5MwUoCm2GXwP/jA2vVLY2OzOf9Z2ouv87H9z 1wm1EKmQDAPMUeA/gugE4zt1QAuE10WO7T1pssxYyIhoVagjdbF+1dOEFIn+WKE4 wU7sgHH2ZxX5tCNQS6sfHrSxTsxoAf8AvqD/wd7cFKlJVT7Sq650iMpD915TiUYY WfTlGe0bXWapEMtdneikFwxExl4TaRymCY1QlJYXQB+bzxSMJgRazbOEabqkgSPe WWLUkjrvQAUukxtXelYR1oTuTsHN8HiAP7KEARNuLXwLc/nUzKbgmcJxAI5FnyxA WqKrsp8bqj0b2JM/ko/EsjmsnIHKlnoFs0gox2NRudNEQasAcid9wv3e1qmvCQd3 bWjM8LO2pcoNmQVlb/CU5QtcMsR9i+Ng7c2jRnltF9JiofEtm+vTNgYvf/y9Npl9 VuI2bztZk+ckyvnYxFmuI4bPy86Q+4RPBIdpkFsOBV90LHkK8RsaqtbWlaEm31au dLnCiTrtrxq5p+v7/jXsJNgpNMiT54J4v+fY5tT2VcN8aVZLASHLet01sRDZHAKr qc9fHub4PqI21ZacH/PJyUi4PJ8ugDmey8E5wARhxaoUbQjW6dZKNjciFC4wAPYn 2k9I9WVU2r65BaA7UwM5xofts8nFRGPvcq+w7dVf8QL5MMGW4lVxPW8aAFydO1YA VPdv+31VTXeOg7350ziF =gqz6 -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/