diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-11-27 16:54:43 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-11-29 13:44:52 +0100 |
commit | a60eac3239f01838bdd34eaac8c486c4c6e84551 (patch) | |
tree | 8a4cef7154608e4958821be85afaeea817a05da8 /drivers/pinctrl/intel/pinctrl-intel.h | |
parent | 03c4749dd6c7ff948a0ce59a44a1b97c015353c2 (diff) | |
download | lwn-a60eac3239f01838bdd34eaac8c486c4c6e84551.tar.gz lwn-a60eac3239f01838bdd34eaac8c486c4c6e84551.zip |
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>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-intel.h')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h index 13b0bd6eb2a2..98fdf9adf623 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.h +++ b/drivers/pinctrl/intel/pinctrl-intel.h @@ -51,6 +51,8 @@ struct intel_function { * @reg_num: GPI_IS register number * @base: Starting pin of this group * @size: Size of this group (maximum is 32). + * @gpio_base: Starting GPIO base of this group (%0 if matches with @base, + * and %-1 if no GPIO mapping should be created) * @padown_num: PAD_OWN register number (assigned by the core driver) * * If pad groups of a community are not the same size, use this structure @@ -60,6 +62,7 @@ struct intel_padgroup { unsigned reg_num; unsigned base; unsigned size; + int gpio_base; unsigned padown_num; }; |