From: dianders@chromium.org (Doug Anderson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
Date: Wed, 2 Sep 2015 15:07:49 -0700 [thread overview]
Message-ID: <CAD=FV=WvUp7xhsmXJgVzm1Awqej12hNF_QPJhrQq7z=Fa4Nnuw@mail.gmail.com> (raw)
In-Reply-To: <1440970470-7155-1-git-send-email-vladimir_zapolskiy@mentor.com>
Hi,
On Sun, Aug 30, 2015 at 2:34 PM, Vladimir Zapolskiy
<vladimir_zapolskiy@mentor.com> wrote:
> +static struct i2c_adapter *dw_hdmi_i2c_adapter(struct dw_hdmi *hdmi)
> +{
> + struct i2c_adapter *adap;
> + struct dw_hdmi_i2c *i2c;
> + int ret;
> +
> + i2c = devm_kzalloc(hdmi->dev, sizeof(*i2c), GFP_KERNEL);
> + if (!i2c)
> + return ERR_PTR(-ENOMEM);
> +
> + mutex_init(&i2c->lock);
> + init_completion(&i2c->cmp);
> +
> + adap = &i2c->adap;
> + adap->class = I2C_CLASS_DDC;
> + adap->owner = THIS_MODULE;
> + adap->dev.parent = hdmi->dev;
I think you may want to add "adap->dev.of_node = hdmi->dev->of_node;"
here. That will allow device trees to specify the i2c bus by using an
alias.
See <https://chromium-review.googlesource.com/#/c/297040/> where I've
added this line and
<https://chromium-review.googlesource.com/#/c/297041/> where I've used
it.
next prev parent reply other threads:[~2015-09-02 22:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-30 21:34 [PATCH v3 2/2] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support Vladimir Zapolskiy
2015-08-31 9:22 ` Philipp Zabel
2015-09-02 22:07 ` Doug Anderson [this message]
2015-09-02 22:50 ` Russell King - ARM Linux
2015-09-02 23:00 ` Doug Anderson
2015-09-02 23:04 ` Russell King - ARM Linux
2015-09-02 23:19 ` Doug Anderson
2015-09-16 21:16 ` Vladimir Zapolskiy
2015-09-16 22:02 ` Doug Anderson
2015-09-02 23:43 ` Doug Anderson
2015-09-03 9:19 ` Russell King - ARM Linux
2015-09-03 9:39 ` Thierry Reding
2015-09-03 16:08 ` Doug Anderson
2015-09-08 22:08 ` Wolfram Sang
2015-09-16 20:04 ` Doug Anderson
2015-09-16 20:58 ` Vladimir Zapolskiy
2015-09-16 21:56 ` Doug Anderson
2015-09-16 22:18 ` Russell King - ARM Linux
2015-09-21 14:00 ` Vladimir Zapolskiy
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='CAD=FV=WvUp7xhsmXJgVzm1Awqej12hNF_QPJhrQq7z=Fa4Nnuw@mail.gmail.com' \
--to=dianders@chromium.org \
--cc=linux-arm-kernel@lists.infradead.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).