All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Herbert Valerio Riedel <hvr@gnu.org>
Subject: Re: [PATCH RESENT] [RFC] gpio-keys: let platform code specify the trigger type
Date: Mon, 14 Jul 2008 07:33:09 +0200	[thread overview]
Message-ID: <20080714053309.GA26232@digi.com> (raw)
In-Reply-To: <20080710135426.GA3125@anvil.corenet.prv>

Hello Dmitry,

Dmitry Torokhov wrote:
> On Thu, Jul 10, 2008 at 10:58:44AM +0200, Uwe Kleine-König wrote:
> > The intend for this change is that not all platform's irqs support
> > triggering on both edges.  Examples are ns9xxx[1] and txx9[2], and I
> > expect that there are more.
> >
> > Provided that the platform data is initialized with zeros there is no
> > change in behavior if the new struct member 'trigger' isn't set in
> > platform code.
> >
> 
> OK, makes sense. Unfortunately the patch conflicts with debounce support
> that is in 'next' branch of my tree so I can't apply it as is. Actually,
> with debounce support is may not even be needed in the present form.
So I will resend an updated version when the details are resolved.

> > open points:
> >  - if only one trigger direction is used it should match active_low such
> >    that the button press generates the irq.
> >  - poll for button release instead of generate the release event
> >    directly after the press?
> 
> Yes, I think that would be the best option.
OK.

> >  - is it correct to input_sync() between press and release event?
> Yes, button press and release are 2 distinct states of the device and so
> it is prudent to have input_sync in between.
OK.
 
> >  - sanitize button->trigger &= IRQF_TRIGGER_EDGE in gpio_keys_probe
> >    before passing it to request_irq?
> 
> Would be nice, together with WARN() in case it needed stanitizing.
OK.
 
> >  - a comment describing the trigger member of struct gpio_keys_button
> >
> > I'd like to have polling support in this driver.  This could use
> > button->trigger == 0, so it might be sensible to add a
> > WARN_ON(!button->trigger) for now and wait some time before implementing
> > it.
> >
> 
> I am not sure if addin a pure polling mode to this driver is a best
> idea. Maybe writing a separate one based on input-polldev will allow
> keep them both simpler than combined one.
So you suggest to implement polling in gpio-keys only for button release
(if triggering for both doesn't work) and add a new driver that does
polling only?

I havn't looked deeply, but maybe it makes sense to export some
functions from drivers/input/input-polldev.c and use them as applicable
in the gpio-keys driver?

Thanks and best regards
Uwe

-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
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

      reply	other threads:[~2008-07-14  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03  7:28 [PATCH] [RFC] gpio-keys: let platform code specify the trigger type Uwe Kleine-König
2008-07-10  8:58 ` [PATCH RESENT] " Uwe Kleine-König
2008-07-10 13:54   ` Dmitry Torokhov
2008-07-14  5:33     ` Uwe Kleine-König [this message]

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=20080714053309.GA26232@digi.com \
    --to=uwe.kleine-koenig@digi.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hvr@gnu.org \
    --cc=kay.sievers@vrfy.org \
    --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.