* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
@ 2019-08-20 7:12 ` Linus Walleij
0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2019-08-20 7:12 UTC (permalink / raw)
To: Andy Shevchenko, Thierry Reding
Cc: Salil Mehta, jinying, Tangkunshan, Liguozhu (Kenneth), John Garry,
Rafael J. Wysocki, Linux Kernel Mailing List, Wei Xu, Linuxarm,
open list:GPIO SUBSYSTEM, Shameerali Kolothum Thodi, huangdaode,
Jonathan Cameron, Shiju Jose, Mika Westerberg, Zhangyi ac,
linux-arm Mailing List, Len Brown
On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> The proper fix is to revert the culprit since we call
> acpi_gpiochip_request_interrupts() for all controllers.
> Linus, please re-do the approach with IRQ handling,
Exactly what do you refer to when you want me to
"re-do the approach for IRQ handling"? Do you mean
this driver or are you referring to:
commit e0d89728981393b7d694bd3419b7794b9882c92d
Author: Thierry Reding <treding@nvidia.com>
Date: Tue Nov 7 19:15:54 2017 +0100
gpio: Implement tighter IRQ chip integration
Currently GPIO drivers are required to add the GPIO chip and its
corresponding IRQ chip separately, which can result in a lot of
boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
struct gpio_chip, that drivers can fill in if they want the GPIO core
to automatically register the IRQ chip associated with a GPIO chip.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
The new API introduced by this patch is what I am trying to switch
everything over to, because the forked paths inside of gpiolib
is causing me a maintenance headache and also increasing
the footprint of the library.
> it seems broadly
> regress with ACPI enabled platforms.
It only becomes a problem if the platform uses ACPI right?
But it's a problem if I can't really tell if a driver is using
ACPI or not, there is no sign in the pl061 driver that it would
be used on ACPI systems until now, so how do I design
for it?
The problem comes from the problem/mess I am trying to
clean up in the first place. So if the new way of registering GPIO
irqchips is not working for ACPI, then we have to fix that instead
of reverting all attempts to use the new API IMO.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
2019-08-20 7:12 ` Linus Walleij
@ 2019-08-20 8:29 ` Andy Shevchenko
-1 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2019-08-20 8:29 UTC (permalink / raw)
To: Linus Walleij
Cc: Thierry Reding, Wei Xu, open list:GPIO SUBSYSTEM,
Linux Kernel Mailing List, linux-arm Mailing List,
Rafael J. Wysocki, Len Brown, Mika Westerberg, Linuxarm,
Shameerali Kolothum Thodi, Jonathan Cameron, John Garry,
Salil Mehta, Shiju Jose, jinying, Zhangyi ac, Liguozhu (Kenneth),
Tangkunshan, huangdaode
On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>
> > The proper fix is to revert the culprit since we call
> > acpi_gpiochip_request_interrupts() for all controllers.
> > Linus, please re-do the approach with IRQ handling,
>
> Exactly what do you refer to when you want me to
> "re-do the approach for IRQ handling"? Do you mean
> this driver or are you referring to:
>
> commit e0d89728981393b7d694bd3419b7794b9882c92d
> Author: Thierry Reding <treding@nvidia.com>
> Date: Tue Nov 7 19:15:54 2017 +0100
>
> gpio: Implement tighter IRQ chip integration
>
> Currently GPIO drivers are required to add the GPIO chip and its
> corresponding IRQ chip separately, which can result in a lot of
> boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> struct gpio_chip, that drivers can fill in if they want the GPIO core
> to automatically register the IRQ chip associated with a GPIO chip.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> The new API introduced by this patch is what I am trying to switch
> everything over to, because the forked paths inside of gpiolib
> is causing me a maintenance headache and also increasing
> the footprint of the library.
>
> > it seems broadly
> > regress with ACPI enabled platforms.
>
> It only becomes a problem if the platform uses ACPI right?
> But it's a problem if I can't really tell if a driver is using
> ACPI or not, there is no sign in the pl061 driver that it would
> be used on ACPI systems until now, so how do I design
> for it?
>
> The problem comes from the problem/mess I am trying to
> clean up in the first place. So if the new way of registering GPIO
> irqchips is not working for ACPI, then we have to fix that instead
> of reverting all attempts to use the new API IMO.
>
> Yours,
> Linus Walleij
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
@ 2019-08-20 8:29 ` Andy Shevchenko
0 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2019-08-20 8:29 UTC (permalink / raw)
To: Linus Walleij
Cc: Salil Mehta, jinying, Tangkunshan, Liguozhu (Kenneth), John Garry,
Rafael J. Wysocki, Linux Kernel Mailing List, Wei Xu, Linuxarm,
open list:GPIO SUBSYSTEM, Shiju Jose, Shameerali Kolothum Thodi,
huangdaode, Jonathan Cameron, Thierry Reding, Mika Westerberg,
Zhangyi ac, linux-arm Mailing List, Len Brown
On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>
> > The proper fix is to revert the culprit since we call
> > acpi_gpiochip_request_interrupts() for all controllers.
> > Linus, please re-do the approach with IRQ handling,
>
> Exactly what do you refer to when you want me to
> "re-do the approach for IRQ handling"? Do you mean
> this driver or are you referring to:
>
> commit e0d89728981393b7d694bd3419b7794b9882c92d
> Author: Thierry Reding <treding@nvidia.com>
> Date: Tue Nov 7 19:15:54 2017 +0100
>
> gpio: Implement tighter IRQ chip integration
>
> Currently GPIO drivers are required to add the GPIO chip and its
> corresponding IRQ chip separately, which can result in a lot of
> boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> struct gpio_chip, that drivers can fill in if they want the GPIO core
> to automatically register the IRQ chip associated with a GPIO chip.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> The new API introduced by this patch is what I am trying to switch
> everything over to, because the forked paths inside of gpiolib
> is causing me a maintenance headache and also increasing
> the footprint of the library.
>
> > it seems broadly
> > regress with ACPI enabled platforms.
>
> It only becomes a problem if the platform uses ACPI right?
> But it's a problem if I can't really tell if a driver is using
> ACPI or not, there is no sign in the pl061 driver that it would
> be used on ACPI systems until now, so how do I design
> for it?
>
> The problem comes from the problem/mess I am trying to
> clean up in the first place. So if the new way of registering GPIO
> irqchips is not working for ACPI, then we have to fix that instead
> of reverting all attempts to use the new API IMO.
>
> Yours,
> Linus Walleij
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
2019-08-20 7:12 ` Linus Walleij
@ 2019-08-20 8:51 ` Andy Shevchenko
-1 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2019-08-20 8:51 UTC (permalink / raw)
To: Linus Walleij
Cc: Thierry Reding, Wei Xu, open list:GPIO SUBSYSTEM,
Linux Kernel Mailing List, linux-arm Mailing List,
Rafael J. Wysocki, Len Brown, Mika Westerberg, Linuxarm,
Shameerali Kolothum Thodi, Jonathan Cameron, John Garry,
Salil Mehta, Shiju Jose, jinying, Zhangyi ac, Liguozhu (Kenneth),
Tangkunshan, huangdaode
On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>
> > The proper fix is to revert the culprit since we call
> > acpi_gpiochip_request_interrupts() for all controllers.
> > Linus, please re-do the approach with IRQ handling,
>
> Exactly what do you refer to when you want me to
> "re-do the approach for IRQ handling"? Do you mean
> this driver or are you referring to:
>
> commit e0d89728981393b7d694bd3419b7794b9882c92d
> Author: Thierry Reding <treding@nvidia.com>
> Date: Tue Nov 7 19:15:54 2017 +0100
>
> gpio: Implement tighter IRQ chip integration
>
> Currently GPIO drivers are required to add the GPIO chip and its
> corresponding IRQ chip separately, which can result in a lot of
> boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> struct gpio_chip, that drivers can fill in if they want the GPIO core
> to automatically register the IRQ chip associated with a GPIO chip.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Yes.
> The new API introduced by this patch is what I am trying to switch
> everything over to, because the forked paths inside of gpiolib
> is causing me a maintenance headache and also increasing
> the footprint of the library.
Yes, I understand.
> > it seems broadly
> > regress with ACPI enabled platforms.
>
> It only becomes a problem if the platform uses ACPI right?
Unfortunately yes. Though in this case it was working and stopped working.
> But it's a problem if I can't really tell if a driver is using
> ACPI or not, there is no sign in the pl061 driver that it would
> be used on ACPI systems until now, so how do I design
> for it?
It's hidden under amba_driver_register() which works for all
registered thru drivers/acpi/acpi_amba.c.
I agree this is not straightforward.
> The problem comes from the problem/mess I am trying to
> clean up in the first place. So if the new way of registering GPIO
> irqchips is not working for ACPI, then we have to fix that instead
> of reverting all attempts to use the new API IMO.
Sorry for me being impatient and asking for a groundless requests.
I'll help you with cleaning this.
--
With Best Regards,
Andy Shevchenko
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
@ 2019-08-20 8:51 ` Andy Shevchenko
0 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2019-08-20 8:51 UTC (permalink / raw)
To: Linus Walleij
Cc: Salil Mehta, jinying, Tangkunshan, Liguozhu (Kenneth), John Garry,
Rafael J. Wysocki, Linux Kernel Mailing List, Wei Xu, Linuxarm,
open list:GPIO SUBSYSTEM, Shiju Jose, Shameerali Kolothum Thodi,
huangdaode, Jonathan Cameron, Thierry Reding, Mika Westerberg,
Zhangyi ac, linux-arm Mailing List, Len Brown
On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>
> > The proper fix is to revert the culprit since we call
> > acpi_gpiochip_request_interrupts() for all controllers.
> > Linus, please re-do the approach with IRQ handling,
>
> Exactly what do you refer to when you want me to
> "re-do the approach for IRQ handling"? Do you mean
> this driver or are you referring to:
>
> commit e0d89728981393b7d694bd3419b7794b9882c92d
> Author: Thierry Reding <treding@nvidia.com>
> Date: Tue Nov 7 19:15:54 2017 +0100
>
> gpio: Implement tighter IRQ chip integration
>
> Currently GPIO drivers are required to add the GPIO chip and its
> corresponding IRQ chip separately, which can result in a lot of
> boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> struct gpio_chip, that drivers can fill in if they want the GPIO core
> to automatically register the IRQ chip associated with a GPIO chip.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Yes.
> The new API introduced by this patch is what I am trying to switch
> everything over to, because the forked paths inside of gpiolib
> is causing me a maintenance headache and also increasing
> the footprint of the library.
Yes, I understand.
> > it seems broadly
> > regress with ACPI enabled platforms.
>
> It only becomes a problem if the platform uses ACPI right?
Unfortunately yes. Though in this case it was working and stopped working.
> But it's a problem if I can't really tell if a driver is using
> ACPI or not, there is no sign in the pl061 driver that it would
> be used on ACPI systems until now, so how do I design
> for it?
It's hidden under amba_driver_register() which works for all
registered thru drivers/acpi/acpi_amba.c.
I agree this is not straightforward.
> The problem comes from the problem/mess I am trying to
> clean up in the first place. So if the new way of registering GPIO
> irqchips is not working for ACPI, then we have to fix that instead
> of reverting all attempts to use the new API IMO.
Sorry for me being impatient and asking for a groundless requests.
I'll help you with cleaning this.
--
With Best Regards,
Andy Shevchenko
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
2019-08-20 8:51 ` Andy Shevchenko
@ 2019-08-20 10:26 ` Linus Walleij
-1 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2019-08-20 10:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Thierry Reding, Wei Xu, open list:GPIO SUBSYSTEM,
Linux Kernel Mailing List, linux-arm Mailing List,
Rafael J. Wysocki, Len Brown, Mika Westerberg, Linuxarm,
Shameerali Kolothum Thodi, Jonathan Cameron, John Garry,
Salil Mehta, Shiju Jose, jinying, Zhangyi ac, Liguozhu (Kenneth),
Tangkunshan, huangdaode
On Tue, Aug 20, 2019 at 10:51 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > Exactly what do you refer to when you want me to
> > "re-do the approach for IRQ handling"? Do you mean
> > this driver or are you referring to:
> >
> > commit e0d89728981393b7d694bd3419b7794b9882c92d
> > Author: Thierry Reding <treding@nvidia.com>
> > Date: Tue Nov 7 19:15:54 2017 +0100
> >
> > gpio: Implement tighter IRQ chip integration
> >
> > Currently GPIO drivers are required to add the GPIO chip and its
> > corresponding IRQ chip separately, which can result in a lot of
> > boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> > struct gpio_chip, that drivers can fill in if they want the GPIO core
> > to automatically register the IRQ chip associated with a GPIO chip.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yes.
OK let's fix this mess, it shouldn't be too hard, I've sent a first
few patches.
> > The problem comes from the problem/mess I am trying to
> > clean up in the first place. So if the new way of registering GPIO
> > irqchips is not working for ACPI, then we have to fix that instead
> > of reverting all attempts to use the new API IMO.
>
> Sorry for me being impatient and asking for a groundless requests.
> I'll help you with cleaning this.
Sorry if I sounded harsh :( I just have a bit of panic.
I am sure we can fix this, I only recently realized what a headache
the new API is going to be if I can't straighten it out and have to
keep the old stuff around forever in parallel.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3] gpio: pl061: Fix the issue failed to register the ACPI interrtupion
@ 2019-08-20 10:26 ` Linus Walleij
0 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2019-08-20 10:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Salil Mehta, jinying, Tangkunshan, Liguozhu (Kenneth), John Garry,
Rafael J. Wysocki, Linux Kernel Mailing List, Wei Xu, Linuxarm,
open list:GPIO SUBSYSTEM, Shiju Jose, Shameerali Kolothum Thodi,
huangdaode, Jonathan Cameron, Thierry Reding, Mika Westerberg,
Zhangyi ac, linux-arm Mailing List, Len Brown
On Tue, Aug 20, 2019 at 10:51 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Aug 20, 2019 at 10:12 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Mon, Aug 19, 2019 at 5:07 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > Exactly what do you refer to when you want me to
> > "re-do the approach for IRQ handling"? Do you mean
> > this driver or are you referring to:
> >
> > commit e0d89728981393b7d694bd3419b7794b9882c92d
> > Author: Thierry Reding <treding@nvidia.com>
> > Date: Tue Nov 7 19:15:54 2017 +0100
> >
> > gpio: Implement tighter IRQ chip integration
> >
> > Currently GPIO drivers are required to add the GPIO chip and its
> > corresponding IRQ chip separately, which can result in a lot of
> > boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in
> > struct gpio_chip, that drivers can fill in if they want the GPIO core
> > to automatically register the IRQ chip associated with a GPIO chip.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yes.
OK let's fix this mess, it shouldn't be too hard, I've sent a first
few patches.
> > The problem comes from the problem/mess I am trying to
> > clean up in the first place. So if the new way of registering GPIO
> > irqchips is not working for ACPI, then we have to fix that instead
> > of reverting all attempts to use the new API IMO.
>
> Sorry for me being impatient and asking for a groundless requests.
> I'll help you with cleaning this.
Sorry if I sounded harsh :( I just have a bit of panic.
I am sure we can fix this, I only recently realized what a headache
the new API is going to be if I can't straighten it out and have to
keep the old stuff around forever in parallel.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 16+ messages in thread