Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@antoniou-consulting.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Koen Kooi <koen@dominion.thruhere.net>,
	Matt Porter <mporter@ti.com>, Russ Dill <Russ.Dill@ti.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH] pwm-backlight: Pinctrl-fy
Date: Tue, 30 Oct 2012 18:14:54 +0000	[thread overview]
Message-ID: <1351699047-4487-1-git-send-email-panto@antoniou-consulting.com> (raw)

Enable pinctrl for pwm-backlight.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/video/backlight/pwm_bl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 0c91023..f3b6194 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -20,6 +20,8 @@
 #include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
 #include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/err.h>
 
 struct pwm_bl_data {
 	struct pwm_device	*pwm;
@@ -180,9 +182,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	struct backlight_properties props;
 	struct backlight_device *bl;
 	struct pwm_bl_data *pb;
+	struct pinctrl *pinctrl;
 	unsigned int max;
 	int ret;
 
+	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+	if (IS_ERR(pinctrl))
+		dev_warn(&pdev->dev, "unable to select pin group\n");
+
 	if (!data) {
 		ret = pwm_backlight_parse_dt(&pdev->dev, &defdata);
 		if (ret < 0) {
-- 
1.7.12


             reply	other threads:[~2012-10-30 18:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 18:14 Pantelis Antoniou [this message]
2012-11-05  7:33 ` [PATCH] pwm-backlight: Pinctrl-fy Thierry Reding
2012-11-09  8:06 ` Thierry Reding
2012-11-11 18:26   ` Linus Walleij
2012-11-12 10:21     ` Pantelis Antoniou

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=1351699047-4487-1-git-send-email-panto@antoniou-consulting.com \
    --to=panto@antoniou-consulting.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=Russ.Dill@ti.com \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mporter@ti.com \
    --cc=rpurdie@rpsys.net \
    --cc=thierry.reding@avionic-design.de \
    /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