public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Olli Salonen <olli.salonen@iki.fi>, Steven Toth <stoth@kernellabs.com>
Cc: Linux-Media <linux-media@vger.kernel.org>,
	Peter Faulkner-Ball <faulkner-ball@xtra.co.nz>
Subject: Re: [PATCH][media] SI2168: Resolve unknown chip version errors with different HVR22x5 models
Date: Fri, 05 Jun 2015 17:18:38 +0300	[thread overview]
Message-ID: <5571AFBE.8050509@iki.fi> (raw)
In-Reply-To: <CAAZRmGxtzq1qX=JKusF_A+_0od8sY8LO_kN-6ZWge2E7GMoweA@mail.gmail.com>

On 06/05/2015 04:40 PM, Olli Salonen wrote:
> Hi Steven,
>
> It seems to me that that part of the code is identical to your driver, no?
>
> The media_tree driver:
>
> retval = saa7164_api_i2c_read(bus,
>                       msgs[i].addr,
>                       0 /* reglen */,
>                       NULL /* reg */, msgs[i].len, msgs[i].buf);
>
> It's exactly the same with a little bit different formatting.

And that looks correct.

But the patch which does not look correct, or is at least unclear, is that
[media] saa7164: Improvements for I2C handling
http://permalink.gmane.org/gmane.comp.video.linuxtv.scm/22211

First change does not have any effect as len should be zero in any case 
and memcpy() should do nothing.

Second change looks something that is likely wrong. There is some hack 
which increases data len. All that register len stuff is logically wrong 
- I2C adapter handles just bytes and should not know nothing about 
client register layout. OK, there is some exceptions (like af9035) where 
I2C firmware actually knows register layout for some strange reason.

So could you remove that patch and test?

Antti

-- 
http://palosaari.fi/

  reply	other threads:[~2015-06-05 14:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 12:38 [PATCH][media] SI2168: Resolve unknown chip version errors with different HVR22x5 models Steven Toth
2015-06-04 12:47 ` Antti Palosaari
2015-06-04 12:57   ` Steven Toth
2015-06-04 12:57   ` Olli Salonen
2015-06-04 13:22     ` Olli Salonen
2015-06-04 13:49       ` Antti Palosaari
2015-06-04 14:03       ` Steven Toth
2015-06-05 13:40         ` Olli Salonen
2015-06-05 14:18           ` Antti Palosaari [this message]
2015-06-06  7:41             ` Olli Salonen
2015-06-11 18:21           ` Steven Toth

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=5571AFBE.8050509@iki.fi \
    --to=crope@iki.fi \
    --cc=faulkner-ball@xtra.co.nz \
    --cc=linux-media@vger.kernel.org \
    --cc=olli.salonen@iki.fi \
    --cc=stoth@kernellabs.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