From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Alexander Shiyan <eagle.alexander923@gmail.com>
Cc: linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] media: i2c: ar0521: Use cansleep version of gpiod_set_value()
Date: Fri, 30 Aug 2024 06:17:41 +0200 [thread overview]
Message-ID: <m37cbyeja2.fsf@t19.piap.pl> (raw)
In-Reply-To: <20240829054849.4761-1-eagle.alexander923@gmail.com> (Alexander Shiyan's message of "Thu, 29 Aug 2024 08:48:49 +0300")
Hi Alexander,
Alexander Shiyan <eagle.alexander923@gmail.com> writes:
> If we use GPIO reset from I2C port expander, we must use *_cansleep()
> variant of GPIO functions.
> This was not done in ar0521_power_on()/ar0521_power_off() functions.
> Let's fix that.
Definitely.
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver")
> Cc: stable@vger.kernel.org
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
> +++ b/drivers/media/i2c/ar0521.c
> @@ -844,7 +844,8 @@ static int ar0521_power_off(struct device *dev)
> clk_disable_unprepare(sensor->extclk);
>
> if (sensor->reset_gpio)
> - gpiod_set_value(sensor->reset_gpio, 1); /* assert RESET signal */
> + /* assert RESET signal */
> + gpiod_set_value_cansleep(sensor->reset_gpio, 1);
>
> for (i = ARRAY_SIZE(ar0521_supply_names) - 1; i >= 0; i--) {
> if (sensor->supplies[i])
> @@ -878,7 +879,7 @@ static int ar0521_power_on(struct device *dev)
>
> if (sensor->reset_gpio)
> /* deassert RESET signal */
> - gpiod_set_value(sensor->reset_gpio, 0);
> + gpiod_set_value_cansleep(sensor->reset_gpio, 0);
> usleep_range(4500, 5000); /* min 45000 clocks */
>
> for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++) {
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
prev parent reply other threads:[~2024-08-30 4:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 5:48 [PATCH] media: i2c: ar0521: Use cansleep version of gpiod_set_value() Alexander Shiyan
2024-08-30 4:17 ` Krzysztof Hałasa [this message]
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=m37cbyeja2.fsf@t19.piap.pl \
--to=khalasa@piap.pl \
--cc=eagle.alexander923@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.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