summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/rockchip/pinctrl_rk3288.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-04 11:58:30 -0600
committerSimon Glass <sjg@chromium.org>2016-07-14 20:40:24 -0600
commitd95b14ffab33713c3058008bac9c05a792d39a17 (patch)
treecebf333ba9aa607db07d05bd97e1d128a4884a58 /drivers/pinctrl/rockchip/pinctrl_rk3288.c
parent2d143bd6199c6c7ed6513c6a066569f76b1289f4 (diff)
rockchip: pinctrl: Update the rk3288 driver to support of-platdata
Add support for of-platdata with rk3288. This requires disabling access to the device tree and renaming the driver to match the string that of-platdata will search for. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/rockchip/pinctrl_rk3288.c')
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3288.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3288.c b/drivers/pinctrl/rockchip/pinctrl_rk3288.c
index 1fa1daa939..8cb3b8228e 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3288.c
@@ -476,6 +476,7 @@ static int rk3288_pinctrl_request(struct udevice *dev, int func, int flags)
static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
struct udevice *periph)
{
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
u32 cell[3];
int ret;
@@ -506,6 +507,7 @@ static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
case 103:
return PERIPH_ID_HDMI;
}
+#endif
return -ENOENT;
}
@@ -664,8 +666,12 @@ static struct pinctrl_ops rk3288_pinctrl_ops = {
static int rk3288_pinctrl_bind(struct udevice *dev)
{
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+ return 0;
+#else
/* scan child GPIO banks */
return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
+#endif
}
#ifndef CONFIG_SPL_BUILD
@@ -719,7 +725,7 @@ static const struct udevice_id rk3288_pinctrl_ids[] = {
};
U_BOOT_DRIVER(pinctrl_rk3288) = {
- .name = "pinctrl_rk3288",
+ .name = "rockchip_rk3288_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = rk3288_pinctrl_ids,
.priv_auto_alloc_size = sizeof(struct rk3288_pinctrl_priv),