From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 4/4] drm/dp: Allow registering AUX channels as I2C busses Date: Fri, 20 Dec 2013 10:27:21 +0100 Message-ID: <20131220092719.GC27787@ulmo.nvidia.com> References: <1387297207-7643-1-git-send-email-treding@nvidia.com> <1387297207-7643-5-git-send-email-treding@nvidia.com> <20131218085247.GE26371@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1199519160==" Return-path: Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by gabe.freedesktop.org (Postfix) with ESMTP id A2548FA6AC for ; Fri, 20 Dec 2013 01:28:55 -0800 (PST) Received: by mail-bk0-f44.google.com with SMTP id d7so1095848bkh.31 for ; Fri, 20 Dec 2013 01:28:54 -0800 (PST) In-Reply-To: <20131218085247.GE26371@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1199519160== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hOcCNbCCxyk/YU74" Content-Disposition: inline --hOcCNbCCxyk/YU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 18, 2013 at 09:52:47AM +0100, Daniel Vetter wrote: > On Tue, Dec 17, 2013 at 05:20:07PM +0100, Thierry Reding wrote: > > Implements an I2C-over-AUX I2C adapter on top of the generic drm_dp_aux > > infrastructure. It extracts the retry logic from existing drivers, which > > should help in porting those drivers to this new helper. > >=20 > > Signed-off-by: Thierry Reding > > --- > > drivers/gpu/drm/drm_dp_helper.c | 178 ++++++++++++++++++++++++++++++++= ++++++++ > > include/drm/drm_dp_helper.h | 4 + > > 2 files changed, 182 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_h= elper.c > > index 01a8173c6e83..8a64cf8ac8cc 100644 > > --- a/drivers/gpu/drm/drm_dp_helper.c > > +++ b/drivers/gpu/drm/drm_dp_helper.c > > @@ -555,3 +555,181 @@ int drm_dp_link_power_up(struct drm_dp_aux *aux, = struct drm_dp_link *link) > > =20 > > return 0; > > } > > + > > +/* > > + * I2C-over-AUX implementation > > + */ > > + > > +struct drm_dp_i2c_adapter { > > + struct i2c_adapter adapter; > > + struct drm_dp_aux *aux; > > +}; >=20 > I'd just embedded an i2c adapter into the drm_dp_aux structure - I think > drivers always want such a thing. Then maybe rename the setup function > from add to register_i2c_bus or so. For smoother transition drivers can > always store a pointer to this i2c_adapter somewhere more convenient for > them. Okay, I've made that change. I was slightly worried that it might cause lifetime issues, but looking somewhat more closely perhaps that's not an issue since i2c_adapters seem to be carefully designed to easily allow being embedded. Thierry --hOcCNbCCxyk/YU74 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJStA13AAoJEN0jrNd/PrOhyKMQAIuZ5K+3W17Z3bURqqQFPK3x PcG0NMJsFrsariuabnl33DmHJsz9Hp/IaJtjvP9nI1JlGuxcWPLExOa9uzYAvlzJ tLMFXOV791TY3k+YBnsPhPHOoK3KZyMLYCUCmZ1+k2ytjARZ7cst4HDG+llcEUBq wEVRp1fm0vApnJFkMKMkVh3pGM9nXnQMN/nFCYjmHCH88z6pRp28Rmr2l55chCmV vb/2dpqzhphbFfASnWPexYiX+ygbKwNeths6ZvtLjHkSwPOudseI49FcGipDoqP5 xzHn5BxnkJ1zcsBXexY0WXAd33CQP8Jt5ooFK8+x/Qr/GgkT0GEy7HkOzYPy7CYV oOiAMw1S5cxOIK+HOlEF5cBGEPAkq88espGbtOI+Sumx9P3Of9QRteIZUYq+loTl vEnf/ngLP7N9NyVjIw9GjhQuON62QvVndYyEb0jNF2ZtPbM+ed5Lkx9VjKo3kYoa lSlm2FvPbZwT8Dwxteehjlp1ht40cJA6fuN7RTnleg/qNcOzvkhGxWlSfV8sB0Zp VNpB5ZfvrzY3fV5Tlc9hdgibrh7hGo2sRQEdVd010L/9WdPyZku3Tn/Q2I0nEkga gdvna3W1g9EZh2HY8zyr8A1Eu950qGifrKsMwU6rcRStTeaybnZdtkhiMeD+OHhC nPcaMhgvj16jEl8eZqzw =FIt2 -----END PGP SIGNATURE----- --hOcCNbCCxyk/YU74-- --===============1199519160== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1199519160==--