mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sherman Yin <syin@broadcom.com>
To: "Rob Herring" <rob.herring@calxeda.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Pawel Moll" <pawel.moll@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
	"Rob Landley" <rob@landley.net>,
	"Christian Daudt" <bcm@fixthebug.org>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Grant Likely" <grant.likely@linaro.org>,
	"Matt Porter" <matt.porter@linaro.org>
Cc: <devicetree@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-arm-kernel@lists.infradead.org>,
	Sherman Yin <syin@broadcom.com>
Subject: [PATCH v3 2/6] pinctrl: Adds slew-rate, input-enable/disable
Date: Wed, 11 Dec 2013 10:37:17 -0800	[thread overview]
Message-ID: <1386787041-6035-3-git-send-email-syin@broadcom.com> (raw)
In-Reply-To: <1386787041-6035-1-git-send-email-syin@broadcom.com>

This commit adds slew-rate and input-enable/disable support for pinconf
-generic.

Signed-off-by: Sherman Yin <syin@broadcom.com>
---
v3: added to patchset

 .../bindings/pinctrl/pinctrl-bindings.txt          |    3 +++
 drivers/pinctrl/pinconf-generic.c                  |    4 ++++
 include/linux/pinctrl/pinconf-generic.h            |    4 ++++
 3 files changed, 11 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 1958ca9..4414163 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -151,6 +151,8 @@ drive-push-pull		- drive actively high and low
 drive-open-drain	- drive with open drain
 drive-open-source	- drive with open source
 drive-strength		- sink or source at most X mA
+input-enable		- enable input on pin (no effect on output)
+input-disable		- disable input on pin (no effect on output)
 input-schmitt-enable	- enable schmitt-trigger mode
 input-schmitt-disable	- disable schmitt-trigger mode
 input-debounce		- debounce mode with debound time X
@@ -158,6 +160,7 @@ 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
 output-high		- set the pin to output mode with high level
+slew-rate		- set the slew rate
 
 Some of the generic properties take arguments. For those that do, the
 arguments are described below.
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 55a0ebe..3d9a999 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -48,6 +48,7 @@ static struct pin_config_item conf_items[] = {
 	PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL),
 	PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL),
 	PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA"),
+	PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL),
 	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"),
@@ -160,6 +161,8 @@ static struct pinconf_generic_dt_params dt_params[] = {
 	{ "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },
 	{ "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 },
 	{ "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 },
+	{ "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 },
+	{ "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 },
 	{ "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 },
@@ -167,6 +170,7 @@ static struct pinconf_generic_dt_params dt_params[] = {
 	{ "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
 	{ "output-low", PIN_CONFIG_OUTPUT, 0, },
 	{ "output-high", PIN_CONFIG_OUTPUT, 1, },
+	{ "slew-rate", PIN_CONFIG_SLEW_RATE, 0},
 };
 
 /**
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index fb90ef5..0db67bf 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -61,6 +61,9 @@
  *	argument is ignored.
  * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
  *	passed as argument. The argument is in mA.
+ * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input.  Note that this does not
+ *	affect the pin's ability to drive output.  1 enables input, 0 disables
+ *	input.
  * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin.
  *      If the argument != 0, schmitt-trigger mode is enabled. If it's 0,
  *      schmitt-trigger mode is disabled.
@@ -99,6 +102,7 @@ enum pin_config_param {
 	PIN_CONFIG_DRIVE_OPEN_DRAIN,
 	PIN_CONFIG_DRIVE_OPEN_SOURCE,
 	PIN_CONFIG_DRIVE_STRENGTH,
+	PIN_CONFIG_INPUT_ENABLE,
 	PIN_CONFIG_INPUT_SCHMITT_ENABLE,
 	PIN_CONFIG_INPUT_SCHMITT,
 	PIN_CONFIG_INPUT_DEBOUNCE,
-- 
1.7.9.5


  parent reply	other threads:[~2013-12-11 19:16 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04  0:23 [PATCH 0/4] Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-04  0:23 ` [PATCH 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-10-09  8:55   ` Linus Walleij
2013-10-09 22:57     ` Sherman Yin
2013-10-04  0:23 ` [PATCH 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-10-04 12:51   ` Matt Porter
2013-10-09  8:53   ` Linus Walleij
2013-10-10 17:57     ` Sherman Yin
2013-10-04  0:23 ` [PATCH 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-09  9:10   ` Linus Walleij
2013-10-10 23:48     ` Sherman Yin
2013-10-11  8:14       ` Linus Walleij
2013-10-11 18:25         ` Sherman Yin
2013-10-22 23:29           ` Sherman Yin
2013-10-25 22:48             ` Sherman Yin
2013-11-04 12:24               ` Linus Walleij
2013-11-04 23:26                 ` Heiko Stübner
2013-11-05  0:04                   ` Stephen Warren
2013-11-06  2:02                     ` Sherman Yin
2013-11-06  9:40                       ` Linus Walleij
2013-11-08  0:29                         ` Sherman Yin
2013-11-11 10:01                           ` Linus Walleij
2013-11-13 23:43                             ` Sherman Yin
2013-11-19 20:39                               ` Linus Walleij
2013-11-06 17:00                       ` Stephen Warren
2013-11-07 22:01                         ` Sherman Yin
2013-11-06  9:29                     ` Linus Walleij
2013-10-17  6:03   ` Christian Daudt
2013-10-17 14:54     ` Stephen Warren
2013-10-17 15:31       ` Christian Daudt
2013-12-11  0:05         ` Sherman Yin
2013-12-12 20:43           ` Linus Walleij
2013-10-04  0:23 ` [PATCH 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-10-09  9:11   ` Linus Walleij
2013-10-07 19:28 ` [PATCH v2 0/4] Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-07 19:28   ` [PATCH v2 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-10-07 19:28   ` [PATCH v2 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-10-07 19:28   ` [PATCH v2 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-07 19:28   ` [PATCH v2 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-12-11 18:37   ` [PATCH v3 0/6] Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-11 18:37     ` [PATCH v3 1/6] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-12-11 18:37     ` Sherman Yin [this message]
2013-12-12 20:41       ` [PATCH v3 2/6] pinctrl: Adds slew-rate, input-enable/disable Linus Walleij
2013-12-16  9:55       ` Linus Walleij
2013-12-11 18:37     ` [PATCH v3 3/6] pinctrl: Make PINCTRL selectable by defconfig/menuconfig Sherman Yin
2013-12-12 20:39       ` Linus Walleij
2013-12-12 21:35         ` Christian Daudt
2013-12-16 10:01           ` Linus Walleij
2013-12-17  0:18             ` Bjorn Andersson
2013-12-20  9:37               ` Linus Walleij
2013-12-20 20:58                 ` Arnd Bergmann
2013-12-21  2:15                   ` Sherman Yin
2013-12-11 18:37     ` [PATCH v3 4/6] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-12-12 20:37       ` Linus Walleij
2013-12-14  1:16         ` Sherman Yin
2013-12-16 13:17           ` Linus Walleij
2013-12-18  2:02             ` Sherman Yin
2013-12-11 18:37     ` [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-12 20:54       ` Linus Walleij
2013-12-13 10:22         ` Mark Brown
2013-12-19  0:12           ` Sherman Yin
2013-12-18 23:56         ` Sherman Yin
2013-12-21  2:31           ` Sherman Yin
2013-12-11 18:37     ` [PATCH v3 6/6] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-12-21  2:13     ` [PATCH v4 0/6] Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-21  2:13       ` [PATCH v4 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2014-01-16 13:26         ` Linus Walleij
2013-12-21  2:13       ` [PATCH v4 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2014-01-07 17:15         ` Linus Walleij
2014-01-07 20:45           ` Sherman Yin
2014-01-14 10:16             ` Linus Walleij
2014-01-14 19:00               ` Sherman Yin
2014-01-15  9:40                 ` Linus Walleij
2014-01-15 16:39                   ` Mark Rutland
2014-01-16 13:24         ` Linus Walleij
2013-12-21  2:13       ` [PATCH v4 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2014-01-16 13:19         ` Linus Walleij
2014-01-17 19:59           ` Sherman Yin
2014-01-18  2:56             ` Matt Porter
2014-01-20  8:16               ` Linus Walleij
2014-01-20 19:14                 ` Sherman Yin
2014-01-21 12:35                   ` Linus Walleij
2014-01-21 13:49                 ` Matt Porter
2013-12-21  2:13       ` [PATCH v4 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2014-01-16 13:28         ` Linus Walleij

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=1386787041-6035-3-git-send-email-syin@broadcom.com \
    --to=syin@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bcm@fixthebug.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --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=matt.porter@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --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

Powered by JetHome