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.