diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-11-18 15:14:06 +0100 |
|---|---|---|
| committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2025-11-18 15:14:06 +0100 |
| commit | 8daf70e6aa4118fa71a9eb5f361f1a29567e12ed (patch) | |
| tree | a05cef3f752fa048878280d0310efdb04fb33579 /drivers/pinctrl/intel/pinctrl-intel.c | |
| parent | 885b92bad87aed46a75cfd6f6924a2fda4af2166 (diff) | |
| parent | 3bcfd55bedfc62e73cc36395e77a67827116cfcd (diff) | |
Merge patch series "pinctrl: intel: Export intel_gpio_add_pin_ranges() and use it"
Andy Shevchenko <andriy.shevchenko@linux.intel.com> says:
Deduplicate more code with help of being exported intel_gpio_add_pin_ranges().
Link: https://patch.msgid.link/20251118123444.1217863-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-intel.c')
| -rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 1e2f77d200f9..cf9db8ac0f42 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1345,7 +1345,16 @@ static int intel_gpio_irq_init_hw(struct gpio_chip *gc) return 0; } -static int intel_gpio_add_pin_ranges(struct gpio_chip *gc) +/** + * intel_gpio_add_pin_ranges - add GPIO pin ranges for all groups in all communities + * @gc: GPIO chip structure + * + * This function iterates over all communities and all groups and adds the respective + * GPIO pin ranges, so the GPIO library will correctly map a GPIO offset to a pin number. + * + * Return: 0, or negative error code if range can't be added. + */ +int intel_gpio_add_pin_ranges(struct gpio_chip *gc) { struct intel_pinctrl *pctrl = gpiochip_get_data(gc); const struct intel_community *community; @@ -1362,6 +1371,7 @@ static int intel_gpio_add_pin_ranges(struct gpio_chip *gc) return 0; } +EXPORT_SYMBOL_NS_GPL(intel_gpio_add_pin_ranges, "PINCTRL_INTEL"); static unsigned int intel_gpio_ngpio(const struct intel_pinctrl *pctrl) { |
