linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: johannes@sipsolutions.net, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/5] net: rfkill: gpio: Implement host wake up support
Date: Wed, 08 Oct 2014 16:09:50 +0200	[thread overview]
Message-ID: <543545AE.8030900@intel.com> (raw)
In-Reply-To: <20141008113845.GB3514@kuha.fi.intel.com>

Thanks, it sounds good to use a label instead of index.
However:
- DSD is only compatible with BIOS ACPI 5.1
- gpiod_get_index does not take care of con_id (label) parameter in case 
of ACPI (acpi_find_gpio).
- gpiod_get calls gpiod_get_index with index 0.

Any patch ongoing to support con_id parameter with ACPI?

Regards,
Loic

On 08/10/2014 13:38, Heikki Krogerus wrote:
> On Wed, Oct 08, 2014 at 10:34:38AM +0200, Loic Poulain wrote:
>> Some GPIO based rfkill devices can wake their host up from suspend by
>> toggling an input (from the host perspective) GPIO.
>> This patch adds a generic support for that feature by registering a
>> threaded interrupt routine and thus setting the corresponding GPIO as a
>> wake up source.
>>
>> Signed-off-by: Loic Poulain <loic.poulain@intel.com>
>> ---
>>   net/rfkill/rfkill-gpio.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 49 insertions(+)
> To continue my previous answer, for this you could have the following
> _DSD..
>
>          Name (_DSD, Package ()
>          {
>              ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
>              Package () {
>                  Package () {"host_wake-gpio", Package () {^BTH1, 0, 0, 0}},
>                  Package () {"reset-gpio", Package () {^BTH1, 1, 0, 0}},
>                  Package () {"shutdown-gpio", Package () {^BTH1, 2, 0, 0}},
>              }
>          })
>
> And in the driver you can then request it without caring about the
> index..
>
>          ...
>          gpio = devm_gpiod_get_index(dev, "host_wake", 3);
>          if (!IS_ERR(gpio)) {
> 		ret = gpiod_direction_input(gpio);
> 		if (ret)
> 			return ret;
> 		rfkill->irq = gpiod_to_irq(gpio);
>          ...
>
>
> Actually, we could just use devm_gpiod_get instead of
> devm_gpiod_get_index in this case.
>
>
> Cheers,
>

-- 
Intel Open Source Technology Center
http://oss.intel.com/


  reply	other threads:[~2014-10-08 14:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  8:34 [PATCH 1/5] net: rfkill: gpio: Configurable GPIO idx Loic Poulain
2014-10-08  8:34 ` [PATCH 2/5] net: rfkill: gpio: Implement PM hooks Loic Poulain
2014-10-08  8:34 ` [PATCH 3/5] net: rfkill: gpio: Implement host wake up support Loic Poulain
2014-10-08 11:38   ` Heikki Krogerus
2014-10-08 14:09     ` Loic Poulain [this message]
2014-10-09  7:38       ` Heikki Krogerus
2014-10-09  8:08         ` Loic Poulain
2014-10-08  8:34 ` [PATCH 4/5] net: rfkill: gpio: Add OBDA8723 ACPI ID Loic Poulain
2014-10-08  8:34 ` [PATCH 5/5] net: rfkill: gpio: Add BCM47521 " Loic Poulain
2014-10-08  8:53 ` [PATCH 1/5] net: rfkill: gpio: Configurable GPIO idx Johannes Berg
2014-10-08  9:28   ` Loic Poulain
2014-10-08 10:27 ` Heikki Krogerus

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=543545AE.8030900@intel.com \
    --to=loic.poulain@intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).