From: wmb@firmworks.com (Mitch Bradley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: vexpress: initial device tree support
Date: Tue, 10 Jan 2012 12:35:50 -1000 [thread overview]
Message-ID: <4F0CBD46.2010909@firmworks.com> (raw)
In-Reply-To: <4F0CB485.9010106@freescale.com>
On 1/10/2012 11:58 AM, Timur Tabi wrote:
> Jamie Lokier wrote:
>
>> It still needs to know *which* I2C bus master is connected to the
>> display. Some graphics hardware has multiple, e.g. one to talk with
>> the DVI/HDMI transmitter, another connected by cable to the display.
>
> Yes, this is my problem. I have multiple I2C busses on my system, and there's no way to guess which one is connected to the DVI port. A phandle in the device tree is the only way I can figure out which I2C bus to use. But there's another problem. I can use of_find_i2c_device_by_node() to determine the i2c_client (and therefore, the i2c_adapter) to use for fb_ddc_read(). However, that function only works if the I2C device was probed. That typically is done by the I2C driver for the device, but there is no "edid" device driver. So my framebuffer driver is going to have to pretend to be one.
It seems to me that having the framebuffer driver handle the EDID
"driver" function is exactly the right thing. The framebuffer driver is
the only thing that cares about EDID information. Given a phandle
reference to an I2C interface, the "driver" is just "call the I2C read
routine" - plus, in your case, toggling the GPIO pin.
That GPIO pin thing is annoying, but not sufficiently complex or common
that it warrants having a separate EDID driver. You could define a
platform-specific property to tell your framebuffer driver that it needs
to do that GPIO thing. It's a hack, but the GPIO thing is inherently a
hack, so there will be some ugliness somewhere as a result.
>
> I wish there were some way to obtain the i2c_adapter struct more easily.
>
>> I have worked with devices that shared the same I2C for DDC and
>> talking with on-board devices. (That was a bad idea, as some monitors
>> clamp the lines high or low excessively even when switched off.) Point
>> here is sometimes there's a dedicated one for DDC; sometimes there isn't.
>
> I also have this problem. I need to toggle a GPIO in order to get the I2C bus connected to the DVI port. The same I2C bus is used for the audio codec and a bunch of other devices. Our SOC has four I2C busses, so I don't understand why the board designed didn't dedicate one for the DDC. But I can easily work around this issue.
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
To: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "Paweł Moll" <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
"patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
"Jamie Lokier" <jamie-yetKDKU6eevNLxjTenLetw@public.gmane.org>,
"Rob Herring"
<rob.herring-CfjtxxwdHycX+EX/Zwu52A@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] ARM: vexpress: initial device tree support
Date: Tue, 10 Jan 2012 12:35:50 -1000 [thread overview]
Message-ID: <4F0CBD46.2010909@firmworks.com> (raw)
In-Reply-To: <4F0CB485.9010106-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
On 1/10/2012 11:58 AM, Timur Tabi wrote:
> Jamie Lokier wrote:
>
>> It still needs to know *which* I2C bus master is connected to the
>> display. Some graphics hardware has multiple, e.g. one to talk with
>> the DVI/HDMI transmitter, another connected by cable to the display.
>
> Yes, this is my problem. I have multiple I2C busses on my system, and there's no way to guess which one is connected to the DVI port. A phandle in the device tree is the only way I can figure out which I2C bus to use. But there's another problem. I can use of_find_i2c_device_by_node() to determine the i2c_client (and therefore, the i2c_adapter) to use for fb_ddc_read(). However, that function only works if the I2C device was probed. That typically is done by the I2C driver for the device, but there is no "edid" device driver. So my framebuffer driver is going to have to pretend to be one.
It seems to me that having the framebuffer driver handle the EDID
"driver" function is exactly the right thing. The framebuffer driver is
the only thing that cares about EDID information. Given a phandle
reference to an I2C interface, the "driver" is just "call the I2C read
routine" - plus, in your case, toggling the GPIO pin.
That GPIO pin thing is annoying, but not sufficiently complex or common
that it warrants having a separate EDID driver. You could define a
platform-specific property to tell your framebuffer driver that it needs
to do that GPIO thing. It's a hack, but the GPIO thing is inherently a
hack, so there will be some ugliness somewhere as a result.
>
> I wish there were some way to obtain the i2c_adapter struct more easily.
>
>> I have worked with devices that shared the same I2C for DDC and
>> talking with on-board devices. (That was a bad idea, as some monitors
>> clamp the lines high or low excessively even when switched off.) Point
>> here is sometimes there's a dedicated one for DDC; sometimes there isn't.
>
> I also have this problem. I need to toggle a GPIO in order to get the I2C bus connected to the DVI port. The same I2C bus is used for the audio codec and a bunch of other devices. Our SOC has four I2C busses, so I don't understand why the board designed didn't dedicate one for the DDC. But I can easily work around this issue.
>
>
next prev parent reply other threads:[~2012-01-10 22:35 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 9:19 [PATCH] ARM: vexpress: initial device tree support Dave Martin
2011-09-21 9:19 ` Dave Martin
2011-09-21 13:24 ` Rob Herring
2011-09-21 13:24 ` Rob Herring
2011-09-21 14:24 ` Dave Martin
2011-09-21 14:24 ` Dave Martin
2011-09-21 14:33 ` Pawel Moll
2011-09-21 14:33 ` Pawel Moll
2011-09-21 15:49 ` Dave Martin
2011-09-21 15:49 ` Dave Martin
2011-09-21 14:57 ` Grant Likely
2011-09-21 14:57 ` Grant Likely
2011-09-21 16:01 ` Pawel Moll
2011-09-21 16:01 ` Pawel Moll
2011-09-21 16:17 ` Dave Martin
2011-09-21 16:17 ` Dave Martin
2011-09-21 16:28 ` Pawel Moll
2011-09-21 16:28 ` Pawel Moll
2011-09-21 16:37 ` Rob Herring
2011-09-21 16:37 ` Rob Herring
2011-09-21 17:15 ` Dave Martin
2011-09-21 17:15 ` Dave Martin
2011-09-21 17:47 ` Mitch Bradley
2011-09-21 17:47 ` Mitch Bradley
2011-09-22 12:19 ` Dave Martin
2011-09-22 12:19 ` Dave Martin
2012-01-09 23:26 ` Tabi Timur-B04825
2012-01-09 23:26 ` Tabi Timur-B04825
2012-01-10 0:42 ` Mitch Bradley
2012-01-10 0:42 ` Mitch Bradley
2012-01-10 2:24 ` Tabi Timur-B04825
2012-01-10 2:24 ` Tabi Timur-B04825
2012-01-10 12:22 ` Jamie Lokier
2012-01-10 12:22 ` Jamie Lokier
2012-01-10 21:58 ` Timur Tabi
2012-01-10 21:58 ` Timur Tabi
2012-01-10 22:35 ` Mitch Bradley [this message]
2012-01-10 22:35 ` Mitch Bradley
2012-01-10 23:55 ` Stephen Warren
2012-01-10 23:55 ` Stephen Warren
2012-01-11 0:02 ` Timur Tabi
2012-01-11 0:02 ` Timur Tabi
2012-01-11 0:28 ` Timur Tabi
2012-01-11 0:28 ` Timur Tabi
2012-01-11 6:43 ` Mitch Bradley
2012-01-11 6:43 ` Mitch Bradley
2012-01-11 20:17 ` Timur Tabi
2012-01-11 20:17 ` Timur Tabi
2012-01-11 23:20 ` Mitch Bradley
2012-01-11 23:20 ` Mitch Bradley
2012-01-11 23:32 ` Timur Tabi
2012-01-11 23:32 ` Timur Tabi
2012-01-11 20:29 ` Stephen Warren
2012-01-11 20:29 ` Stephen Warren
2012-01-11 20:32 ` Timur Tabi
2012-01-11 20:32 ` Timur Tabi
2012-01-11 20:36 ` Stephen Warren
2012-01-11 20:36 ` Stephen Warren
2012-01-11 21:37 ` Timur Tabi
2012-01-11 21:37 ` Timur Tabi
2012-01-11 21:57 ` Stephen Warren
2012-01-11 21:57 ` Stephen Warren
2012-01-12 12:24 ` Jamie Lokier
2012-01-12 12:24 ` Jamie Lokier
2012-01-12 16:49 ` Stephen Warren
2012-01-12 16:49 ` Stephen Warren
2012-01-11 23:16 ` Mitch Bradley
2012-01-11 23:16 ` Mitch Bradley
2012-01-12 0:15 ` Stephen Warren
2012-01-12 0:15 ` Stephen Warren
2012-01-12 0:38 ` Mitch Bradley
2012-01-12 0:38 ` Mitch Bradley
2012-01-12 0:47 ` Mitch Bradley
2012-01-12 0:47 ` Mitch Bradley
2012-01-12 16:45 ` Stephen Warren
2012-01-12 16:45 ` Stephen Warren
2012-01-12 12:09 ` Jamie Lokier
2012-01-12 12:09 ` Jamie Lokier
2012-01-12 16:52 ` Stephen Warren
2012-01-12 16:52 ` Stephen Warren
2012-01-10 11:04 ` Dave Martin
2012-01-10 11:04 ` Dave Martin
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=4F0CBD46.2010909@firmworks.com \
--to=wmb@firmworks.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.