[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55E4FE2C.4040409@ti.com>
Date: Tue, 1 Sep 2015 10:23:56 +0900
From: "Kim, Milo" <milo.kim@...com>
To: Rob Herring <robherring2@...il.com>
CC: Grant Likely <grant.likely@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Felipe Balbi <balbi@...com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lee Jones <lee.jones@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Samuel Ortiz <sameo@...ux.intel.com>,
Tony Lindgren <tony@...mide.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 0/4] of: introduce of_dev_get_platdata()
Hi Rob,
On 8/28/2015 9:59 PM, Rob Herring wrote:
> On Fri, Aug 28, 2015 at 4:12 AM, Milo Kim<milo.kim@...com> wrote:
>> >New function, 'of_dev_get_platdata()'
>> > - provides unified handling of getting device platform data
>> > - supports DT and non-DT(legacy) cases
>> > - removes duplicated code from each driver
>> > - keeps driver specific code simple in each driver
> This works in cases where DT data and platform_data are aligned. In
> many cases they are not. A common binding problem is people blindly
> copying platform_data fields to DT properties for things that are not
> h/w properties. I worry that this would encourage this behavior.
OK, got your point. Thanks.
>
> We already have a generalized method for retrieving properties
> independent of DT or ACPI. There's no reason this couldn't be extended
> to retrieve properties out of platform_data using the same interface.
>
> Also, perhaps in some drivers we can remove platform_data now if all
> users are converted to DT.
This work requires two steps.
1) remove platform data configuration from board-*.c
2) if all host/platform support only the DT, then move device platform
data structure in a header to each driver space.
However, I'm concerning about some use case.
After this cleanup, drivers may not work properly in some platforms
which do not support the DT. There is no way to configure HW properties.
Drivers should run on any kind of hosts(processors) so I'm thinking
about the compatibility/dependency issue. Am I missing something?
Milo
--
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