pinctrl: sh-pfc: Validate enum IDs for regs with variable-width fields

Add a run-time check to the PINMUX_CFG_REG_VAR() macro, to ensure the
number of provided enum IDs is correct.  This cannot be done at build
time, as the number of values depends on the variable-width fields in
the config register.

This helps catching bugs early.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
Geert Uytterhoeven 2018-12-13 15:48:45 +01:00
commit fa4d36712f
2 changed files with 13 additions and 0 deletions