All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	andersson@kernel.org, konradybcio@kernel.org,
	dave.stevenson@raspberrypi.com, sakari.ailus@linux.intel.com
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-media@vger.kernel.org, mchehab@kernel.org,
	conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 1/3] media: i2c: ov9282: Fix reset-gpio logical state
Date: Sat, 27 Sep 2025 11:29:00 +0100	[thread overview]
Message-ID: <880dcbb3-16fd-4eff-b452-80a172d7e84b@kernel.org> (raw)
In-Reply-To: <20250926073421.17408-2-loic.poulain@oss.qualcomm.com>

On 26/09/2025 08:34, Loic Poulain wrote:
> Ensure reset state is low in the power-on state and high in the
> power-off state (assert reset). Note that the polarity is abstracted
> by the GPIO subsystem, so the logic level reflects the intended reset
> behavior.
> 
> This breaks backward compatibility for any downstream dts using the
> wrong polarity.
> 
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
>   drivers/media/i2c/ov9282.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/i2c/ov9282.c b/drivers/media/i2c/ov9282.c
> index c882a021cf18..fb6fcba503c8 100644
> --- a/drivers/media/i2c/ov9282.c
> +++ b/drivers/media/i2c/ov9282.c
> @@ -1127,7 +1127,7 @@ static int ov9282_parse_hw_config(struct ov9282 *ov9282)
> 
>   	/* Request optional reset pin */
>   	ov9282->reset_gpio = devm_gpiod_get_optional(ov9282->dev, "reset",
> -						     GPIOD_OUT_LOW);
> +						     GPIOD_OUT_HIGH);
>   	if (IS_ERR(ov9282->reset_gpio)) {
>   		dev_err(ov9282->dev, "failed to get reset gpio %ld",
>   			PTR_ERR(ov9282->reset_gpio));
> @@ -1238,7 +1238,7 @@ static int ov9282_power_on(struct device *dev)
> 
>   	usleep_range(400, 600);
> 
> -	gpiod_set_value_cansleep(ov9282->reset_gpio, 1);
> +	gpiod_set_value_cansleep(ov9282->reset_gpio, 0);
> 
>   	ret = clk_prepare_enable(ov9282->inclk);
>   	if (ret) {
> @@ -1261,7 +1261,7 @@ static int ov9282_power_on(struct device *dev)
>   error_clk:
>   	clk_disable_unprepare(ov9282->inclk);
>   error_reset:
> -	gpiod_set_value_cansleep(ov9282->reset_gpio, 0);
> +	gpiod_set_value_cansleep(ov9282->reset_gpio, 1);
> 
>   	regulator_bulk_disable(OV9282_NUM_SUPPLIES, ov9282->supplies);
> 
> @@ -1279,7 +1279,7 @@ static int ov9282_power_off(struct device *dev)
>   	struct v4l2_subdev *sd = dev_get_drvdata(dev);
>   	struct ov9282 *ov9282 = to_ov9282(sd);
> 
> -	gpiod_set_value_cansleep(ov9282->reset_gpio, 0);
> +	gpiod_set_value_cansleep(ov9282->reset_gpio, 1);
> 
>   	clk_disable_unprepare(ov9282->inclk);
> 
> --
> 2.34.1
> 
> 

Needs a Fixes: tag

---
bod

  reply	other threads:[~2025-09-27 10:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  7:34 arm64: dts: qcom: qrb2210-rb1: Add Qualcomm RB1 Vision kit Loic Poulain
2025-09-26  7:34 ` [PATCH v2 1/3] media: i2c: ov9282: Fix reset-gpio logical state Loic Poulain
2025-09-27 10:29   ` Bryan O'Donoghue [this message]
2025-09-29  8:46   ` Vladimir Zapolskiy
2025-09-29  8:53     ` Loic Poulain
2025-09-29 15:18   ` Dave Stevenson
2025-10-02 15:59     ` Loic Poulain
2025-09-26  7:34 ` [PATCH v2 2/3] arm64: dts: qcom: qrb2210-rb1: Add PM8008 node Loic Poulain
2025-09-26 11:10   ` Konrad Dybcio
2025-09-26  7:34 ` [PATCH v2 3/3] arm64: dts: qcom: qrb2210-rb1: Add overlay for vision mezzanine Loic Poulain
2025-09-26 11:11   ` Konrad Dybcio
2025-09-27 10:37   ` Bryan O'Donoghue
2025-09-29  7:52     ` Loic Poulain
2025-09-29  9:03   ` Vladimir Zapolskiy

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=880dcbb3-16fd-4eff-b452-80a172d7e84b@kernel.org \
    --to=bod@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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.