diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-01-10 16:19:26 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-02-21 15:57:44 +0300 |
commit | 0e6cd847a420e21f6e0d476c355127a7cbcb4a5d (patch) | |
tree | 453d308e5711f108b956139df8a6927bbcd19b87 /drivers/pinctrl/sh-pfc | |
parent | 4bd7d16a309e034ec92b13840bae5668918ddd5b (diff) | |
download | linux-0e6cd847a420e21f6e0d476c355127a7cbcb4a5d.tar.xz |
pinctrl: sh-pfc: checker: Add data register checks
Add checks for data register descriptors:
1. Register addresses must be unique.
2. Enum ID values must be unique.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20200110131927.1029-13-geert+renesas@glider.be
Diffstat (limited to 'drivers/pinctrl/sh-pfc')
-rw-r--r-- | drivers/pinctrl/sh-pfc/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 42432db4fc0b..da2baa9446ce 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -1004,6 +1004,14 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info) /* Check ioctrl registers */ for (i = 0; info->ioctrl_regs && info->ioctrl_regs[i].reg; i++) sh_pfc_check_reg(drvname, info->ioctrl_regs[i].reg); + + /* Check data registers */ + for (i = 0; info->data_regs && info->data_regs[i].reg; i++) { + sh_pfc_check_reg(drvname, info->data_regs[i].reg); + sh_pfc_check_reg_enums(drvname, info->data_regs[i].reg, + info->data_regs[i].enum_ids, + info->data_regs[i].reg_width); + } } static void __init sh_pfc_check_driver(const struct platform_driver *pdrv) |