diff options
author | Tom Rini <trini@konsulko.com> | 2020-12-14 18:57:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-12-14 18:57:57 -0500 |
commit | 8351a29d2df18c92d8e365cfa848218c3859f3d2 (patch) | |
tree | 5d29001be9accfb8029df9d9ed78fba196ee07b9 /drivers/gpio/tegra186_gpio.c | |
parent | ddaa94978583d07ec515e7226e397221d8cc44c8 (diff) | |
parent | b7bbd553de0d9752f919dfc616f560f6f2504c14 (diff) |
Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next
Driver model tidy-up for livetree
Driver model big rename for consistency
Python 3 clean-ups for patman
Update sandbox serial driver to use membuff
Diffstat (limited to 'drivers/gpio/tegra186_gpio.c')
-rw-r--r-- | drivers/gpio/tegra186_gpio.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c index 6626b5415a..cd1fb65a55 100644 --- a/drivers/gpio/tegra186_gpio.c +++ b/drivers/gpio/tegra186_gpio.c @@ -26,7 +26,7 @@ struct tegra186_gpio_ctlr_data { uint32_t port_count; }; -struct tegra186_gpio_platdata { +struct tegra186_gpio_plat { const char *name; uint32_t *regs; }; @@ -34,7 +34,7 @@ struct tegra186_gpio_platdata { static uint32_t *tegra186_gpio_reg(struct udevice *dev, uint32_t reg, uint32_t gpio) { - struct tegra186_gpio_platdata *plat = dev->platdata; + struct tegra186_gpio_plat *plat = dev->plat; uint32_t index = (reg + (gpio * TEGRA186_GPIO_PER_GPIO_STRIDE)) / 4; return &(plat->regs[index]); @@ -166,7 +166,7 @@ static const struct dm_gpio_ops tegra186_gpio_ops = { */ static int tegra186_gpio_bind(struct udevice *parent) { - struct tegra186_gpio_platdata *parent_plat = parent->platdata; + struct tegra186_gpio_plat *parent_plat = parent->plat; struct tegra186_gpio_ctlr_data *ctlr_data = (struct tegra186_gpio_ctlr_data *)dev_get_driver_data(parent); uint32_t *regs; @@ -181,7 +181,7 @@ static int tegra186_gpio_bind(struct udevice *parent) return -EINVAL; for (port = 0; port < ctlr_data->port_count; port++) { - struct tegra186_gpio_platdata *plat; + struct tegra186_gpio_plat *plat; struct udevice *dev; plat = calloc(1, sizeof(*plat)); @@ -191,10 +191,9 @@ static int tegra186_gpio_bind(struct udevice *parent) plat->regs = &(regs[ctlr_data->ports[port].offset / 4]); ret = device_bind(parent, parent->driver, plat->name, plat, - -1, &dev); + dev_ofnode(parent), &dev); if (ret) return ret; - dev_set_of_offset(dev, dev_of_offset(parent)); } return 0; @@ -202,7 +201,7 @@ static int tegra186_gpio_bind(struct udevice *parent) static int tegra186_gpio_probe(struct udevice *dev) { - struct tegra186_gpio_platdata *plat = dev->platdata; + struct tegra186_gpio_plat *plat = dev->plat; struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); /* Only child devices have ports */ |