mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Ranostay <mranostay@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jlu@pengutronix.de, arnd@arndb.de, pantelis.antoniou@gmail.com,
	Matt Ranostay <mranostay@gmail.com>
Subject: [PATCH] pps-gpio: add pinctrl suppport
Date: Sat, 29 Jun 2013 21:54:32 +0000	[thread overview]
Message-ID: <1372542872-17970-1-git-send-email-mranostay@gmail.com> (raw)

Add pincontrol support to pps-gpio driver for selecting the
repective GPIO muxing if applicable.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
 drivers/pps/clients/pps-gpio.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index eae0eda..8d51d10 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -33,6 +33,9 @@
 #include <linux/pps-gpio.h>
 #include <linux/gpio.h>
 #include <linux/list.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+#include <linux/pinctrl/consumer.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 
@@ -93,6 +96,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
 	const char *gpio_label;
 	int ret;
 	int pps_default_params;
+	struct pinctrl *pinctrl;
 	const struct pps_gpio_platform_data *pdata = pdev->dev.platform_data;
 	struct device_node *np = pdev->dev.of_node;
 
@@ -121,6 +125,11 @@ static int pps_gpio_probe(struct platform_device *pdev)
 			data->assert_falling_edge = true;
 	}
 
+	/* PINCTL setup */
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		pr_warn("pins are not configured from the driver\n");
+
 	/* GPIO setup */
 	ret = devm_gpio_request(&pdev->dev, data->gpio_pin, gpio_label);
 	if (ret) {
-- 
1.8.2.rc3.6.g407929c


                 reply	other threads:[~2013-07-10  4:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1372542872-17970-1-git-send-email-mranostay@gmail.com \
    --to=mranostay@gmail.com \
    --cc=arnd@arndb.de \
    --cc=jlu@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pantelis.antoniou@gmail.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

Powered by JetHome