public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	grant.likely@secretlab.ca, linux-acpi@vger.kernel.org,
	Zhang Rui <rui.zhang@intel.com>,
	tianyu.lan@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] gpiolib-acpi: Add ACPI5 event model support to gpio.
Date: Fri, 25 Jan 2013 16:05:54 +0200	[thread overview]
Message-ID: <51029142.9050901@linux.intel.com> (raw)
In-Reply-To: <CACRpkdZvoacYP0rwnrcyHfKWrN67HvN5jCVom4Lx6Qd9RC0fjg@mail.gmail.com>

On 01/25/2013 02:54 PM, Linus Walleij wrote:
> On Fri, Jan 25, 2013 at 12:48 PM, Mathias Nyman
> <mathias.nyman@linux.intel.com>  wrote:
>
>> Add ability to handle ACPI events signalled by GPIO interrupts.
>>
>> ACPI5 platforms can use GPIO signaled ACPI events. These GPIO interrupts are
>> handled by ACPI event methods which need to be called from the GPIO
>> controller's interrupt handler. acpi_gpio_request_interrupt() finds out which
>> gpio pins have acpi event methods and assigns interrupt handlers that calls
>> the acpi event methods for those pins.
>>
>> Partially based on work by Rui Zhang<rui.zhang@intel.com>
>>
>> Signed-off-by: Mathias Nyman<mathias.nyman@linux.intel.com>
> (...)
>> +/**
>> + * acpi_gpio_request_interrupt() - Register isr for gpio controller ACPI events
>> + * @chip:      gpio chip representation of the gpio controller
>
>
> Hm chip, controller, controller, chip chip, controller controller...
> Are we using two different names for the same thing?

They get mixed up a bit here yes.
I'll change them all to chip.

>
>> + *
>> + * ACPI5 platforms can use GPIO signaled ACPI events. These GPIO interrupts are
>> + * handled by ACPI event methods which need to be called from the GPIO
>> + * controller's interrupt handler. acpi_gpio_request_interrupt finds out which
>> + * gpio pins have acpi event methods and assigns interrupt handlers that calls
>> + * the acpi event methods for those pins.
>> + */
>> +
>> +void acpi_gpio_request_interrupt(struct gpio_chip *chip)
>
> So I was like "um, what acpi requests an interrupt for a GPIO (maybe a pin)...
>
> ... read read ...
>
> Aha the function should probably be named:
> acpi_gpiochip_request_interrupts()
>

True, will rename it.

> Because it just grabs all IRQs coming from that chip right?

Not all, only the ones that have an ACPI handler method defined. 
Basically ACPI5 supports using some of the gpio interrupts for the same 
purpose as SCI interrupts.

>
> Second: why is there no mirror function *releasing* all the IRQs again?
> One-way interface?

My thinking was that using devm_request_threaded_irq(chip->dev, ...) 
will automatically free the interrupts on driver detach, making the 
release function unnecessary.

-Mathias


  reply	other threads:[~2013-01-25 14:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 11:48 [RFC PATCH] gpiolib-acpi: Add ACPI5 event model support to gpio Mathias Nyman
2013-01-25 12:25 ` Rafael J. Wysocki
2013-01-25 12:54 ` Linus Walleij
2013-01-25 14:05   ` Mathias Nyman [this message]
2013-01-28  8:30     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51029142.9050901@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rui.zhang@intel.com \
    --cc=tianyu.lan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox