From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Luca Weiss <luca@z3ntu.xyz>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
Shunqian Zheng <zhengsq@rock-chips.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] media: i2c: ov2685: Make reset gpio optional
Date: Sun, 29 Jan 2023 12:22:49 +0100 [thread overview]
Message-ID: <20230129112249.lf2vb7pthrv4nien@uno.localdomain> (raw)
In-Reply-To: <20230129-ov2685-improvements-v1-1-f281bd49399c@z3ntu.xyz>
Hi Luca
On Sun, Jan 29, 2023 at 10:42:35AM +0100, Luca Weiss wrote:
> In some setups XSHUTDOWN is connected to DOVDD when it's unused,
> therefore treat the reset gpio as optional.
I don't have a datasheet for this sensor, but OV sensors usually have
to gpio lines to control powerdown and reset. Datasheets usually
suggest to hook one of the 2 to DOVDD and control the other from the
SoC. How is the sensor hooked up in your design ? No gpio lines is
controlled by the SoC ?
Another question is if we need to software-reset the sensor if no gpio
line is hooked up to XSHUTDOWN.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> drivers/media/i2c/ov2685.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
> index a3b524f15d89..a422f4c8a2eb 100644
> --- a/drivers/media/i2c/ov2685.c
> +++ b/drivers/media/i2c/ov2685.c
> @@ -734,7 +734,7 @@ static int ov2685_probe(struct i2c_client *client,
> if (clk_get_rate(ov2685->xvclk) != OV2685_XVCLK_FREQ)
> dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n");
>
> - ov2685->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> + ov2685->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
> if (IS_ERR(ov2685->reset_gpio)) {
> dev_err(dev, "Failed to get reset-gpios\n");
> return -EINVAL;
>
> --
> 2.39.1
>
next prev parent reply other threads:[~2023-01-29 11:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 9:42 [PATCH 0/4] Improvements for OmniVision OV2685 driver Luca Weiss
2023-01-29 9:42 ` [PATCH 1/4] media: i2c: ov2685: Make reset gpio optional Luca Weiss
2023-01-29 11:22 ` Jacopo Mondi [this message]
2023-01-29 11:49 ` Luca Weiss
2023-01-29 13:05 ` Jacopo Mondi
2023-01-29 9:42 ` [PATCH 2/4] media: i2c: ov2685: Add print for power on write failed Luca Weiss
2023-01-29 11:24 ` Jacopo Mondi
2023-01-29 9:42 ` [PATCH 3/4] media: i2c: ov2685: Add controls from fwnode Luca Weiss
2023-01-29 11:26 ` Jacopo Mondi
2023-01-29 9:42 ` [PATCH 4/4] media: i2c: ov2685: Add .get_selection() support Luca Weiss
2023-01-29 11:29 ` Jacopo Mondi
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=20230129112249.lf2vb7pthrv4nien@uno.localdomain \
--to=jacopo.mondi@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=mchehab@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=zhengsq@rock-chips.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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®