All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wadim Egorov <w.egorov@phytec.de>
To: <upstream@lists.phytec.de>, <linux-kernel@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>
Cc: <daniel@ffwll.ch>, <airlied@gmail.com>,
	<jernej.skrabec@gmail.com>, <jonas@kwiboo.se>,
	<Laurent.pinchart@ideasonboard.com>, <robert.foss@linaro.org>,
	<neil.armstrong@linaro.org>, <andrzej.hajda@intel.com>
Subject: [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
Date: Wed, 28 Dec 2022 15:57:04 +0100	[thread overview]
Message-ID: <20221228145704.939801-1-w.egorov@phytec.de> (raw)

Switch to gpiod_set_value_cansleep() in sii902x_reset().
This is relevant if the reset line is tied to a I2C GPIO
controller.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 drivers/gpu/drm/bridge/sii902x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index 878fb7d3732b..980611aec2f6 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -240,12 +240,12 @@ static void sii902x_reset(struct sii902x *sii902x)
 	if (!sii902x->reset_gpio)
 		return;
 
-	gpiod_set_value(sii902x->reset_gpio, 1);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 1);
 
 	/* The datasheet says treset-min = 100us. Make it 150us to be sure. */
 	usleep_range(150, 200);
 
-	gpiod_set_value(sii902x->reset_gpio, 0);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 0);
 }
 
 static enum drm_connector_status sii902x_detect(struct sii902x *sii902x)
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Wadim Egorov <w.egorov@phytec.de>
To: <upstream@lists.phytec.de>, <linux-kernel@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>
Cc: neil.armstrong@linaro.org, jernej.skrabec@gmail.com,
	andrzej.hajda@intel.com, jonas@kwiboo.se, robert.foss@linaro.org,
	Laurent.pinchart@ideasonboard.com
Subject: [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
Date: Wed, 28 Dec 2022 15:57:04 +0100	[thread overview]
Message-ID: <20221228145704.939801-1-w.egorov@phytec.de> (raw)

Switch to gpiod_set_value_cansleep() in sii902x_reset().
This is relevant if the reset line is tied to a I2C GPIO
controller.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 drivers/gpu/drm/bridge/sii902x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index 878fb7d3732b..980611aec2f6 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -240,12 +240,12 @@ static void sii902x_reset(struct sii902x *sii902x)
 	if (!sii902x->reset_gpio)
 		return;
 
-	gpiod_set_value(sii902x->reset_gpio, 1);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 1);
 
 	/* The datasheet says treset-min = 100us. Make it 150us to be sure. */
 	usleep_range(150, 200);
 
-	gpiod_set_value(sii902x->reset_gpio, 0);
+	gpiod_set_value_cansleep(sii902x->reset_gpio, 0);
 }
 
 static enum drm_connector_status sii902x_detect(struct sii902x *sii902x)
-- 
2.34.1


             reply	other threads:[~2022-12-28 14:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 14:57 Wadim Egorov [this message]
2022-12-28 14:57 ` [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller Wadim Egorov
2022-12-30 15:39 ` Andrzej Hajda
2022-12-30 15:39   ` Andrzej Hajda
2023-01-19  7:41 ` Neil Armstrong
2023-01-19  7:41   ` Neil Armstrong

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=20221228145704.939801-1-w.egorov@phytec.de \
    --to=w.egorov@phytec.de \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robert.foss@linaro.org \
    --cc=upstream@lists.phytec.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 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.