From: Grant Likely <grant.likely@secretlab.ca>
To: David Jander <david@protonic.nl>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Subject: Re: [PATCH 3/3] Input: gpio_keys.c: Enable use with non-local GPIO chips.
Date: Mon, 6 Jun 2011 10:15:42 -0600 [thread overview]
Message-ID: <BANLkTimf5EAdCeqESvdKbwbnMoAMqcux8g@mail.gmail.com> (raw)
In-Reply-To: <1307373155-29470-4-git-send-email-david@protonic.nl>
On Mon, Jun 6, 2011 at 9:12 AM, David Jander <david@protonic.nl> wrote:
> Use a threaded interrupt handler in order to permit the handler to use
> a GPIO driver that causes things like I2C transactions being done inside
> the handler context.
> Also, gpio_keys_init needs to be declared as a late_initcall, to make sure
> all needed GPIO drivers have been loaded if the drivers are built into the
> kernel.
>
> Signed-off-by: David Jander <david@protonic.nl>
Looks okay to me. Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> drivers/input/keyboard/gpio_keys.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> index 4efd067..bfbdfe8 100644
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
> @@ -3,7 +3,7 @@
> *
> * Copyright 2005 Phil Blundell
> *
> - * Added OF support:
> + * Added OF support and enabled use with I2C GPIO expanders:
> * Copyright 2010 David Jander <david@protonic.nl>
> *
> * This program is free software; you can redistribute it and/or modify
> @@ -418,7 +418,7 @@ static int __devinit gpio_keys_setup_key(struct device *dev,
> if (!button->can_disable)
> irqflags |= IRQF_SHARED;
>
> - error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
> + error = request_threaded_irq(irq, NULL, gpio_keys_isr, irqflags, desc, bdata);
> if (error < 0) {
> dev_err(dev, "Unable to claim irq %d; error %d\n",
> irq, error);
> @@ -771,10 +771,10 @@ static void __exit gpio_keys_exit(void)
> platform_driver_unregister(&gpio_keys_device_driver);
> }
>
> -module_init(gpio_keys_init);
> +late_initcall(gpio_keys_init);
> module_exit(gpio_keys_exit);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
> -MODULE_DESCRIPTION("Keyboard driver for CPU GPIOs");
> +MODULE_DESCRIPTION("Keyboard driver for GPIOs");
> MODULE_ALIAS("platform:gpio-keys");
> --
> 1.7.4.1
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-06-06 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 15:12 [PATCH v2 0/3] INPUT: gpio_keys.c: Added OF support and enabled use with I2C GPIO expanders David Jander
2011-06-06 15:12 ` [PATCH 1/3] Input: gpio_keys.c: Simplify platform_device -> device casting David Jander
2011-06-06 15:26 ` Grant Likely
2011-06-06 15:12 ` [PATCH 2/3] Input: gpio_keys.c: Added support for device-tree platform data David Jander
2011-06-06 15:52 ` Grant Likely
2011-06-06 15:12 ` [PATCH 3/3] Input: gpio_keys.c: Enable use with non-local GPIO chips David Jander
2011-06-06 16:15 ` Grant Likely [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-06-07 9:04 [PATCH v3 0/3] Input: gpio_keys.c: Add support for OF and I2C " David Jander
2011-06-07 9:04 ` [PATCH 3/3] Input: gpio_keys.c: Enable use with non-local " David Jander
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=BANLkTimf5EAdCeqESvdKbwbnMoAMqcux8g@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=david@protonic.nl \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/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).