All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matheus Castello <matheus@castello.eng.br>
To: linus.walleij@linaro.org, stefan.wahren@i2se.com, eric@anholt.net
Cc: swarren@wwwdotorg.org, robh+dt@kernel.org, mark.rutland@arm.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Matheus Castello <matheus@castello.eng.br>
Subject: [PATCH v6 3/3] pinctrl: bcm2835: Add support for output-low output-high properties
Date: Sun, 29 Apr 2018 15:28:12 -0400	[thread overview]
Message-ID: <1525030092-3643-3-git-send-email-matheus@castello.eng.br> (raw)
In-Reply-To: <1525030092-3643-1-git-send-email-matheus@castello.eng.br>

Properties to set initial value of pin output buffer.
This can be useful for configure hardware in overlay files, and in early
boot for checking it states in QA sanity tests.

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
---
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 0231107..3bc0d04 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -965,6 +965,11 @@ static int bcm2835_pinconf_set(struct pinctrl_dev *pctldev,
 			bcm2835_pull_config_set(pc, pin, BCM2835_PUD_UP);
 			break;
 
+		/* Set output-high or output-low */
+		case PIN_CONFIG_OUTPUT:
+			bcm2835_gpio_set_bit(pc, arg ? GPSET0 : GPCLR0, pin);
+			break;
+
 		default:
 			return -EINVAL;
 
-- 
2.7.4

  parent reply	other threads:[~2018-04-29 19:59 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 17:44 [PATCH] pinctrl: bc2835: Add brcm,level property Matheus Castello
2018-02-23 14:54 ` Eric Anholt
2018-02-23 15:58   ` Matheus Castello
2018-03-02 10:14 ` Linus Walleij
2018-03-03 14:21 ` Stefan Wahren
2018-03-05  2:29   ` [PATCH v2 0/3] pinctrl: bcm2835: " Matheus Castello
2018-03-05  2:29     ` [PATCH v2 1/3] pinctrl: bcm2835: switch to GENERIC_PINCONF Matheus Castello
2018-03-07 11:51       ` Stefan Wahren
2018-03-05  2:29     ` [PATCH v2 2/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-03-05 23:21       ` Eric Anholt
2018-03-05 23:21         ` Eric Anholt
2018-03-07  3:28         ` Matheus Castello
2018-03-05  2:29     ` [PATCH v2 3/3] pinctrl: bcm2835: Add support for output-low output-high properties Matheus Castello
2018-03-07 11:58     ` [PATCH v2 0/3] pinctrl: bcm2835: Add brcm,level property Stefan Wahren
2018-03-08  0:12       ` Matheus Castello
2018-03-08  8:00         ` Stefan Wahren
2018-03-08 19:47           ` Matheus Castello
2018-03-09  4:16             ` [PATCH v3 " Matheus Castello
2018-03-09  4:16               ` [PATCH v3 1/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-03-09  4:16               ` [PATCH v3 2/3] pinctrl: bcm2835: Add support for output-low output-high properties Matheus Castello
2018-03-09  4:16               ` [PATCH v3 3/3] pinctrl: bcm2835: Update docs about generic pinctrl bindings support Matheus Castello
2018-03-09 11:46                 ` Stefan Wahren
2018-03-09 17:13                   ` [PATCH v4 0/3] pinctrl: bcm2835: Add generic pinctrl support Matheus Castello
2018-03-09 17:13                     ` [PATCH v4 1/3] dt-bindings: pinctrl: bcm2835-gpio: " Matheus Castello
2018-03-18 12:48                       ` Rob Herring
2018-03-18 15:23                         ` Matheus Castello
2018-04-11  4:58                           ` [PATCH v5 0/3] pinctrl: bcm2835: " Matheus Castello
2018-04-11  4:58                             ` [PATCH v5 1/3] dt-bindings: pinctrl: bcm2835-gpio: " Matheus Castello
2018-04-11 16:02                               ` Eric Anholt
2018-04-11 16:02                                 ` Eric Anholt
2018-04-16 15:06                               ` Rob Herring
2018-04-26 12:21                               ` Linus Walleij
2018-04-11  4:58                             ` [PATCH v5 2/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-04-21 10:30                               ` Stefan Wahren
2018-04-22 12:44                               ` Stefan Wahren
2018-04-26 12:24                               ` Linus Walleij
2018-04-11  4:58                             ` [PATCH v5 3/3] pinctrl: bcm2835: Add support for output-low output-high properties Matheus Castello
2018-04-26 12:25                               ` Linus Walleij
2018-04-29 19:28                                 ` [PATCH v6 0/3] bcm2835: Add generic pinctrl support Matheus Castello
2018-04-29 19:28                                   ` [PATCH v6 2/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-04-29 19:28                                   ` Matheus Castello [this message]
2018-05-01  0:42                                     ` [PATCH v7 0/3] bcm2835: Add generic pinctrl support Matheus Castello
2018-05-01  0:42                                       ` [PATCH v7 2/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-05-03 17:38                                         ` Stefan Wahren
2018-05-12  9:08                                           ` Stefan Wahren
2018-05-16 12:00                                         ` Linus Walleij
2018-05-01  0:42                                       ` [PATCH v7 3/3] pinctrl: bcm2835: Add support for output-low output-high properties Matheus Castello
2018-05-16 12:02                                         ` Linus Walleij
2018-03-09 17:13                     ` [PATCH v4 2/3] pinctrl: bcm2835: Add support for generic pinctrl binding Matheus Castello
2018-03-12 18:03                       ` Eric Anholt
2018-03-12 18:03                         ` Eric Anholt
2018-03-09 17:14                     ` [PATCH v4 3/3] pinctrl: bcm2835: Add support for output-low output-high properties Matheus Castello

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=1525030092-3643-3-git-send-email-matheus@castello.eng.br \
    --to=matheus@castello.eng.br \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=stefan.wahren@i2se.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 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.