pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 7 Jan 2021 19:01:57 +0000 (21:01 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 8 Jan 2021 12:57:16 +0000 (14:57 +0200)
commit036e126c72eb29b9464e5868c1ac86f8fd9c8a80
treec9c7af870bd6e40583cf5b0f9b4d7396fc47d0c0
parente71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
pinctrl: intel: Split intel_pinctrl_add_padgroups() for better maintenance

Currently the intel_pinctrl_add_padgroups() is twisted a bit due to
a different nature of the pin control hardware implementations. Thus,
its maintenance is a bit hard. Besides that some pieces of code
are run on all hardware and make this code slightly inefficient,
and moreover, validation for one case is done in a wrong time in a flow
which makes it even slower.

Split intel_pinctrl_add_padgroups() to two functions, one per hardware
implementation, for better maintenance and readability.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pinctrl/intel/pinctrl-intel.c