All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Wadim Egorov <w.egorov@phytec.de>,
	upstream@lists.phytec.de, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Cc: neil.armstrong@linaro.org, jernej.skrabec@gmail.com,
	jonas@kwiboo.se, robert.foss@linaro.org,
	Laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
Date: Fri, 30 Dec 2022 16:39:57 +0100	[thread overview]
Message-ID: <354afea4-f909-8352-753d-0f2509d7165b@intel.com> (raw)
In-Reply-To: <20221228145704.939801-1-w.egorov@phytec.de>



On 28.12.2022 15:57, Wadim Egorov wrote:
> 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>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej
> ---
>   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)


WARNING: multiple messages have this Message-ID (diff)
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Wadim Egorov <w.egorov@phytec.de>,
	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
Subject: Re: [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller
Date: Fri, 30 Dec 2022 16:39:57 +0100	[thread overview]
Message-ID: <354afea4-f909-8352-753d-0f2509d7165b@intel.com> (raw)
In-Reply-To: <20221228145704.939801-1-w.egorov@phytec.de>



On 28.12.2022 15:57, Wadim Egorov wrote:
> 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>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej
> ---
>   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)


  reply	other threads:[~2022-12-30 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 14:57 [PATCH] drm/bridge: sii902x: Allow reset line to be tied to a sleepy GPIO controller Wadim Egorov
2022-12-28 14:57 ` Wadim Egorov
2022-12-30 15:39 ` Andrzej Hajda [this message]
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=354afea4-f909-8352-753d-0f2509d7165b@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --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 \
    --cc=w.egorov@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.