All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support.
@ 2017-06-29 13:32 Mykola Kostenok
  2017-06-30  1:39 ` Andrew Jeffery
  0 siblings, 1 reply; 4+ messages in thread
From: Mykola Kostenok @ 2017-06-29 13:32 UTC (permalink / raw)
  To: Joel Stanley, openbmc; +Cc: Mykola Kostenok

To allow support gpio class infrastructure for Aspeed SOC.
To allow gpio_to_irq conversion.

Enable irqchip and libgpio_irqchip for aspeed-g5.

Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
---
 arch/arm/mach-aspeed/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig
index f3f8c5c658db..e098b7a780ee 100644
--- a/arch/arm/mach-aspeed/Kconfig
+++ b/arch/arm/mach-aspeed/Kconfig
@@ -27,6 +27,9 @@ config MACH_ASPEED_G5
 	depends on ARCH_MULTI_V6
 	select CPU_V6
 	select PINCTRL_ASPEED_G5
+	select GENERIC_IRQ_CHIP
+	select GPIOLIB_IRQCHIP
+
 	help
 	 Say yes if you intend to run on an Aspeed ast2500 or similar
 	 fifth generation Aspeed BMCs.
-- 
2.11.0

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

* Re: [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support.
  2017-06-29 13:32 [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support Mykola Kostenok
@ 2017-06-30  1:39 ` Andrew Jeffery
  2017-06-30  4:44   ` Vadim Pasternak
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Jeffery @ 2017-06-30  1:39 UTC (permalink / raw)
  To: Mykola Kostenok, Joel Stanley, openbmc

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

Hi Mykola,

On Thu, 2017-06-29 at 16:32 +0300, Mykola Kostenok wrote:
> To allow support gpio class infrastructure for Aspeed SOC.
> To allow gpio_to_irq conversion.
> 
> Enable irqchip and libgpio_irqchip for aspeed-g5.
> 
> > Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
> ---
>  arch/arm/mach-aspeed/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig
> index f3f8c5c658db..e098b7a780ee 100644
> --- a/arch/arm/mach-aspeed/Kconfig
> +++ b/arch/arm/mach-aspeed/Kconfig
> @@ -27,6 +27,9 @@ config MACH_ASPEED_G5
> >  	depends on ARCH_MULTI_V6
> >  	select CPU_V6
> >  	select PINCTRL_ASPEED_G5
> > +	select GENERIC_IRQ_CHIP
> +	select GPIOLIB_IRQCHIP

Sorry, I don't understand the need for this; CONFIG_GPIOLIB_IRQCHIP is
already selected by CONFIG_GPIO_ASPEED, which is enabled by the
aspeed_g5_defconfig. I don't think we need to do this here.

Further, what problem are you trying to solve? From my testing GPIO
interrupts are functional.

Cheers,

Andrew

> +
> >  	help
> >  	 Say yes if you intend to run on an Aspeed ast2500 or similar
> >  	 fifth generation Aspeed BMCs.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* RE: [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support.
  2017-06-30  1:39 ` Andrew Jeffery
@ 2017-06-30  4:44   ` Vadim Pasternak
  2017-06-30  6:23     ` Andrew Jeffery
  0 siblings, 1 reply; 4+ messages in thread
From: Vadim Pasternak @ 2017-06-30  4:44 UTC (permalink / raw)
  To: Andrew Jeffery, Mykola Kostenok, Joel Stanley, openbmc

Hi Andrew,

> -----Original Message-----
> From: openbmc [mailto:openbmc-
> bounces+yanivab=mellanox.com@lists.ozlabs.org] On Behalf Of Andrew
> Jeffery
> Sent: Friday, June 30, 2017 4:39 AM
> To: Mykola Kostenok <c_mykolak@mellanox.com>; Joel Stanley
> <joel@jms.id.au>; openbmc@lists.ozlabs.org
> Subject: Re: [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support.
> 
> Hi Mykola,
> 
> On Thu, 2017-06-29 at 16:32 +0300, Mykola Kostenok wrote:
> > To allow support gpio class infrastructure for Aspeed SOC.
> > To allow gpio_to_irq conversion.
> >
> > Enable irqchip and libgpio_irqchip for aspeed-g5.
> >
> > > Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
> > ---
> >  arch/arm/mach-aspeed/Kconfig | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm/mach-aspeed/Kconfig
> > b/arch/arm/mach-aspeed/Kconfig index f3f8c5c658db..e098b7a780ee
> 100644
> > --- a/arch/arm/mach-aspeed/Kconfig
> > +++ b/arch/arm/mach-aspeed/Kconfig
> > @@ -27,6 +27,9 @@ config MACH_ASPEED_G5
> > >  	depends on ARCH_MULTI_V6
> > >  	select CPU_V6
> > >  	select PINCTRL_ASPEED_G5
> > > +	select GENERIC_IRQ_CHIP
> > +	select GPIOLIB_IRQCHIP
> 
> Sorry, I don't understand the need for this; CONFIG_GPIOLIB_IRQCHIP is
> already selected by CONFIG_GPIO_ASPEED, which is enabled by the
> aspeed_g5_defconfig. I don't think we need to do this here.
> 
> Further, what problem are you trying to solve? From my testing GPIO
> interrupts are functional.
> 

We have the number of CPLDs with the internal interrupt control logic. Interrupts on top routed through the particular GPIO to SoC.
The motivation was to specify top aggregation interrupt for CPLD driver in DTS with GPIO pin number and convert it in driver with gpio_to_irq and connect irq to CPLD interrupt handler.

Cheers,
Vadim.

> Cheers,
> 
> Andrew
> 
> > +
> > >  	help
> > >  	 Say yes if you intend to run on an Aspeed ast2500 or similar
> > >  	 fifth generation Aspeed BMCs.

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

* Re: [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support.
  2017-06-30  4:44   ` Vadim Pasternak
@ 2017-06-30  6:23     ` Andrew Jeffery
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2017-06-30  6:23 UTC (permalink / raw)
  To: Vadim Pasternak, Mykola Kostenok, Joel Stanley, openbmc

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

On Fri, 2017-06-30 at 04:44 +0000, Vadim Pasternak wrote:
> > Sorry, I don't understand the need for this; CONFIG_GPIOLIB_IRQCHIP is
> > already selected by CONFIG_GPIO_ASPEED, which is enabled by the
> > aspeed_g5_defconfig. I don't think we need to do this here.
> > 
> > Further, what problem are you trying to solve? From my testing GPIO
> > interrupts are functional.
> > 
> 
> We have the number of CPLDs with the internal interrupt control
> logic. Interrupts on top routed through the particular GPIO to SoC.
> The motivation was to specify top aggregation interrupt for CPLD
> driver in DTS with GPIO pin number and convert it in driver with
> gpio_to_irq and connect irq to CPLD interrupt handler.

Okay; you'll likely want to use gpio*d*_to_irq(), as gpio_to_irq() is
part of the legacy GPIO infrastructure. It doesn't look like you need
GENERIC_IRQ_CHIP to access gpiod_to_irq(), the existing GPIOLIB
dependency should be enough.

If we did need configuration changes, my preference would be to put
them in a defconfig rather than in the arch Kconfig.

Cheers,

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2017-06-30  6:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 13:32 [PATCH linux dev-4.10] aspeed-g5: add gpiolib irqchip support Mykola Kostenok
2017-06-30  1:39 ` Andrew Jeffery
2017-06-30  4:44   ` Vadim Pasternak
2017-06-30  6:23     ` Andrew Jeffery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.