* [PATCH] pinctrl: add pinconf-generic define for a pin-default pull
@ 2013-06-06 14:44 Heiko Stübner
2013-06-06 16:07 ` Stephen Warren
2013-06-07 7:39 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Heiko Stübner @ 2013-06-06 14:44 UTC (permalink / raw)
To: Linus Walleij; +Cc: Stephen Warren, linux-kernel
There exist controllers that don't support to set the pull to up or down
separately but instead automatically set the pull direction based on
embedded knowledge inside the controller, for example depending on the
selected mux function of the pin.
Therefore this patch adds another config option to use this default
pull-state for a pin where it is not possible to know or decide if the
pin will be pulled up or down.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
wasn't sure about the line-wrap preference there, as other lines too have
overlength, but the 100 chars length felt like to much
drivers/pinctrl/pinconf-generic.c | 2 ++
include/linux/pinctrl/pinconf-generic.h | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index ba465b3..9a6812b 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -40,6 +40,8 @@ static struct pin_config_item conf_items[] = {
PCONFDUMP(PIN_CONFIG_BIAS_BUS_HOLD, "input bias bus hold", NULL),
PCONFDUMP(PIN_CONFIG_BIAS_PULL_UP, "input bias pull up", NULL),
PCONFDUMP(PIN_CONFIG_BIAS_PULL_DOWN, "input bias pull down", NULL),
+ PCONFDUMP(PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
+ "input bias pull to pin specific state", NULL),
PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL),
PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_DRAIN, "output drive open drain", NULL),
PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL),
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index ac05b3c..d414a77 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -40,6 +40,10 @@
* @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high
* impedance to GROUND). If the argument is != 0 pull-down is enabled,
* if it is 0, pull-down is disabled.
+ * @PIN_CONFIG_BIAS_PULL_PIN_DEFAULT: the pin will be pulled up or down based
+ * on embedded knowledge of the controller, like current mux function.
+ * If the argument is != 0 pull up/down is enabled, if it is 0,
+ * the pull is disabled.
* @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
* low, this is the most typical case and is typically achieved with two
* active transistors on the output. Setting this config will enable
@@ -86,6 +90,7 @@ enum pin_config_param {
PIN_CONFIG_BIAS_BUS_HOLD,
PIN_CONFIG_BIAS_PULL_UP,
PIN_CONFIG_BIAS_PULL_DOWN,
+ PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
PIN_CONFIG_DRIVE_PUSH_PULL,
PIN_CONFIG_DRIVE_OPEN_DRAIN,
PIN_CONFIG_DRIVE_OPEN_SOURCE,
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: add pinconf-generic define for a pin-default pull
2013-06-06 14:44 [PATCH] pinctrl: add pinconf-generic define for a pin-default pull Heiko Stübner
@ 2013-06-06 16:07 ` Stephen Warren
2013-06-07 7:39 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-06-06 16:07 UTC (permalink / raw)
To: Heiko Stübner; +Cc: Linus Walleij, linux-kernel
On 06/06/2013 08:44 AM, Heiko Stübner wrote:
> There exist controllers that don't support to set the pull to up or down
> separately but instead automatically set the pull direction based on
> embedded knowledge inside the controller, for example depending on the
> selected mux function of the pin.
>
> Therefore this patch adds another config option to use this default
> pull-state for a pin where it is not possible to know or decide if the
> pin will be pulled up or down.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: add pinconf-generic define for a pin-default pull
2013-06-06 14:44 [PATCH] pinctrl: add pinconf-generic define for a pin-default pull Heiko Stübner
2013-06-06 16:07 ` Stephen Warren
@ 2013-06-07 7:39 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-06-07 7:39 UTC (permalink / raw)
To: Heiko Stübner; +Cc: Stephen Warren, linux-kernel@vger.kernel.org
On Thu, Jun 6, 2013 at 4:44 PM, Heiko Stübner <heiko@sntech.de> wrote:
> There exist controllers that don't support to set the pull to up or down
> separately but instead automatically set the pull direction based on
> embedded knowledge inside the controller, for example depending on the
> selected mux function of the pin.
>
> Therefore this patch adds another config option to use this default
> pull-state for a pin where it is not possible to know or decide if the
> pin will be pulled up or down.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Excellent, patch applied with Stephen's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-07 7:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06 14:44 [PATCH] pinctrl: add pinconf-generic define for a pin-default pull Heiko Stübner
2013-06-06 16:07 ` Stephen Warren
2013-06-07 7:39 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox