* [PATCH v1 1/1] pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges()
@ 2026-01-13 10:07 Andy Shevchenko
2026-01-13 11:55 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-01-13 10:07 UTC (permalink / raw)
To: Andy Shevchenko, linux-gpio, linux-kernel
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij
Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
custom approach. Convert it now.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-lynxpoint.c | 27 +++++++++--------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
index 1565eefdd4bf..e9233c12e824 100644
--- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c
+++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
@@ -29,10 +29,12 @@
#include "pinctrl-intel.h"
-#define COMMUNITY(p, n) \
+#define LPTLP_COMMUNITY(p, n, g) \
{ \
.pin_base = (p), \
.npins = (n), \
+ .gpps = (g), \
+ .ngpps = ARRAY_SIZE(g), \
}
static const struct pinctrl_pin_desc lptlp_pins[] = {
@@ -133,8 +135,14 @@ static const struct pinctrl_pin_desc lptlp_pins[] = {
PINCTRL_PIN(94, "GP94_UART0_CTSB"),
};
+static const struct intel_padgroup lptlp_gpps[] = {
+ INTEL_GPP(0, 0, 31, 0),
+ INTEL_GPP(1, 32, 63, 32),
+ INTEL_GPP(2, 64, 94, 64),
+};
+
static const struct intel_community lptlp_communities[] = {
- COMMUNITY(0, 95),
+ LPTLP_COMMUNITY(0, 95, lptlp_gpps),
};
static const struct intel_pinctrl_soc_data lptlp_soc_data = {
@@ -692,19 +700,6 @@ static int lp_gpio_irq_init_hw(struct gpio_chip *chip)
return 0;
}
-static int lp_gpio_add_pin_ranges(struct gpio_chip *chip)
-{
- struct intel_pinctrl *lg = gpiochip_get_data(chip);
- struct device *dev = lg->dev;
- int ret;
-
- ret = gpiochip_add_pin_range(chip, dev_name(dev), 0, 0, lg->soc->npins);
- if (ret)
- return dev_err_probe(dev, ret, "failed to add GPIO pin range\n");
-
- return 0;
-}
-
static int lp_gpio_probe(struct platform_device *pdev)
{
const struct intel_pinctrl_soc_data *soc;
@@ -777,7 +772,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
gc->base = -1;
gc->ngpio = LP_NUM_GPIO;
gc->can_sleep = false;
- gc->add_pin_ranges = lp_gpio_add_pin_ranges;
+ gc->add_pin_ranges = intel_gpio_add_pin_ranges;
gc->parent = dev;
/* set up interrupts */
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges()
2026-01-13 10:07 [PATCH v1 1/1] pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges() Andy Shevchenko
@ 2026-01-13 11:55 ` Mika Westerberg
2026-01-13 20:47 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2026-01-13 11:55 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij
On Tue, Jan 13, 2026 at 11:07:26AM +0100, Andy Shevchenko wrote:
> Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
> custom approach. Convert it now.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges()
2026-01-13 11:55 ` Mika Westerberg
@ 2026-01-13 20:47 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-01-13 20:47 UTC (permalink / raw)
To: Mika Westerberg; +Cc: linux-gpio, linux-kernel, Andy Shevchenko, Linus Walleij
On Tue, Jan 13, 2026 at 12:55:58PM +0100, Mika Westerberg wrote:
> On Tue, Jan 13, 2026 at 11:07:26AM +0100, Andy Shevchenko wrote:
> > Driver is ready to use intel_gpio_add_pin_ranges() directly instead of
> > custom approach. Convert it now.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Pushed to my review and testing queue, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-13 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 10:07 [PATCH v1 1/1] pinctrl: lynxpoint: Convert to use intel_gpio_add_pin_ranges() Andy Shevchenko
2026-01-13 11:55 ` Mika Westerberg
2026-01-13 20:47 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox