From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Cc: "daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>, "tore@fud.no" <tore@fud.no>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v4 1/4] drm: Add helper for DP++ adaptors
Date: Fri, 6 May 2016 16:10:09 +0300 [thread overview]
Message-ID: <20160506131009.GA4329@intel.com> (raw)
In-Reply-To: <1462538270.14511.13.camel@intel.com>
On Fri, May 06, 2016 at 12:37:51PM +0000, Zanoni, Paulo R wrote:
> Em Ter, 2016-05-03 às 20:56 +0300, ville.syrjala@linux.intel.com
> escreveu:
<snip>
> > +
> > +/**
> > + * drm_dp_dual_mode_read - Read from the DP dual mode adaptor
> > register(s)
> > + * @adapter: I2C adapter for the DDC bus
> > + * @offset: register offset
> > + * @buffer: buffer for return data
> > + * @size: sizo of the buffer
> > + *
> > + * Reads @size bytes from the DP dual mode adaptor registers
> > + * starting at @offset.
> > + *
> > + * Returns:
> > + * 0 on success, negative error code on failure
> > + */
> > +ssize_t drm_dp_dual_mode_read(struct i2c_adapter *adapter,
> > + u8 offset, void *buffer, size_t size)
> > +{
> > + struct i2c_msg msgs[] = {
> > + {
> > + .addr = DP_DUAL_MODE_SLAVE_ADDRESS,
> > + .flags = 0,
> > + .len = 1,
> > + .buf = &offset,
> > + },
> > + {
> > + .addr = DP_DUAL_MODE_SLAVE_ADDRESS,
> > + .flags = I2C_M_RD,
> > + .len = size,
> > + .buf = buffer,
> > + },
> > + };
> > + int ret;
> > +
> > + ret = i2c_transfer(adapter, msgs, ARRAY_SIZE(msgs));
> > + if (ret < 0)
> > + return ret;
> > + if (ret != ARRAY_SIZE(msgs))
> > + return -EPROTO;
> > +
> > + return 0;
> > +}
> EXPORT_SYMBOL(drm_dp_dual_mode_read);
>
> (or make it static and remove from the .h file)
Hmm. My initial idea was that someone might want to use these for debug
and/or accessing some vendor specific register and whatnot. Which is why
I meant to export them (and somehow failed in this case). I guess I
still stand by that reasoning, although right now we have no users
outside this file.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-05-06 13:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 19:08 [PATCH v2 0/4] drm: DP++ adaptor support (v2) ville.syrjala
2016-05-02 19:08 ` [PATCH v2 1/4] drm: Add helper for DP++ adaptors ville.syrjala
2016-05-03 7:46 ` [Intel-gfx] " Jani Nikula
2016-05-03 13:38 ` Ville Syrjälä
2016-05-03 14:55 ` [PATCH v3 " ville.syrjala
2016-05-03 17:56 ` [PATCH v4 " ville.syrjala
2016-05-04 6:26 ` Sharma, Shashank
2016-05-06 12:37 ` Zanoni, Paulo R
2016-05-06 13:10 ` Ville Syrjälä [this message]
2016-05-06 13:46 ` [PATCH v5 " ville.syrjala
2016-05-03 16:33 ` [PATCH v2 " Sharma, Shashank
2016-05-03 17:38 ` Ville Syrjälä
2016-05-02 19:08 ` [PATCH v2 2/4] drm/i915: Respect DP++ adaptor TMDS clock limit ville.syrjala
2016-05-04 10:08 ` Sharma, Shashank
2016-05-02 19:08 ` [PATCH v3 3/4] drm/i915: Enable/disable TMDS output buffers in DP++ adaptor as needed ville.syrjala
2016-05-04 10:13 ` Sharma, Shashank
2016-05-04 11:49 ` Ville Syrjälä
2016-05-04 13:48 ` Sharma, Shashank
2016-05-02 19:08 ` [PATCH v2 4/4] drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT ville.syrjala
2016-05-04 10:24 ` Sharma, Shashank
2016-05-04 11:29 ` Ville Syrjälä
2016-05-04 11:45 ` [PATCH v3 " ville.syrjala
2016-05-04 13:50 ` Sharma, Shashank
2016-05-09 12:12 ` [PATCH v2 0/4] drm: DP++ adaptor support (v2) Ville Syrjälä
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=20160506131009.GA4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=stable@vger.kernel.org \
--cc=tore@fud.no \
/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