[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=2a=9=k+ZG46yqKOaHd9tCkJVm4QRxGmgbRzsv@mail.gmail.com>
Date: Fri, 25 Feb 2011 14:19:33 +0000
From: Daniel Drake <dsd@...top.org>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: devicetree-discuss <devicetree-discuss@...ts.ozlabs.org>,
linux-kernel@...r.kernel.org, dilinger@...ued.net
Subject: Re: [PATCH] olpc_battery: bind to device tree
On 23 February 2011 20:34, Grant Likely <grant.likely@...retlab.ca> wrote:
> As mentioned in the other thread, matching by name is strongly
> discouraged. It isn't very accurate and compatible is the preferred
> method for binding devices. 'battery' in particular is highly
> non-specific.
>
> I do understand that you don't have a compatible property in the
> current firmware, and to a certain extent we have to live with what
> we're given by the kernel. However, I think it would be better in the
> OLPC case to find the battery node and add a compatible property
> before registering a platform_device for it. (or use a bus notifier
> to tell you when it is registered, and add 'compatible' at that
> point.) That way we the uncertainty is taken care of in the board
> support code without polluting the driver matching namespace.
Thanks for the review. This and the rest of your feedback makes sense.
Would you mind commenting on exactly how this should look?
Here are the changes i'm planning to make, both to the firmware and
with kernel code as you suggest to fixup device trees for systems with
old firmware:
/battery@...ompatible property added with value "olpc-battery" (XO-1 and XO-1.5)
/pci/isa@...tc@.../compatible property prepended with "olpc-xo1-rtc,"
(XO-1 only)
/pci/display@1,1/dcon device added, name=dcon compatible=olpc-dcon
(XO-1 and XO-1.5)
In addition to the battery patch you reviewed, we plan to make the
olpc-rtc and DCON drivers bind to device tree nodes, which is the
reason behind the other changes.
Daniel
--
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