From: "Alessandrelli, Daniele" <daniele.alessandrelli@intel.com>
To: "Murphy, Paul J" <paul.j.murphy@intel.com>,
"jacopo@jmondi.org" <jacopo@jmondi.org>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"bryan.odonoghue@linaro.org" <bryan.odonoghue@linaro.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"sakari.ailus@iki.fi" <sakari.ailus@iki.fi>
Cc: "hfink@snap.com" <hfink@snap.com>,
"robert.foss@linaro.org" <robert.foss@linaro.org>,
"vladimir.zapolskiy@linaro.org" <vladimir.zapolskiy@linaro.org>,
"dmitry.baryshkov@linaro.org" <dmitry.baryshkov@linaro.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"jgrahsl@snap.com" <jgrahsl@snap.com>
Subject: Re: [PATCH v5 1/4] media: i2c: imx412: Fix reset GPIO polarity
Date: Mon, 25 Apr 2022 14:41:39 +0000 [thread overview]
Message-ID: <c8aa1666e223f6ccde80887654b35a574c455967.camel@intel.com> (raw)
In-Reply-To: <20220415115954.1649217-2-bryan.odonoghue@linaro.org>
Hi Bryan,
On Fri, 2022-04-15 at 12:59 +0100, Bryan O'Donoghue wrote:
> The imx412/imx577 sensor has a reset line that is active low not active
> high. Currently the logic for this is inverted.
>
> The right way to define the reset line is to declare it active low in the
> DTS and invert the logic currently contained in the driver.
>
> The DTS should represent the hardware does i.e. reset is active low.
> So:
> + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
> not:
> - reset-gpios = <&tlmm 78 GPIO_ACTIVE_HIGH>;
>
> I was a bit reticent about changing this logic since I thought it might
> negatively impact @intel.com users. Googling a bit though I believe this
> sensor is used on "Keem Bay" which is clearly a DTS based system and is not
> upstream yet.
Thanks for the fix and sorry for the late reply (I've been off for the
last 2 weeks).
The fix looks good to me and it will not negatively affect us (I
appreciate the consideration!).
Reviewed-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
>
> Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> drivers/media/i2c/imx412.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c
> index be3f6ea55559..e6be6b4250f5 100644
> --- a/drivers/media/i2c/imx412.c
> +++ b/drivers/media/i2c/imx412.c
> @@ -1011,7 +1011,7 @@ static int imx412_power_on(struct device *dev)
> struct imx412 *imx412 = to_imx412(sd);
> int ret;
>
> - gpiod_set_value_cansleep(imx412->reset_gpio, 1);
> + gpiod_set_value_cansleep(imx412->reset_gpio, 0);
>
> ret = clk_prepare_enable(imx412->inclk);
> if (ret) {
> @@ -1024,7 +1024,7 @@ static int imx412_power_on(struct device *dev)
> return 0;
>
> error_reset:
> - gpiod_set_value_cansleep(imx412->reset_gpio, 0);
> + gpiod_set_value_cansleep(imx412->reset_gpio, 1);
>
> return ret;
> }
> @@ -1040,7 +1040,7 @@ static int imx412_power_off(struct device *dev)
> struct v4l2_subdev *sd = dev_get_drvdata(dev);
> struct imx412 *imx412 = to_imx412(sd);
>
> - gpiod_set_value_cansleep(imx412->reset_gpio, 0);
> + gpiod_set_value_cansleep(imx412->reset_gpio, 1);
>
> clk_disable_unprepare(imx412->inclk);
>
next prev parent reply other threads:[~2022-04-25 14:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 11:59 [PATCH v5 0/4] media: i2c: imx412: Add regulator control to imx412 Bryan O'Donoghue
2022-04-15 11:59 ` [PATCH v5 1/4] media: i2c: imx412: Fix reset GPIO polarity Bryan O'Donoghue
2022-04-25 14:41 ` Alessandrelli, Daniele [this message]
2022-04-15 11:59 ` [PATCH v5 2/4] media: i2c: imx412: Fix power_off ordering Bryan O'Donoghue
2022-04-25 14:43 ` Alessandrelli, Daniele
2022-04-15 11:59 ` [PATCH v5 3/4] media: dt-bindings: imx412: Add regulator descriptions Bryan O'Donoghue
2022-04-15 11:59 ` [PATCH v5 4/4] media: i2c: imx412: Add bulk regulator support Bryan O'Donoghue
2022-04-15 15:12 ` Jacopo Mondi
2022-04-26 16:52 ` Alessandrelli, Daniele
2022-05-06 14:26 ` Sakari Ailus
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=c8aa1666e223f6ccde80887654b35a574c455967.camel@intel.com \
--to=daniele.alessandrelli@intel.com \
--cc=bryan.odonoghue@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=hfink@snap.com \
--cc=jacopo@jmondi.org \
--cc=jgrahsl@snap.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=paul.j.murphy@intel.com \
--cc=robert.foss@linaro.org \
--cc=sakari.ailus@iki.fi \
--cc=stable@vger.kernel.org \
--cc=vladimir.zapolskiy@linaro.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;
as well as URLs for NNTP newsgroup(s).