From: Boris BREZILLON <b.brezillon@overkiz.com>
To: Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ian.campbell@citrix.com>,
Rob Landley <rob@landley.net>,
Russell King <linux@arm.linux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Jiri Kosina <jkosina@suse.cz>,
Masanari Iida <standby24x7@gmail.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Richard Genoud <richard.genoud@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
James Hogan <james.hogan@imgtec.com>
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Boris BREZILLON <b.brezillon@overkiz.com>
Subject: [RFC PATCH 1/3] pinctrl: add new generic pinconf config for deglitch filter
Date: Sat, 24 Aug 2013 23:35:09 +0200 [thread overview]
Message-ID: <1377380109-11247-1-git-send-email-b.brezillon@overkiz.com> (raw)
In-Reply-To: <1377379926-11163-1-git-send-email-b.brezillon@overkiz.com>
Add a new parameter to support deglitch filter configuration.
A deglitch filter works like a debounce filter but with a smaller
delay (nanoseconds).
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
---
.../bindings/pinctrl/pinctrl-bindings.txt | 1 +
drivers/pinctrl/pinconf-generic.c | 2 ++
include/linux/pinctrl/pinconf-generic.h | 5 +++++
3 files changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 1958ca9..2f7613e 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -154,6 +154,7 @@ drive-strength - sink or source at most X mA
input-schmitt-enable - enable schmitt-trigger mode
input-schmitt-disable - disable schmitt-trigger mode
input-debounce - debounce mode with debound time X
+input-deglitch - deglitch mode
low-power-enable - enable low power mode
low-power-disable - disable low power mode
output-low - set the pin to output mode with low level
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 2c62225..f14a386 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -51,6 +51,7 @@ static struct pin_config_item conf_items[] = {
PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT_ENABLE, "input schmitt enabled", NULL),
PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL),
PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec"),
+ PCONFDUMP(PIN_CONFIG_INPUT_DEGLITCH, "input deglitch", NULL),
PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector"),
PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL),
PCONFDUMP(PIN_CONFIG_LOW_POWER_MODE, "pin low power", "mode"),
@@ -163,6 +164,7 @@ static struct pinconf_generic_dt_params dt_params[] = {
{ "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
{ "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
{ "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
+ { "input-deglitch", PIN_CONFIG_INPUT_DEGLITCH, 0 },
{ "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
{ "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
{ "output-low", PIN_CONFIG_OUTPUT, 0, },
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index fb90ef5..aa06535 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -72,6 +72,10 @@
* which means it will wait for signals to settle when reading inputs. The
* argument gives the debounce time in usecs. Setting the
* argument to zero turns debouncing off.
+ * @PIN_CONFIG_INPUT_DEGLITCH: this will configure the pin to deglitch mode,
+ * which means it will wait for signals to settle when reading inputs. The
+ * If the argument != 0, deglitch mode is enabled. If it's 0, deglitch
+ * mode is disabled.
* @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power
* supplies, the argument to this parameter (on a custom format) tells
* the driver which alternative power source to use.
@@ -102,6 +106,7 @@ enum pin_config_param {
PIN_CONFIG_INPUT_SCHMITT_ENABLE,
PIN_CONFIG_INPUT_SCHMITT,
PIN_CONFIG_INPUT_DEBOUNCE,
+ PIN_CONFIG_INPUT_DEGLITCH,
PIN_CONFIG_POWER_SOURCE,
PIN_CONFIG_SLEW_RATE,
PIN_CONFIG_LOW_POWER_MODE,
--
1.7.9.5
next prev parent reply other threads:[~2013-08-24 21:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 21:32 [RFC PATCH 0/3] pinctrl: at91: add support for generic pinconf Boris BREZILLON
2013-08-24 21:35 ` Boris BREZILLON [this message]
2013-08-26 16:50 ` [RFC PATCH 1/3] pinctrl: add new generic pinconf config for deglitch filter Stephen Warren
2013-08-26 17:01 ` boris brezillon
2013-08-27 3:55 ` Stephen Warren
2013-08-27 6:16 ` boris brezillon
2013-08-27 7:42 ` Nicolas Ferre
2013-08-27 8:28 ` boris brezillon
2013-08-27 21:33 ` Stephen Warren
2013-08-28 13:22 ` Linus Walleij
2013-08-28 13:13 ` Linus Walleij
2013-08-24 21:37 ` [RFC PATCH 2/3] pinctrl: at91: add support for generic pinconf Boris BREZILLON
2013-08-26 16:53 ` Stephen Warren
2013-08-26 17:17 ` boris brezillon
2013-08-27 3:57 ` Stephen Warren
2013-08-27 6:40 ` boris brezillon
2013-08-27 21:35 ` Stephen Warren
2013-08-26 17:53 ` Jean-Christophe PLAGNIOL-VILLARD
2013-08-26 18:45 ` boris brezillon
2013-08-26 19:18 ` Jean-Christophe PLAGNIOL-VILLARD
2013-08-26 19:48 ` boris brezillon
2013-08-27 7:51 ` Nicolas Ferre
2013-08-27 3:54 ` Stephen Warren
2013-08-27 6:04 ` boris brezillon
2013-08-27 21:30 ` Stephen Warren
2013-08-24 21:40 ` [RFC PATCH 3/3] ARM: at91/dt: move sama5 to " Boris BREZILLON
2013-08-28 12:28 ` Linus Walleij
2013-08-28 12:52 ` boris brezillon
2013-08-24 21:43 ` [RFC PATCH 0/3] pinctrl: at91: add support for " boris brezillon
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=1377380109-11247-1-git-send-email-b.brezillon@overkiz.com \
--to=b.brezillon@overkiz.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=ian.campbell@citrix.com \
--cc=james.hogan@imgtec.com \
--cc=jkosina@suse.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=richard.genoud@gmail.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=standby24x7@gmail.com \
--cc=swarren@wwwdotorg.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
all inboxes | Powered by JetHome®