All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Alexander Clouter <alex@digriz.org.uk>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH] input: gpio_keys: polling mode support
Date: Tue, 13 Jul 2010 10:17:07 +0900	[thread overview]
Message-ID: <20100713011707.GA12728@linux-sh.org> (raw)
In-Reply-To: <20100712192950.GR6976@chipmunk>

On Mon, Jul 12, 2010 at 08:29:51PM +0100, Alexander Clouter wrote:
> Hi,
> 
> -EDONTCARE? :(
> 
You could try Cc-ing akpm on the next version, so it at least doesn't get
lost.

> >  
> > +#if defined(CONFIG_INPUT_POLLDEV) || defined(CONFIG_INPUT_POLLDEV_MODULE)
> > +static void gpio_keys_poll(struct input_polled_dev *dev)
> > +{
> > +	struct gpio_keys_drvdata *ddata = dev->private;
> > +	int i;
> > +
> > +	for (i = 0; i < ddata->n_buttons; i++) {
> > +		struct gpio_button_data *bdata = &ddata->data[i];
> > +		struct gpio_keys_button *button = bdata->button;
> > +
> > +		gpio_handle_button_event(button, bdata);
> > +	}
> > +}
> > +#endif
> > +
This gets back to why I opted to select the polldev stuff in the first
place, to avoid the total mess that all of the ifdeffery causes without
it. It's also inconsistent, as you have the poll interval tested openly
in some places and always defined, while the poll dev itself is always
under ifdef due to the input layer definitions.

Personally I've never found the argument that the polling stuff should be
optional very convincing. It's a reasonable mode of operation for devices
that don't have IRQs bound to GPIOs, and having to depend on the platform
to select random bits of input subsystem infrastructure to support a
driver that may or may not be enabled at all is ugly at best.

  reply	other threads:[~2010-07-13  1:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06 19:01 [PATCH] input: gpio_keys: polling mode support Alexander Clouter
2010-07-08 16:26 ` Alexander Clouter
2010-07-12 19:29 ` Alexander Clouter
2010-07-13  1:17   ` Paul Mundt [this message]
2010-07-13  1:28     ` Dmitry Torokhov
2010-07-13  7:26       ` Alexander Clouter
2010-07-13 19:57         ` [PATCHv2] " Alexander Clouter
2010-07-13 20:04           ` [PATCHv3] " Alexander Clouter
2010-07-19 21:26             ` Ferenc Wagner
2010-07-24  7:46               ` Dmitry Torokhov
2010-07-24 19:17                 ` Ferenc Wagner
  -- strict thread matches above, loose matches on Subject: below --
2008-10-21  8:38 [PATCH] input: gpio_keys: Polling " Paul Mundt
2008-10-21  8:38 ` Paul Mundt
2008-10-28 10:18 ` Paul Mundt
2008-10-28 10:18   ` Paul Mundt
2008-10-29  3:51   ` Dmitry Torokhov
2008-10-29  3:51     ` Dmitry Torokhov
2008-11-25 20:43     ` Paul Mundt
2008-11-25 20:43       ` Paul Mundt
2008-12-08  3:32       ` Paul Mundt
2008-12-08  3:32         ` Paul Mundt
2008-12-24  1:47         ` Paul Mundt
2008-12-24  1:47           ` Paul Mundt

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=20100713011707.GA12728@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=alex@digriz.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.