mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	Mylene Josserand <mylene.josserand@free-electrons.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Alexander Kaplan <alex@nextthing.co>
Subject: [PATCH 1/6] backlight: pwm_bl: Handle gpio that can sleep
Date: Wed, 31 Aug 2016 10:18:12 +0200	[thread overview]
Message-ID: <20160831081817.5191-2-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <20160831081817.5191-1-maxime.ripard@free-electrons.com>

Some backlight GPIOs might be connected to some i2c based expanders whose
access might sleep.

Since it's not in any critical path, use the cansleep variant of the GPIO
API.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/video/backlight/pwm_bl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b2b366bb0f97..12614006211e 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -55,7 +55,7 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)
 		dev_err(pb->dev, "failed to enable power supply\n");
 
 	if (pb->enable_gpio)
-		gpiod_set_value(pb->enable_gpio, 1);
+		gpiod_set_value_cansleep(pb->enable_gpio, 1);
 
 	pwm_enable(pb->pwm);
 	pb->enabled = true;
@@ -70,7 +70,7 @@ static void pwm_backlight_power_off(struct pwm_bl_data *pb)
 	pwm_disable(pb->pwm);
 
 	if (pb->enable_gpio)
-		gpiod_set_value(pb->enable_gpio, 0);
+		gpiod_set_value_cansleep(pb->enable_gpio, 0);
 
 	regulator_disable(pb->power_supply);
 	pb->enabled = false;
-- 
2.9.2

  reply	other threads:[~2016-08-31  8:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31  8:18 [PATCH 0/6] Introduce NextThing GR8 support Maxime Ripard
2016-08-31  8:18 ` Maxime Ripard [this message]
2016-08-31 12:25   ` [PATCH 1/6] backlight: pwm_bl: Handle gpio that can sleep Lee Jones
2016-08-31  8:18 ` [PATCH 2/6] pinctrl: sunxi: Add GR8 controller support Maxime Ripard
2016-09-05 12:49   ` Chen-Yu Tsai
2016-09-07 14:04     ` Maxime Ripard
2016-08-31  8:18 ` [PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support Maxime Ripard
2016-09-05 14:00   ` Chen-Yu Tsai
2016-09-09 14:34     ` Maxime Ripard
2016-08-31  8:18 ` [PATCH 4/6] ARM: sunxi: Support the Nextthing GR8 Maxime Ripard
2016-08-31  8:25   ` Chen-Yu Tsai
2016-09-02  6:28     ` Maxime Ripard
2016-08-31  8:18 ` [PATCH 5/6] ARM: dts: Add NextThing GR8 dtsi Maxime Ripard
2016-09-05 12:47   ` Chen-Yu Tsai
2016-09-07 14:51   ` Javier Martinez Canillas
2016-09-08  9:57     ` Maxime Ripard
2016-09-07 17:51   ` Rask Ingemann Lambertsen
2016-09-08 10:00     ` Maxime Ripard
2016-08-31  8:18 ` [PATCH 6/6] ARM: dts: gr8: Add support for the GR8 evaluation board Maxime Ripard
2016-09-05 12:42   ` Chen-Yu Tsai

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=20160831081817.5191-2-maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=airlied@linux.ie \
    --cc=alex@nextthing.co \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mylene.josserand@free-electrons.com \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®