Re: [RFC 0/4] of: introduce of_dev_get_platdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxx>  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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux