lkml.org 
[lkml]   [2011]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] OMAP2PLUS: DSS: Ensure DSS works correctly if display is enabled in bootloader
On Mon, Oct 03, 2011 at 11:34:34AM -0600, Paul Walmsley wrote:
> + devicetree-discuss, lkml
>
> On Mon, 3 Oct 2011, Cousson, Benoit wrote:
>
> > But at that time, device tree was not there...
> > Now, the whole dev_attr stuff will be replaced because device tree is able to
> > provide the driver any kind of custom information that can be retrieved
> > directly from the driver without having to use a pdata in between. So I'm not
> > sure it worth spending too much time on that feature stuff.
> >
> > As an example here is the ongoing GPIO DT migration:
> > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56505.html
> >
> > 3.2 will have the basic DT support using hwmod as a backend, but the idea is
> > that for 3.3, we start removing some information from hwmod to rely on device
> > tree only.
>
> One comment here though -- and I will make this comment on the original
> series too -- is that we should avoid adding direct DT dependencies into
> the driver.
>
> Specifically, these of_get_property() and of_property*() calls in the
> driver aren't right.
>
> We need some way of doing this that is completely independent from the
> device data format. Some way that does not care whether the input data is
> coming from DT, platform_data, ACPI, or whatever the new flavor of the
> year will be next year. Or we need to declare that these of_*() calls are
> not DT-specific, and define them as hooks that the device data format code
> can handle as it pleases.

Generally, I agree. For example, I've been thinking of either
modifying or creating bus_type-agnostic variants of the
platform_get_*() hooks so that the driver can get the data it needs
without knowing what the data source is. (Actually, it already works
that way for platform_devices and DT, but that is only because the DT
code populates the resource table when the device is created).

This works best for well understood things like GPIOs, IRQs, memory
ranges, and the like. It doesn't really work very well for data
specific to the device.

g.



\
 
 \ /
  Last update: 2011-10-04 20:31    [W:0.037 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site