Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / drivers / gpio / imx_rgpio2p.c
index 5abc88ba5477fec5e044765b0e93cc4836d0f9a5..7825714e8003c0e92573c11673013de58034e909 100644 (file)
@@ -168,13 +168,18 @@ static int imx_rgpio2p_bind(struct udevice *dev)
 
        addr = devfdt_get_addr_index(dev, 1);
        if (addr == FDT_ADDR_T_NONE)
-               return -ENODEV;
+               return -EINVAL;
 
        /*
         * TODO:
         * When every board is converted to driver model and DT is supported,
         * this can be done by auto-alloc feature, but not using calloc
         * to alloc memory for platdata.
+        *
+        * For example imx_rgpio2p_plat uses platform data rather than device
+        * tree.
+        *
+        * NOTE: DO NOT COPY this code if you are using device tree.
         */
        plat = calloc(1, sizeof(*plat));
        if (!plat)