Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577450
| From | Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. |
| Date | 2017-02-09 11:20 +0100 |
| Message-ID | <t8TZv-4SY-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <t6SuR-6B6-3@gated-at.bofh.it> <t7POi-4lV-3@gated-at.bofh.it> <t8hUd-5Qz-17@gated-at.bofh.it> <t8ys2-84Y-29@gated-at.bofh.it> <t8TPQ-4PF-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Sakari
On 2/9/2017 10:02 AM, Sakari Ailus wrote:
> Hi Ramiro,
>
> On Wed, Feb 08, 2017 at 09:56:12AM +0000, Ramiro Oliveira wrote:
>> Hi Sakari
>>
>> On 2/7/2017 5:31 PM, Sakari Ailus wrote:
>>> Hi Ramiro,
>>>
>>> On Mon, Feb 06, 2017 at 11:38:28AM +0000, Ramiro Oliveira wrote:
>>> ...
>>>>>> + ret = ov5647_write_array(sd, ov5647_640x480,
>>>>>> + ARRAY_SIZE(ov5647_640x480));
>>>>>> + if (ret < 0) {
>>>>>> + dev_err(&client->dev, "write sensor_default_regs error\n");
>>>>>> + return ret;
>>>>>> + }
>>>>>> +
>>>>>> + ov5647_set_virtual_channel(sd, 0);
>>>>>> +
>>>>>> + ov5647_read(sd, 0x0100, &resetval);
>>>>>> + if (!(resetval & 0x01)) {
>>>>>
>>>>> Can this ever happen? Streaming start is at the end of the register list.
>>>>>
>>>>
>>>> I'm not sure it can happen. It was just a safeguard, but I can remove it if you
>>>> think it's not necessary
>>>
>>> You're not reading back the other registers either, albeit I'd check that
>>> the I2C accesses actually succeed. Generally the return values are ignored.
>>>
>>
>> So you're recommending I perform a random I2C access after power on to check the
>> system, and discard the read value? Or just drop this piece of code entirely?
>>
>
> I'm not. What I'm saying that you're mostly not checking whether I2C
> accesses succeed or not.
>
I think I'm understanding what you're saying now. You want me to check more
often the return value from write/read functions?
That makes sense. I'll add more checks to the code
--
Best Regards
Ramiro Oliveira
Ramiro.Oliveira@synopsys.com
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH RESEND v7 0/2] Add support for Omnivision OV5647 Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-03 19:30 +0100
[PATCH RESEND v7 1/2] Add OV5647 device tree documentation Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-03 19:30 +0100
Re: [PATCH RESEND v7 1/2] Add OV5647 device tree documentation Sakari Ailus <sakari.ailus@linux.intel.com> - 2017-02-03 21:20 +0100
[PATCH RESEND v7 2/2] Add support for OV5647 sensor. Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-03 19:30 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Sakari Ailus <sakari.ailus@linux.intel.com> - 2017-02-03 21:20 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-06 12:40 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-07 18:40 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-08 12:20 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Sakari Ailus <sakari.ailus@iki.fi> - 2017-02-09 11:10 +0100
Re: [PATCH RESEND v7 2/2] Add support for OV5647 sensor. Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> - 2017-02-09 11:20 +0100
csiph-web