pinctrl: intel: Allow custom GPIO base for pad groups
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 27 Nov 2017 13:54:43 +0000 (16:54 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Nov 2017 12:44:52 +0000 (13:44 +0100)
commita60eac3239f01838bdd34eaac8c486c4c6e84551
tree8a4cef7154608e4958821be85afaeea817a05da8
parent03c4749dd6c7ff948a0ce59a44a1b97c015353c2
pinctrl: intel: Allow custom GPIO base for pad groups

Currently we always have direct mapping between GPIO numbers and the
hardware pin numbers. However, there are cases where that's not the case
anymore (more about this in the next patch). Instead we need to be able
to specify custom GPIO base for certain pad groups.

To support this, add a new field (gpio_base) to the pad group structure
and update the core Intel pinctrl driver to handle this accordingly.
Passing 0 as gpio_base will use direct mapping so the existing drivers
do not need to be modified. Passing -1 excludes the whole pad group from
having GPIO mapping.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-intel.c
drivers/pinctrl/intel/pinctrl-intel.h