From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 4/4] drm/dp: Allow registering AUX channels as I2C busses
Date: Fri, 20 Dec 2013 10:27:21 +0100 [thread overview]
Message-ID: <20131220092719.GC27787@ulmo.nvidia.com> (raw)
In-Reply-To: <20131218085247.GE26371@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 1688 bytes --]
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.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > drivers/gpu/drm/drm_dp_helper.c | 178 ++++++++++++++++++++++++++++++++++++++++
> > include/drm/drm_dp_helper.h | 4 +
> > 2 files changed, 182 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.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)
> >
> > return 0;
> > }
> > +
> > +/*
> > + * I2C-over-AUX implementation
> > + */
> > +
> > +struct drm_dp_i2c_adapter {
> > + struct i2c_adapter adapter;
> > + struct drm_dp_aux *aux;
> > +};
>
> 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
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2013-12-20 9:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 16:20 [PATCH v2 0/4] drm/dp: Introduce AUX channel infrastructure Thierry Reding
2013-12-17 16:20 ` [PATCH v2 1/4] drm/dp: Add " Thierry Reding
2013-12-17 16:44 ` Jani Nikula
2013-12-20 9:03 ` Thierry Reding
2013-12-20 13:08 ` Jani Nikula
2013-12-20 14:33 ` Thierry Reding
2013-12-17 16:20 ` [PATCH v2 2/4] drm/dp: Add drm_dp_dpcd_read_link_status() Thierry Reding
2013-12-17 16:20 ` [PATCH v2 3/4] drm/dp: Add DisplayPort link helpers Thierry Reding
2013-12-20 13:22 ` Jani Nikula
2013-12-17 16:20 ` [PATCH v2 4/4] drm/dp: Allow registering AUX channels as I2C busses Thierry Reding
2013-12-17 17:11 ` Jani Nikula
2013-12-20 9:13 ` Thierry Reding
2013-12-18 8:52 ` Daniel Vetter
2013-12-20 9:27 ` Thierry Reding [this message]
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=20131220092719.GC27787@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.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 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).