rockchip: pinctrl: rk3399: add the of-platdata support
Do not use the API which of-platdata not support. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Added rockchip tag: Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c2868212bb
commit
6657f66418
|
@ -253,6 +253,7 @@ static int rk3399_pinctrl_request(struct udevice *dev, int func, int flags)
|
||||||
static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
|
static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
|
||||||
struct udevice *periph)
|
struct udevice *periph)
|
||||||
{
|
{
|
||||||
|
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||||
u32 cell[3];
|
u32 cell[3];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -283,7 +284,7 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
|
||||||
case 65:
|
case 65:
|
||||||
return PERIPH_ID_SDMMC1;
|
return PERIPH_ID_SDMMC1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,6 +329,8 @@ U_BOOT_DRIVER(pinctrl_rk3399) = {
|
||||||
.of_match = rk3399_pinctrl_ids,
|
.of_match = rk3399_pinctrl_ids,
|
||||||
.priv_auto_alloc_size = sizeof(struct rk3399_pinctrl_priv),
|
.priv_auto_alloc_size = sizeof(struct rk3399_pinctrl_priv),
|
||||||
.ops = &rk3399_pinctrl_ops,
|
.ops = &rk3399_pinctrl_ops,
|
||||||
|
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||||
.bind = dm_scan_fdt_dev,
|
.bind = dm_scan_fdt_dev,
|
||||||
|
#endif
|
||||||
.probe = rk3399_pinctrl_probe,
|
.probe = rk3399_pinctrl_probe,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue