mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: John Keeping <jkeeping@inmusicbrands.com>,
	dri-devel@lists.freedesktop.org
Cc: Jessica Zhang <jesszhan0024@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panel: ilitek-ili9882t: use gpiod_set_value_cansleep()
Date: Wed, 4 Mar 2026 17:38:08 +0100	[thread overview]
Message-ID: <2da607e0-9bb6-4dd2-a647-e92038e60f8b@linaro.org> (raw)
In-Reply-To: <20260303152124.187791-1-jkeeping@inmusicbrands.com>

On 3/3/26 16:21, John Keeping wrote:
> All of these GPIO calls are in process context where they can sleep.
> Use the appropriate function call to allow use of this driver with GPIO
> controllers that might sleep.
> 
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
> ---
>   drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> index 8b2bfb7d36385..5f4e0d82ee673 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c
> @@ -592,7 +592,7 @@ static int ili9882t_unprepare(struct drm_panel *panel)
>   {
>   	struct ili9882t *ili = to_ili9882t(panel);
>   
> -	gpiod_set_value(ili->enable_gpio, 0);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 0);
>   	usleep_range(1000, 2000);
>   	regulator_disable(ili->avee);
>   	regulator_disable(ili->avdd);
> @@ -608,7 +608,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
>   	struct ili9882t *ili = to_ili9882t(panel);
>   	int ret;
>   
> -	gpiod_set_value(ili->enable_gpio, 0);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 0);
>   	usleep_range(1000, 1500);
>   
>   	ret = regulator_enable(ili->pp3300);
> @@ -638,11 +638,11 @@ static int ili9882t_prepare(struct drm_panel *panel)
>   	}
>   	usleep_range(1000, 2000);
>   
> -	gpiod_set_value(ili->enable_gpio, 1);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 1);
>   	usleep_range(1000, 2000);
> -	gpiod_set_value(ili->enable_gpio, 0);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 0);
>   	msleep(50);
> -	gpiod_set_value(ili->enable_gpio, 1);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 1);
>   	usleep_range(6000, 10000);
>   
>   	ret = ili->desc->init(ili);
> @@ -652,7 +652,7 @@ static int ili9882t_prepare(struct drm_panel *panel)
>   	return 0;
>   
>   poweroff:
> -	gpiod_set_value(ili->enable_gpio, 0);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 0);
>   	regulator_disable(ili->avee);
>   poweroffavdd:
>   	regulator_disable(ili->avdd);
> @@ -793,7 +793,7 @@ static int ili9882t_add(struct ili9882t *ili)
>   		return PTR_ERR(ili->enable_gpio);
>   	}
>   
> -	gpiod_set_value(ili->enable_gpio, 0);
> +	gpiod_set_value_cansleep(ili->enable_gpio, 0);
>   
>   	err = of_drm_get_panel_orientation(dev->of_node, &ili->orientation);
>   	if (err < 0) {

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

  reply	other threads:[~2026-03-04 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 15:21 John Keeping
2026-03-04 16:38 ` Neil Armstrong [this message]
2026-03-10 13:28 ` 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=2da607e0-9bb6-4dd2-a647-e92038e60f8b@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jkeeping@inmusicbrands.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.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

all inboxes | Powered by JetHome®