From: Luca Weiss <luca@z3ntu.xyz>
To: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Shunqian Zheng <zhengsq@rock-chips.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Luca Weiss <luca@z3ntu.xyz>
Subject: [PATCH v4 3/3] media: i2c: ov2685: Make reset gpio optional
Date: Thu, 23 Mar 2023 18:57:51 +0100 [thread overview]
Message-ID: <20230129-ov2685-improvements-v4-3-e71985c5c848@z3ntu.xyz> (raw)
In-Reply-To: <20230129-ov2685-improvements-v4-0-e71985c5c848@z3ntu.xyz>
In some setups XSHUTDOWN is connected to DOVDD when it's unused,
therefore treat the reset gpio as optional.
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
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 fdf3e06133302..f119a93e7c647 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -807,7 +807,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.40.0
prev parent reply other threads:[~2023-03-23 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 17:57 [PATCH v4 0/3] Improvements for OmniVision OV2685 Luca Weiss
2023-03-23 17:57 ` [PATCH v4 1/3] media: dt-bindings: media: rkisp1: complete ov2685 example Luca Weiss
2023-03-23 17:57 ` [PATCH v4 2/3] media: dt-bindings: ov2685: convert to dtschema Luca Weiss
2023-03-31 8:39 ` Sakari Ailus
2023-03-31 9:18 ` Luca Weiss
2023-03-31 9:39 ` Sakari Ailus
2023-04-18 23:54 ` Rob Herring
2023-04-19 15:54 ` Luca Weiss
2023-03-23 17:57 ` Luca Weiss [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=20230129-ov2685-improvements-v4-3-e71985c5c848@z3ntu.xyz \
--to=luca@z3ntu.xyz \
--cc=devicetree@vger.kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).