On Fri, Sep 4, 2020 at 4:38 PM Dongchun Zhu <dongchun.zhu@xxxxxxxxxxxx> wrote: > On Wed, 2020-09-02 at 16:51 +0300, Andy Shevchenko wrote: > > On Wed, Sep 02, 2020 at 04:44:21PM +0300, Andy Shevchenko wrote: > > > On Wed, Sep 02, 2020 at 08:01:22PM +0800, Dongchun Zhu wrote: > > > > > > + ret = fwnode_property_read_u32(dev_fwnode(dev), "rotation", &rotation); > > > > > > + ret = fwnode_property_read_u32_array(dev_fwnode(dev), > > > > > > + fwnode_property_read_u32_array(dev_fwnode(dev), > > > > > > + ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency", > > > > > > Btw, can somebody explain, why it's fwnode API and not direct use of device property API? > > > > In all above cases I see no reason why not to use device property API directly. > > > > From the fwnode API's usage: > @fwnode: Firmware node to get the property of. > > It seems dev_fwnode(dev) could return dev->of_node->fwnode if CONFIG_OF > is enabled, or return dev->fwnode if not. So?.. Shouldn't be the above an equivalent to device_property_*(dev, ...)? -- With Best Regards, Andy Shevchenko