[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa686aa40905280713u2b3ef5fvbe3d58ccdb629b60@mail.gmail.com>
Date: Thu, 28 May 2009 08:13:34 -0600
From: Grant Likely <grant.likely@...retlab.ca>
To: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Cc: linux-kernel@...r.kernel.org, devicetree-discuss@...abs.org,
linux-arm-kernel@...ts.arm.linux.org.uk
Subject: Re: [RFC] [PATCH] Device Tree on ARM platform
On Thu, May 28, 2009 at 6:17 AM, Dmitry Eremin-Solenikov
<dbaryshkov@...il.com> wrote:
> David Miller wrote:
>
>> From: Russell King - ARM Linux
>> <linux@....linux.org.uk> Date: Thu, 28 May 2009
>> 10:15:13 +0100
>>
>>> For example, how would an IrDA transceiver be expressed in OF?
>>
>> As a child device node of the IRDA device, with associated properties.
>>
>> You can express _ANYTHING_ using the OF device tree. It is not even
>> something to discuss, it's flexible enough.
>
> Hmmm. How to express the following situation:
> On one of my platforms (sharp tosa) the backlight controller
> is separated into two parts: one sitting on SPI, one on the I2C.
> The tricky part is that the I2C part is only available when some
> of registers of SPI part are programmed in a specific way.
Perhaps something like this (in dts format):
spi@[someaddress] {
#size-cells = <0>;
#address-cells = <1>;
compatible = "name-of-spi-bus-device";
reg = <[someaddress] [size]>;
backlight-spi: backlight@5 {
compatible = "sharp,backlight-spi";
reg = <5>; /* CS line # 5 */
}
}
i2c@[anotheraddress] {
#size-cells = <0>;
#address-cells = <1>;
compatible = "name-of-i2c-bus-device";
reg = <[anotheraddress] [size]>;
backlight@30 {
compatible = "sharp,backlight-i2c";
reg = <30>;
spi-interface-phandle = < &backlight-spi >;
}
}
Two nodes are used to describe the device and a "phandle" is used to
link them. A device driver probe could be triggered (bind) against
the i2c half of the device and follow the phandle to get the rest of
the description.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists