Re: [PATCH] gpio / ACPI: Handle ACPI events in accordance with the spec

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

 



On Wed, Apr 10, 2013 at 11:17:57AM +0300, Mathias Nyman wrote:
> On 04/10/2013 10:53 AM, Mika Westerberg wrote:
> >On Tue, Apr 09, 2013 at 03:57:25PM +0200, Rafael J. Wysocki wrote:
> >>+void acpi_gpiochip_free_interrupts(struct gpio_chip *chip)
> >>+{
> >>+	acpi_handle handle;
> >>+	acpi_status status;
> >>+	struct list_head *evt_pins;
> >>+	struct acpi_gpio_evt_pin *evt_pin, *ep;
> >>+
> >>+	if (!chip->dev || !chip->to_irq)
> >>+		return;
> >>+
> >>+	handle = ACPI_HANDLE(chip->dev);
> >>+	if (!handle)
> >>+		return;
> >>+
> >>+	status = acpi_get_data(handle, acpi_gpio_evt_dh, (void **)&evt_pins);
> >>+	if (ACPI_FAILURE(status))
> >>+		return;
> >>+
> >>+	list_for_each_entry_safe_reverse(evt_pin, ep, evt_pins, node) {
> >>+		devm_free_irq(chip->dev, evt_pin->irq, evt_pin);
> >
> >How about using normal request/free_irq() functions for both _EVT and
> >non-_EVT events? Since we now need to call acpi_gpiochip_free_interrupts()
> >anyway, I don't see the point using devm_* functions here.
> >
> 
> Then we need to create a list of non-_EVT events, or add them to the
> evt_pins list.

Good point. Maybe we can add them to the evt_pins list and handle the same
way as _EVT (except that we need to call _Exx and _Lxx methods instead of
_EVT)?
--
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