On Thu, May 07, 2015 at 05:34:27AM +0000, Bard Liao wrote:
We should really be using device_property_() instead of of_property_() APIs since we will have to support both DT and ACPI properties.
Unfortunately, I can't find a way to test it.
Why can't you test it - weren't you testing your original version of the code?
Is that ok we just replace all of_property_ with device_property_? Also, is there any corresponding API for of_get_named_gpio? Or we can replace it with device_property_read_u32? I tried the change above, and it can build. However I don't know if it can work.
You shouldn't be using of_get_named_gpio() for DT stuff either, use gpiod_get() which follows the usual pattern of taking a string which is used to do the lookup with whatever firmware is in use.