diff options
author | Andy Shevchenko | 2020-04-13 14:18:24 +0300 |
---|---|---|
committer | Andy Shevchenko | 2020-04-14 16:17:13 +0300 |
commit | 9bd59157e16c64b45da5315f5b49b659fe51984b (patch) | |
tree | a4ab72ad7f19e25f7e3ce17891d1b380b5bf26b7 /drivers/pinctrl/intel | |
parent | d4b41f8bb26d9c0d526784797a7ea77dba7ed21d (diff) |
pinctrl: intel: Introduce new flag to force GPIO base to be 0
In some cases not the first group would like to have GPIO base to be 0.
It's not possible right now due to 0 has special meaning already. Thus,
introduce a new flag to allow drivers to force GPIO base to be 0 on
a certain group. It's assumed that it can be only one group per device
with such flag enabled.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 3 | ||||
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index a1b286dc7008..6a274e20d926 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1281,6 +1281,9 @@ static int intel_pinctrl_add_padgroups(struct intel_pinctrl *pctrl, case INTEL_GPIO_BASE_MATCH: gpps[i].gpio_base = gpps[i].base; break; + case INTEL_GPIO_BASE_ZERO: + gpps[i].gpio_base = 0; + break; case INTEL_GPIO_BASE_NOMAP: default: break; diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h index 89f38fae6da7..87fc0555ef90 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.h +++ b/drivers/pinctrl/intel/pinctrl-intel.h @@ -70,10 +70,12 @@ struct intel_padgroup { /** * enum - Special treatment for GPIO base in pad group * + * @INTEL_GPIO_BASE_ZERO: force GPIO base to be 0 * @INTEL_GPIO_BASE_NOMAP: no GPIO mapping should be created * @INTEL_GPIO_BASE_MATCH: matches with starting pin number */ enum { + INTEL_GPIO_BASE_ZERO = -2, INTEL_GPIO_BASE_NOMAP = -1, INTEL_GPIO_BASE_MATCH = 0, }; |