diff options
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 9 | ||||
-rw-r--r-- | drivers/pinctrl/pinctrl_stm32.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/rockchip/pinctrl_rk3188.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/rockchip/pinctrl_rk3328.c | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 023cc010d3..38c435e37a 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -364,7 +364,7 @@ static int at91_pinctrl_set_state(struct udevice *dev, struct udevice *config) { struct at91_pinctrl_priv *priv = dev_get_priv(dev); const void *blob = gd->fdt_blob; - int node = config->of_offset; + int node = dev_of_offset(config); u32 cells[MAX_PINMUX_ENTRIES]; const u32 *list = cells; u32 bank, pin; diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 1264b52a3b..a38d774ddc 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -79,7 +79,8 @@ static int single_set_state(struct udevice *dev, const struct single_fdt_pin_cfg *prop; int len; - prop = fdt_getprop(fdt, config->of_offset, "pinctrl-single,pins", &len); + prop = fdt_getprop(fdt, dev_of_offset(config), "pinctrl-single,pins", + &len); if (prop) { dev_dbg(dev, "configuring pins for %s\n", config->name); if (len % sizeof(struct single_fdt_pin_cfg)) { @@ -100,10 +101,10 @@ static int single_ofdata_to_platdata(struct udevice *dev) int res; struct single_pdata *pdata = dev->platdata; - pdata->width = fdtdec_get_int(gd->fdt_blob, dev->of_offset, + pdata->width = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "pinctrl-single,register-width", 0); - res = fdtdec_get_int_array(gd->fdt_blob, dev->of_offset, + res = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(dev), "reg", of_reg, 2); if (res) return res; @@ -116,7 +117,7 @@ static int single_ofdata_to_platdata(struct udevice *dev) } pdata->base = addr; - pdata->mask = fdtdec_get_int(gd->fdt_blob, dev->of_offset, + pdata->mask = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "pinctrl-single,function-mask", 0xffffffff); return 0; diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c index d7b5ea3e1c..5bee7fb12a 100644 --- a/drivers/pinctrl/pinctrl_stm32.c +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -101,7 +101,7 @@ static int stm32_pinctrl_set_state_simple(struct udevice *dev, int rv, len; /* Get node pinctrl-0 */ - rv = fdtdec_parse_phandle_with_args(gd->fdt_blob, periph->of_offset, + rv = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(periph), "pinctrl-0", 0, 0, 0, &args); if (rv) return rv; diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3188.c b/drivers/pinctrl/rockchip/pinctrl_rk3188.c index ef94dab210..65c1f665ea 100644 --- a/drivers/pinctrl/rockchip/pinctrl_rk3188.c +++ b/drivers/pinctrl/rockchip/pinctrl_rk3188.c @@ -370,7 +370,7 @@ static int rk3188_pinctrl_get_periph_id(struct udevice *dev, u32 cell[3]; int ret; - ret = fdtdec_get_int_array(gd->fdt_blob, periph->of_offset, + ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph), "interrupts", cell, ARRAY_SIZE(cell)); if (ret < 0) return -EINVAL; @@ -516,7 +516,7 @@ static int rk3188_pinctrl_set_state(struct udevice *dev, struct udevice *config) u32 cell[60], *ptr; debug("%s: %s %s\n", __func__, dev->name, config->name); - ret = fdtdec_get_int_array_count(blob, config->of_offset, + ret = fdtdec_get_int_array_count(blob, dev_of_offset(config), "rockchip,pins", cell, ARRAY_SIZE(cell)); if (ret < 0) { diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3328.c b/drivers/pinctrl/rockchip/pinctrl_rk3328.c index 5ca6782ccc..b6beec5ed0 100644 --- a/drivers/pinctrl/rockchip/pinctrl_rk3328.c +++ b/drivers/pinctrl/rockchip/pinctrl_rk3328.c @@ -347,7 +347,7 @@ static int rk3328_pinctrl_get_periph_id(struct udevice *dev, u32 cell[3]; int ret; - ret = fdtdec_get_int_array(gd->fdt_blob, periph->of_offset, + ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph), "interrupts", cell, ARRAY_SIZE(cell)); if (ret < 0) return -EINVAL; |