From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-kernel@vger.kernel.org,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH 2/2] gpiolib: introduce gpio_set_deglitch
Date: Fri, 25 Nov 2011 16:00:49 +0100 [thread overview]
Message-ID: <20111125150049.GB15008@game.jcrosoft.org> (raw)
In-Reply-To: <20111125141444.GA13747@legolas.emea.dhcp.ti.com>
On 16:14 Fri 25 Nov , Felipe Balbi wrote:
> Hi,
>
> On Fri, Nov 25, 2011 at 03:08:40PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > this will allow to manage the Glitch Input Filter
> > as present on AT91 as example
> >
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > ---
> > drivers/gpio/gpiolib.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
> > include/asm-generic/gpio.h | 4 ++++
> > include/linux/gpio.h | 5 +++++
> > 3 files changed, 53 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > index b7e5e75..d2b1833 100644
> > --- a/drivers/gpio/gpiolib.c
> > +++ b/drivers/gpio/gpiolib.c
> > @@ -1563,6 +1563,50 @@ fail:
> > }
> > EXPORT_SYMBOL_GPL(gpio_set_pullup);
> >
> > +/**
> > + * gpio_set_deglitch - sets @deglitch for a @gpio
> > + * @gpio: the gpio to set deglitch
> > + * @deglitch: deglitch level
> > + */
> > +int gpio_set_deglitch(unsigned gpio, unsigned deglitch)
>
> sounds a lot like debounce, what's the difference ?
deglitch allow you to filter the fact that the line take time to be stable
go to 1 and 0
debounce will set 2 different threshold for changing the state from 0 to 1 and
invertly
Best Regards,
J.
next prev parent reply other threads:[~2011-11-25 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 14:08 [PATCH 1/2] gpiolib: introduce gpio_set_pullup Jean-Christophe PLAGNIOL-VILLARD
2011-11-25 14:08 ` [PATCH 2/2] gpiolib: introduce gpio_set_deglitch Jean-Christophe PLAGNIOL-VILLARD
2011-11-25 14:14 ` Felipe Balbi
2011-11-25 15:00 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-11-25 14:16 ` [PATCH 1/2] gpiolib: introduce gpio_set_pullup Felipe Balbi
2011-11-25 14:23 ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-25 14:59 ` Felipe Balbi
2011-11-25 15:34 ` Mark Brown
2011-11-27 9:35 ` Igor Grinberg
2011-11-29 2:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-11-29 16:51 ` Stephen Warren
2011-12-05 15:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-12-05 15:56 ` Mark Brown
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=20111125150049.GB15008@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=balbi@ti.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.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
all inboxes | Powered by JetHome®