linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/9] gpio: pxa: disable pinctrl calls for MMP_GPIO
       [not found] <20230727162909.6031-1-duje.mihanovic@skole.hr>
@ 2023-07-27 16:28 ` Duje Mihanović
  2023-07-27 16:39   ` Andy Shevchenko
  2023-07-27 16:29 ` [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base Duje Mihanović
  1 sibling, 1 reply; 8+ messages in thread
From: Duje Mihanović @ 2023-07-27 16:28 UTC (permalink / raw)
  To: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski,
	Andy Shevchenko, linux-gpio, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, afaerber,
	Duje Mihanović

Similarly to PXA3xx and MMP2, pinctrl-single isn't capable of setting
pin direction on MMP either.

Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request")
Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/gpio/gpio-pxa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index a1630ed4b741..d92650aecb06 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -238,6 +238,7 @@ static bool pxa_gpio_has_pinctrl(void)
 	switch (gpio_type) {
 	case PXA3XX_GPIO:
 	case MMP2_GPIO:
+	case MMP_GPIO:
 		return false;
 
 	default:
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
       [not found] <20230727162909.6031-1-duje.mihanovic@skole.hr>
  2023-07-27 16:28 ` [PATCH v2 1/9] gpio: pxa: disable pinctrl calls for MMP_GPIO Duje Mihanović
@ 2023-07-27 16:29 ` Duje Mihanović
  2023-07-27 16:40   ` Andy Shevchenko
  1 sibling, 1 reply; 8+ messages in thread
From: Duje Mihanović @ 2023-07-27 16:29 UTC (permalink / raw)
  To: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski,
	Andy Shevchenko, linux-gpio, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, afaerber,
	Duje Mihanović

Fixes the warning in dmesg that static allocation of the base is
deprecated.

This will break some older PXA boards (such as Spitz) as they still
seem to rely on fixed GPIO numbers with gpio_request and such.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
---
 drivers/gpio/gpio-pxa.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index d92650aecb06..b48d142b736d 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -351,6 +351,7 @@ static int pxa_init_gpio_chip(struct pxa_gpio_chip *pchip, int ngpio, void __iom
 
 	pchip->chip.parent = pchip->dev;
 	pchip->chip.label = "gpio-pxa";
+	pchip->chip.base = -1;
 	pchip->chip.direction_input  = pxa_gpio_direction_input;
 	pchip->chip.direction_output = pxa_gpio_direction_output;
 	pchip->chip.get = pxa_gpio_get;
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/9] gpio: pxa: disable pinctrl calls for MMP_GPIO
  2023-07-27 16:28 ` [PATCH v2 1/9] gpio: pxa: disable pinctrl calls for MMP_GPIO Duje Mihanović
@ 2023-07-27 16:39   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2023-07-27 16:39 UTC (permalink / raw)
  To: Duje Mihanović
  Cc: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski, linux-gpio,
	linux-kernel, ~postmarketos/upstreaming, phone-devel, afaerber

On Thu, Jul 27, 2023 at 06:28:59PM +0200, Duje Mihanović wrote:
> Similarly to PXA3xx and MMP2, pinctrl-single isn't capable of setting
> pin direction on MMP either.

Reviewed-by: Andy Shevchenko <andy@kernel.org>

(Hadn't I already given you a tag?)

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
  2023-07-27 16:29 ` [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base Duje Mihanović
@ 2023-07-27 16:40   ` Andy Shevchenko
  2023-07-30 21:18     ` Duje Mihanović
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2023-07-27 16:40 UTC (permalink / raw)
  To: Duje Mihanović
  Cc: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski, linux-gpio,
	linux-kernel, ~postmarketos/upstreaming, phone-devel, afaerber

On Thu, Jul 27, 2023 at 06:29:00PM +0200, Duje Mihanović wrote:
> Fixes the warning in dmesg that static allocation of the base is
> deprecated.

Right.

> This will break some older PXA boards (such as Spitz) as they still
> seem to rely on fixed GPIO numbers with gpio_request and such.

So...? Why do you think this patch can be accepted?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
  2023-07-27 16:40   ` Andy Shevchenko
@ 2023-07-30 21:18     ` Duje Mihanović
  2023-08-07 13:31       ` Linus Walleij
  0 siblings, 1 reply; 8+ messages in thread
From: Duje Mihanović @ 2023-07-30 21:18 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Robert Jarzmik, Linus Walleij, Bartosz Golaszewski, linux-gpio,
	linux-kernel, ~postmarketos/upstreaming, phone-devel, afaerber

On Thursday, July 27, 2023 6:40:24 PM CEST Andy Shevchenko wrote:
> > This will break some older PXA boards (such as Spitz) as they still
> > seem to rely on fixed GPIO numbers with gpio_request and such.
> 
> So...? Why do you think this patch can be accepted?

Understandable, I'll drop it.

Regards,
Duje




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
  2023-07-30 21:18     ` Duje Mihanović
@ 2023-08-07 13:31       ` Linus Walleij
  2023-08-07 13:49         ` Andy Shevchenko
  2023-08-07 15:19         ` Duje Mihanović
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2023-08-07 13:31 UTC (permalink / raw)
  To: Duje Mihanović
  Cc: Andy Shevchenko, Robert Jarzmik, Bartosz Golaszewski, linux-gpio,
	linux-kernel, ~postmarketos/upstreaming, phone-devel, afaerber

On Sun, Jul 30, 2023 at 11:18 PM Duje Mihanović <duje.mihanovic@skole.hr> wrote:
> On Thursday, July 27, 2023 6:40:24 PM CEST Andy Shevchenko wrote:
> > > This will break some older PXA boards (such as Spitz) as they still
> > > seem to rely on fixed GPIO numbers with gpio_request and such.
> >
> > So...? Why do you think this patch can be accepted?
>
> Understandable, I'll drop it.

Or you can fix the real issue! This is what I had to do to fix the
OMAP, all the way down:

8e0285ab95a9 ARM/musb: omap2: Remove global GPIO numbers from TUSB6010
078dc5194c0a ARM: omap2: Rewrite WLAN quirk to use GPIO descriptors
94075d16beef ARM: omap2: Get USB hub reset GPIO from descriptor
d5f4fa60d63a ARM/gpio: Push OMAP2 quirk down into TWL4030 driver
c729baa86042 ARM: omap1: Exorcise the legacy GPIO header
df89de979f0e ARM: omap1: Make serial wakeup GPIOs use descriptors
084b6f216778 ARM: omap1: Fix up the Nokia 770 board device IRQs
e519f0bb64ef ARM/mmc: Convert old mmci-omap to GPIO descriptors
767d83361aaa Input: ads7846 - Convert to use software nodes
480c82daa3e4 ARM: omap1: Remove reliance on GPIO numbers from SX1
4c40db6249ff ARM: omap1: Remove reliance on GPIO numbers from PalmTE
fa1ae0cd897b ARM: omap1: Drop header on AMS Delta
c32c81f3dbdf ARM/mfd/gpio: Fixup TPS65010 regression on OMAP1 OSK1
a47137a5134b mfd/omap1: htc-i2cpld: Convert to a pure GPIO driver
6efac0173cd1 ARM: OMAP1: OSK: fix ohci-omap breakage
45c5775460f3 usb: ohci-omap: Fix descriptor conversion
f3ef38160e3d usb: isp1301-omap: Convert to use GPIO descriptors
15d157e87443 usb: ohci-omap: Convert to use GPIO descriptors
e63201f19438 mmc: omap_hsmmc: Delete platform data GPIO CD and WP

And maybe some more. Yeah it's tough, but it can be done!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
  2023-08-07 13:31       ` Linus Walleij
@ 2023-08-07 13:49         ` Andy Shevchenko
  2023-08-07 15:19         ` Duje Mihanović
  1 sibling, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2023-08-07 13:49 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Duje Mihanović, Andy Shevchenko, Robert Jarzmik,
	Bartosz Golaszewski, linux-gpio, linux-kernel,
	~postmarketos/upstreaming, phone-devel, afaerber

On Mon, Aug 7, 2023 at 4:31 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Sun, Jul 30, 2023 at 11:18 PM Duje Mihanović <duje.mihanovic@skole.hr> wrote:

...

> And maybe some more. Yeah it's tough, but it can be done!

And I will add "earlier started less effort it requires".

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base
  2023-08-07 13:31       ` Linus Walleij
  2023-08-07 13:49         ` Andy Shevchenko
@ 2023-08-07 15:19         ` Duje Mihanović
  1 sibling, 0 replies; 8+ messages in thread
From: Duje Mihanović @ 2023-08-07 15:19 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Andy Shevchenko, Robert Jarzmik, Bartosz Golaszewski, linux-gpio,
	linux-kernel, ~postmarketos/upstreaming, phone-devel, afaerber

On Monday, August 7, 2023 3:31:19 PM CEST Linus Walleij wrote:
> On Sun, Jul 30, 2023 at 11:18 PM Duje Mihanović <duje.mihanovic@skole.hr> 
wrote:
> > Understandable, I'll drop it.
> 
> Or you can fix the real issue! This is what I had to do to fix the
> OMAP, all the way down:
...
> And maybe some more. Yeah it's tough, but it can be done!

I could certainly look into it.

Regards,
Duje




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-07 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230727162909.6031-1-duje.mihanovic@skole.hr>
2023-07-27 16:28 ` [PATCH v2 1/9] gpio: pxa: disable pinctrl calls for MMP_GPIO Duje Mihanović
2023-07-27 16:39   ` Andy Shevchenko
2023-07-27 16:29 ` [PATCH v2 2/9] gpio: pxa: use dynamic allocation of base Duje Mihanović
2023-07-27 16:40   ` Andy Shevchenko
2023-07-30 21:18     ` Duje Mihanović
2023-08-07 13:31       ` Linus Walleij
2023-08-07 13:49         ` Andy Shevchenko
2023-08-07 15:19         ` Duje Mihanović

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).