[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyC5oEH6NKCMTzzt@smile.fi.intel.com>
Date:   Tue, 13 Sep 2022 20:10:56 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Raul E Rangel <rrangel@...omium.org>
Cc:     linux-acpi@...r.kernel.org, linux-input@...r.kernel.org,
        jingle.wu@....com.tw, mario.limonciello@....com, timvp@...gle.com,
        linus.walleij@...aro.org, hdegoede@...hat.com, rafael@...nel.org,
        Asmaa Mnebhi <asmaa@...dia.com>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        "David S. Miller" <davem@...emloft.net>,
        David Thompson <davthompson@...dia.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>, Len Brown <lenb@...nel.org>,
        Lu Wei <luwei32@...wei.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Paolo Abeni <pabeni@...hat.com>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 05/13] gpiolib: acpi: Add wake_capable parameter to
 acpi_dev_gpio_irq_get_by
On Mon, Sep 12, 2022 at 04:13:09PM -0600, Raul E Rangel wrote:
> The ACPI spec defines the SharedAndWake and ExclusiveAndWake share type
> keywords. This is an indication that the GPIO IRQ can also be used as a
> wake source. This change exposes the wake_capable bit so drivers can
> correctly enable wake functionality instead of making an assumption.
...
> -	ret = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev), "irq-gpios", 0);
> +	ret = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev), "irq-gpios", 0,
> +				       NULL);
>  	if (ret < 0)
>  		return ret;
Looking at these changes, can't we first introduce
	int acpi_dev_gpio_irq_get_by_name(struct acpi_device *adev, const char *name);
convert users, and then add wake stuff to the basic function.
In such case you will make less invasive main part of the idea.
-- 
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists