pinctrl: uniphier: add check if pins are valid
authorDai Okamura <okamura.dai@socionext.com>
Fri, 9 Dec 2022 11:33:46 +0000 (20:33 +0900)
committerTom Rini <trini@konsulko.com>
Mon, 2 Jan 2023 19:10:23 +0000 (14:10 -0500)
commit1e91a0ea326f2005d34921c4bc37a35eeccad368
tree97a9f80ed90bfcb313eccd32cb774c53b2b538d9
parentbd8851c5b4984ffb26f55872c4e086d91989bc9a
pinctrl: uniphier: add check if pins are valid

The pinctrl datas of uniphier SoCs are the minimal subsets of kernel's one,
and some tables has no data to save the footprint size.
If the board dts tries to match a pin name on no pins defined SoC,
the footprint magic code causes "Synchronous Abort".

This checks if the 'pins' data is valid,
and if empty, avoids the abort with the warning as follows:

  WARNING at drivers/pinctrl/uniphier/pinctrl-uniphier-core.c:36/uniphier_pinctrl_get_pins_count()!
  pinctrl_select_state_full: pinctrl_config_one: err=-38

Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c