diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-13 14:18:20 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-04-14 16:17:12 +0300 |
commit | e5a4ab6a55e2308aad546b594c0d8e5b71d21be9 (patch) | |
tree | 2c36c89b04fedc74110c8bfe447072ee5538291c /drivers/pinctrl/intel/pinctrl-intel.h | |
parent | 5707dd73c71bb442e1e617c5c7e8f55823fb7317 (diff) | |
download | linux-e5a4ab6a55e2308aad546b594c0d8e5b71d21be9.tar.xz |
pinctrl: intel: Introduce common flags for GPIO mapping scheme
Few drivers are using the same flag to tell Intel pin control core
how to interpret GPIO base.
Provide a generic flags so all drivers can use.
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/pinctrl-intel.h')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h index c6f066f6d3fb..89f38fae6da7 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.h +++ b/drivers/pinctrl/intel/pinctrl-intel.h @@ -53,8 +53,7 @@ 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) + * @gpio_base: Starting GPIO base of this group * @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 @@ -69,6 +68,17 @@ struct intel_padgroup { }; /** + * enum - Special treatment for GPIO base in pad group + * + * @INTEL_GPIO_BASE_NOMAP: no GPIO mapping should be created + * @INTEL_GPIO_BASE_MATCH: matches with starting pin number + */ +enum { + INTEL_GPIO_BASE_NOMAP = -1, + INTEL_GPIO_BASE_MATCH = 0, +}; + +/** * struct intel_community - Intel pin community description * @barno: MMIO BAR number where registers for this community reside * @padown_offset: Register offset of PAD_OWN register from @regs. If %0 |