linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>,
	mchehab@kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, davem@davemloft.net,
	gregkh@linuxfoundation.org, geert+renesas@glider.be,
	akpm@linux-foundation.org, hverkuil@xs4all.nl,
	dheitmueller@kernellabs.com, slongerbeam@gmail.com,
	lars@metafoo.de, robert.jarzmik@free.fr, pali.rohar@gmail.com,
	sakari.ailus@linux.intel.com, mark.rutland@arm.com,
	CARLOS.PALMINHA@synopsys.com
Subject: Re: [PATCH v4 2/2] Add support for OV5647 sensor
Date: Tue, 15 Nov 2016 15:52:25 +0100	[thread overview]
Message-ID: <20161115145225.GA7746@amd> (raw)
In-Reply-To: <3b6863c4-e239-7b66-1d96-7f0326f507c5@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

On Tue 2016-11-15 05:50:32, Guenter Roeck wrote:
> On 11/15/2016 04:10 AM, Pavel Machek wrote:
> >Hi!
> >
> >>Add support for OV5647 sensor.
> >>
> >
> >>+static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
> >>+{
> >>+	int ret;
> >>+	unsigned char data[3] = { reg >> 8, reg & 0xff, val};
> >>+	struct i2c_client *client = v4l2_get_subdevdata(sd);
> >>+
> >>+	ret = i2c_master_send(client, data, 3);
> >>+	if (ret != 3) {
> >>+		dev_dbg(&client->dev, "%s: i2c write error, reg: %x\n",
> >>+				__func__, reg);
> >>+		return ret < 0 ? ret : -EIO;
> >>+	}
> >>+	return 0;
> >>+}
> >
> >Sorry, this is wrong. It should something <0 any time error is detected.
> >
> 
> It seems to me that it does return a value < 0 each time an error is detected.

Yep, you are right, sorry, I misparsed the code.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-11-15 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 13:46 [PATCH v4 0/2] Add support for Omnivision OV5647 Ramiro Oliveira
2016-11-14 13:46 ` [PATCH v4 1/2] Add OV5647 device tree documentation Ramiro Oliveira
2016-11-16 13:21   ` Rob Herring
2016-11-14 13:46 ` [PATCH v4 2/2] Add support for OV5647 sensor Ramiro Oliveira
2016-11-15 12:10   ` Pavel Machek
2016-11-15 13:50     ` Guenter Roeck
2016-11-15 14:52       ` Pavel Machek [this message]
2016-11-21 15:00     ` Ramiro Oliveira

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=20161115145225.GA7746@amd \
    --to=pavel@ucw.cz \
    --cc=CARLOS.PALMINHA@synopsys.com \
    --cc=Ramiro.Oliveira@synopsys.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=slongerbeam@gmail.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 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).