From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
To: Shunqian Zheng <zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ddl-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: Re: [PATCH v4 2/5] media: ov5695: add support for OV5695 sensor
Date: Tue, 9 Jan 2018 18:54:40 +0200 [thread overview]
Message-ID: <20180109165440.droexlfysvtyt6kl@tarshish> (raw)
In-Reply-To: <1515509304-15941-3-git-send-email-zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Hi Shunqian Zheng,
On Tue, Jan 09, 2018 at 10:48:21PM +0800, Shunqian Zheng wrote:
> +static int ov5695_write_array(struct i2c_client *client,
> + const struct regval *regs)
> +{
> + u32 i;
> + int ret = 0;
> +
> + for (i = 0; ret == 0 && regs[i].addr != REG_NULL; i++)
> + ret = ov5695_write_reg(client, regs[i].addr,
> + OV5695_REG_VALUE_08BIT, regs[i].val);
This loop should stop on first failure, and return the error value. With
current code a register write failure is masked by following writes.
> +
> + return ret;
> +}
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.52.368.4656, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-01-09 16:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 14:48 [PATCH v4 0/5] Add supports for OV2685 and OV5695 sensors Shunqian Zheng
2018-01-09 14:48 ` [PATCH v4 2/5] media: ov5695: add support for OV5695 sensor Shunqian Zheng
[not found] ` <1515509304-15941-3-git-send-email-zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-09 16:54 ` Baruch Siach [this message]
2018-01-10 1:08 ` Shunqian Zheng
2018-01-09 14:48 ` [PATCH v4 3/5] dt-bindings: media: Add bindings for OV2685 Shunqian Zheng
2018-01-09 14:48 ` [PATCH v4 4/5] media: ov2685: add support for OV2685 sensor Shunqian Zheng
[not found] ` <1515509304-15941-1-git-send-email-zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-09 14:48 ` [PATCH v4 1/5] dt-bindings: media: Add bindings for OV5695 Shunqian Zheng
2018-01-09 14:48 ` [PATCH v4 5/5] [media] MAINTAINERS: add entries for OV2685/OV5695 sensor drivers Shunqian Zheng
[not found] ` <1515509304-15941-6-git-send-email-zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-09 22:33 ` Sakari Ailus
2018-01-12 1:52 ` Shunqian Zheng
[not found] ` <7e73473b-1c72-2fcd-4c55-e2c6c87550f6-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-01-12 7:30 ` 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=20180109165440.droexlfysvtyt6kl@tarshish \
--to=baruch-nswtu9s1w3p6gbpvegmw2w@public.gmane.org \
--cc=ddl-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=zhengsq-TNX95d0MmH7DzftRWevZcw@public.gmane.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).