From: vladimir_zapolskiy@mentor.com (Vladimir Zapolskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
Date: Thu, 17 Sep 2015 00:16:00 +0300 [thread overview]
Message-ID: <55F9DC10.9020508@mentor.com> (raw)
In-Reply-To: <CAD=FV=XO0cjmmXniGnqvvoWZ=e1EL7t5XDUXVhiNMqWvmaOpMw@mail.gmail.com>
Hi Doug,
On 03.09.2015 02:19, Doug Anderson wrote:
> Russell,
>
> On Wed, Sep 2, 2015 at 4:04 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>>>> Also, is it appropriate to hook non-DDC devices to a DDC bus? I suspect
>>>> that's asking for trouble.
>>>
>>> I doubt it's appropriate. Why do you ask?
>>
>> To find out why you want to "specify the I2C bus".
>>
>> Surely if we're talking about the DDC bus, we either want to use a
>> separate I2C bus (in which case the HDMI DT description needs to
>> specify which I2C bus to use) or we want to use the HDMI-internal
>> I2C bus, which being part of the HDMI driver, the HDMI driver will
>> know how to find it itself - there should be no need to put an
>> explicit ddc-i2c-bus self-reference there in that case.
>
> Overall it comes down to bus numbering. Possibly that's a stupid
> reason, but it is my reason nevertheless.
this is a known issue regarding I2C bus numbering.
> Specifically it significantly helps my brain process kernel log
> messages if the i2c bus that's referred to "bus 5" in my SoC's user
> manual shows up consistently as "i2c5" in kernel log messages. It's
> helpful it it shows up as "i2c5" even if "i2c0" - "i2c4" aren't
> enabled.
>
> That's all totally possible by using this type of syntax, like in rk3288.dtsi:
>
> aliases {
> i2c0 = &i2c0;
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
>
> Similarly, I'd like "bus 0" to show up as i2c0, which will happen as
> you can see in the above.
>
> The problem is that if another bus registers itself before the SoC's
> i2c0 registers itself and that bus doesn't give a number to itself
> then the i2c subsystem will chose "I2C 0". ...and then when the main
> SoC i2c bus registers itself it will fail because i2c0 is already
> taken.
>
> By having a of_node for the hdmi i2c bus, we can assign a number to it like:
> i2c15 = &hdmi;
>
> This is all described in the two links I referenced in my original reply.
>
>
> A possible other option is to have the i2c subsystem try to start
> numbering at a larger base for all automatically numbered busses
> (those that didn't specify a number). Then it's more likely (though
> still not guaranteed) to conflict with another bus...
Could you please check if commit 03bde7c31a3 serves you?
--
With best wishes,
Vladimir
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Doug Anderson <dianders@chromium.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Yakir Yang <ykk@rock-chips.com>,
Andy Yan <andy.yan@rock-chips.com>,
Thierry Reding <treding@nvidia.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 2/2] drm: bridge/dw_hdmi: add dw hdmi i2c bus adapter support
Date: Thu, 17 Sep 2015 00:16:00 +0300 [thread overview]
Message-ID: <55F9DC10.9020508@mentor.com> (raw)
In-Reply-To: <CAD=FV=XO0cjmmXniGnqvvoWZ=e1EL7t5XDUXVhiNMqWvmaOpMw@mail.gmail.com>
Hi Doug,
On 03.09.2015 02:19, Doug Anderson wrote:
> Russell,
>
> On Wed, Sep 2, 2015 at 4:04 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>>>> Also, is it appropriate to hook non-DDC devices to a DDC bus? I suspect
>>>> that's asking for trouble.
>>>
>>> I doubt it's appropriate. Why do you ask?
>>
>> To find out why you want to "specify the I2C bus".
>>
>> Surely if we're talking about the DDC bus, we either want to use a
>> separate I2C bus (in which case the HDMI DT description needs to
>> specify which I2C bus to use) or we want to use the HDMI-internal
>> I2C bus, which being part of the HDMI driver, the HDMI driver will
>> know how to find it itself - there should be no need to put an
>> explicit ddc-i2c-bus self-reference there in that case.
>
> Overall it comes down to bus numbering. Possibly that's a stupid
> reason, but it is my reason nevertheless.
this is a known issue regarding I2C bus numbering.
> Specifically it significantly helps my brain process kernel log
> messages if the i2c bus that's referred to "bus 5" in my SoC's user
> manual shows up consistently as "i2c5" in kernel log messages. It's
> helpful it it shows up as "i2c5" even if "i2c0" - "i2c4" aren't
> enabled.
>
> That's all totally possible by using this type of syntax, like in rk3288.dtsi:
>
> aliases {
> i2c0 = &i2c0;
> i2c1 = &i2c1;
> i2c2 = &i2c2;
> i2c3 = &i2c3;
> i2c4 = &i2c4;
> i2c5 = &i2c5;
>
> Similarly, I'd like "bus 0" to show up as i2c0, which will happen as
> you can see in the above.
>
> The problem is that if another bus registers itself before the SoC's
> i2c0 registers itself and that bus doesn't give a number to itself
> then the i2c subsystem will chose "I2C 0". ...and then when the main
> SoC i2c bus registers itself it will fail because i2c0 is already
> taken.
>
> By having a of_node for the hdmi i2c bus, we can assign a number to it like:
> i2c15 = &hdmi;
>
> This is all described in the two links I referenced in my original reply.
>
>
> A possible other option is to have the i2c subsystem try to start
> numbering at a larger base for all automatically numbered busses
> (those that didn't specify a number). Then it's more likely (though
> still not guaranteed) to conflict with another bus...
Could you please check if commit 03bde7c31a3 serves you?
--
With best wishes,
Vladimir
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-09-16 21:16 UTC|newest]
Thread overview: 38+ 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-30 21:34 ` Vladimir Zapolskiy
2015-08-31 9:22 ` Philipp Zabel
2015-08-31 9:22 ` Philipp Zabel
2015-09-02 22:07 ` Doug Anderson
2015-09-02 22:07 ` Doug Anderson
2015-09-02 22:50 ` Russell King - ARM Linux
2015-09-02 22:50 ` Russell King - ARM Linux
2015-09-02 23:00 ` Doug Anderson
2015-09-02 23:00 ` Doug Anderson
2015-09-02 23:04 ` Russell King - ARM Linux
2015-09-02 23:04 ` Russell King - ARM Linux
2015-09-02 23:19 ` Doug Anderson
2015-09-02 23:19 ` Doug Anderson
2015-09-16 21:16 ` Vladimir Zapolskiy [this message]
2015-09-16 21:16 ` Vladimir Zapolskiy
2015-09-16 22:02 ` Doug Anderson
2015-09-16 22:02 ` Doug Anderson
2015-09-02 23:43 ` Doug Anderson
2015-09-02 23:43 ` Doug Anderson
2015-09-03 9:19 ` Russell King - ARM Linux
2015-09-03 9:19 ` Russell King - ARM Linux
[not found] ` <20150903091900.GX21084-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-09-03 9:39 ` Thierry Reding
2015-09-03 9:39 ` Thierry Reding
2015-09-03 16:08 ` Doug Anderson
2015-09-03 16:08 ` Doug Anderson
[not found] ` <20150903093910.GA4151-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-09-08 22:08 ` Wolfram Sang
2015-09-08 22:08 ` Wolfram Sang
2015-09-16 20:04 ` Doug Anderson
2015-09-16 20:04 ` Doug Anderson
2015-09-16 20:58 ` Vladimir Zapolskiy
2015-09-16 20:58 ` Vladimir Zapolskiy
2015-09-16 21:56 ` Doug Anderson
2015-09-16 21:56 ` Doug Anderson
2015-09-16 22:18 ` Russell King - ARM Linux
2015-09-16 22:18 ` Russell King - ARM Linux
2015-09-21 14:00 ` Vladimir Zapolskiy
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=55F9DC10.9020508@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.