plat->bank = bank;
ret = device_bind(parent, parent->driver, plat->bank_name, plat,
- ofnode_null(), &dev);
+ node, &dev);
if (ret)
return ret;
- dev->node = node;
bank++;
}
plat->bank_name = fdt_get_name(blob, node, NULL);
ret = device_bind(parent, parent->driver, plat->bank_name, plat,
- ofnode_null(), &dev);
+ offset_to_ofnode(node), &dev);
if (ret)
return ret;
- dev_set_of_offset(dev, node);
-
reg = dev_read_addr(dev);
if (reg != FDT_ADDR_T_NONE)
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
plat->gpio_count = SUNXI_GPIOS_PER_BANK;
ret = device_bind(parent, parent->driver, plat->bank_name, plat,
- ofnode_null(), &dev);
+ dev_ofnode(parent), &dev);
if (ret)
return ret;
- dev_set_of_offset(dev, dev_of_offset(parent));
}
return 0;
plat->regs = &(regs[ctlr_data->ports[port].offset / 4]);
ret = device_bind(parent, parent->driver, plat->name, plat,
- ofnode_null(), &dev);
+ dev_ofnode(parent), &dev);
if (ret)
return ret;
- dev_set_of_offset(dev, dev_of_offset(parent));
}
return 0;
plat->port_name = gpio_port_name(base_port);
ret = device_bind(parent, parent->driver,
- plat->port_name, plat, ofnode_null(),
- &dev);
+ plat->port_name, plat,
+ dev_ofnode(parent), &dev);
if (ret)
return ret;
- dev_set_of_offset(dev, dev_of_offset(parent));
}
}
/* Create child device UCLASS_GPIO and bind it */
device_bind(dev, priv->data->gpio_driver, name, NULL,
offset_to_ofnode(gpio), &gpio_dev);
- dev_set_of_offset(gpio_dev, gpio);
return 0;
}