Re: [PATCH] gpiolib: Forbid irqchip default trigger for ACPI enumerated devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, September 12, 2016 02:29:51 PM Mika Westerberg wrote:
> Follow DT and forbid default trigger if the GPIO irqchip device is
> enumerated from ACPI. Triggering for these devices will be configured
> automatically from ACPI interrupt resources provided by the BIOS.
> 
> Suggested-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
> ---
> This is on top of Marc's patch here:
> 
>   https://lkml.org/lkml/2016/9/7/121
> 
>  drivers/gpio/gpiolib.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 5707b5d12b28..0efb67f387ea 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -1618,13 +1618,18 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
>  		of_node = gpiochip->of_node;
>  #endif
>  	/*
> -	 * Specifying a default trigger is a terrible idea if DT is
> +	 * Specifying a default trigger is a terrible idea if DT or ACPI is
>  	 * used to configure the interrupts, as you may end-up with
>  	 * conflicting triggers. Tell the user, and reset to NONE.
>  	 */
>  	if (WARN(of_node && type != IRQ_TYPE_NONE,
>  		 "%s: Ignoring %d default trigger\n", of_node->full_name, type))
>  		type = IRQ_TYPE_NONE;
> +	if (has_acpi_companion(gpiochip->parent) && type != IRQ_TYPE_NONE) {
> +		acpi_handle_warn(ACPI_HANDLE(gpiochip->parent),
> +				 "Ignoring %d default trigger\n", type);
> +		type = IRQ_TYPE_NONE;
> +	}
>  
>  	gpiochip->irqchip = irqchip;
>  	gpiochip->irq_handler = handler;
> 

Has this gone anywhere already?

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux