From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>,
Bryan Wu <cooloney@gmail.com>, Lee Jones <lee.jones@linaro.org>,
Alexandre Courbot <acourbot@nvidia.com>
Cc: linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH v2] pwm-backlight: fix probing from device-tree without enable-gpios
Date: Fri, 25 Jul 2014 11:47:21 +0000 [thread overview]
Message-ID: <1406288841-23140-1-git-send-email-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <1406284115-489-1-git-send-email-m.olbrich@pengutronix.de>
Since 257462dbf3ed ("pwm-backlight: switch to gpiod interface")
enable_gpio is no longer set and remains 0 when probing from
device-tree. This is a valid gpio number. With no enable-gpios
specified in the device-tree this is used and probing fails
with:
pwm-backlight lcd-backlight.3: failed to request GPIO#0: -16
Fix this by setting enable_gpio to -1 which is not a valid gpio
number.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
Sorry, I sent the wrong version. This one actually compiles.
Michael
drivers/video/backlight/pwm_bl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 38ca88b..e7e43cd 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -211,6 +211,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to find platform data\n");
return ret;
}
+ defdata.enable_gpio = -1;
data = &defdata;
}
--
2.0.1
next prev parent reply other threads:[~2014-07-25 11:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 10:28 [PATCH] pwm-backlight: fix probing from device-tree without enable-gpios Michael Olbrich
2014-07-25 11:47 ` Michael Olbrich [this message]
2014-07-25 14:46 ` [PATCH v2] " Alexandre Courbot
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=1406288841-23140-1-git-send-email-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=acourbot@nvidia.com \
--cc=cooloney@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@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;
as well as URLs for NNTP newsgroup(s).