From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1451 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755965Ab2FYUxD (ORCPT ); Mon, 25 Jun 2012 16:53:03 -0400 Message-ID: <4FE8CFAC.20302@redhat.com> Date: Mon, 25 Jun 2012 17:53:00 -0300 From: Mauro Carvalho Chehab MIME-Version: 1.0 To: Ezequiel Garcia CC: linux-media@vger.kernel.org Subject: Re: [PATCH 01/12] saa7164: Use i2c_rc properly to store i2c register status References: <1340047425-32000-1-git-send-email-elezegarcia@gmail.com> <4FE8BC2D.9030902@redhat.com> <4FE8C0E0.3080104@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em 25-06-2012 17:06, Ezequiel Garcia escreveu: > On Mon, Jun 25, 2012 at 4:49 PM, Mauro Carvalho Chehab > wrote: >> >> If i2c_rc was never initialized, then just remove it. If it is required, >> then there's a bug somewhere out there on those drivers. >> >> IMHO, if the I2C bus doesn't register, any driver that requires I2C bus >> should return -ENODEV. > > Agreed. > >> >> It should be noticed that there are a few devices that don't need I2C bus >> to work: simple video grabber cards that don't have anything on their I2C. >> There are several of them at bttv, and a few at cx88 and saa7134. Maybe that's >> the reason why those drivers have a var to indicate if i2c got registered. > > Mmm, that would explain mysterious i2c_rc. > > Anyway, I'm still a *q-bit* unsure about which drivers require i2c to > work and which don't. > I'm gonna investigate this carefully and send a v2 (probably just to > send a v3 later :) Yeah, research is needed ;) As "bttv" is the mother of the I2C code found at other PCI drivers, as it is one of the oldest implementations, I bet you'll find this field propagated without usage on some drivers (and probably other unused fields as well ;) ) > > Thanks for reviewing, > Ezequiel. > Regards, Mauro