public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark McClelland <mark@alpha.dyndns.org>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: Linus Torvalds <torvalds@transmeta.com>, Greg KH <greg@kroah.com>,
	Frank Davis <fdavis@si.rr.com>,
	Kernel List <linux-kernel@vger.kernel.org>,
	Ronald Bultje <R.S.Bultje@pharm.uu.nl>
Subject: Re: [patch] i2c #3/3: add class field to i2c_adapter
Date: Wed, 07 May 2003 03:12:56 -0700	[thread overview]
Message-ID: <3EB8DC28.8040206@alpha.dyndns.org> (raw)
In-Reply-To: <20030506195154.GC865@bytesex.org>

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

Gerd Knorr wrote:

>This is the last of three patches for i2c.  It introduces a new field
>to i2c_adapter which classifies the kind of hardware a i2c adapter
>belongs to (analog tv card / dvb card / smbus / gfx card ...).
>

I've attached a patch that adds classes for analog and digital cameras 
(webcams, etc...). I plan to submit one such driver in the next few days.

The patch also fixes a typo ("DIGINAL").

>i2c chip
>drivers can use this infomation to decide whenever they want to look for
>hardware on that adapter or not.  It doesn't make sense to probe for a
>tv tuner on a smbus for example ...
>

Actually it does in some cases. I know of two devices that have analog 
tuners on an smbus-like interface (OV511 USB TV and W9967CF USB TV). The 
tuner can be controlled using a pair of i2c_smbus_write_byte_data() 
calls. This works because, AFAIK, all four-byte tuners can differentiate 
between bytes 0-1 and 2-3 due to their bit patterns.

Would a patch that adds smbus algorithm support to tuner.c be 
acceptable? It will only add about twelve lines, and will still use 
i2c_master_send() when possible.

-- 
Mark McClelland
mark@alpha.dyndns.org


[-- Attachment #2: i2c_adap_class_cam-2.5.69.patch --]
[-- Type: text/plain, Size: 1159 bytes --]


Add I2C classes for analog and digital cameras, and fix a typo.

diff -Nru a/include/linux/i2c.h b/include/linux/i2c.h
--- a/include/linux/i2c.h	Wed May  7 01:29:59 2003
+++ b/include/linux/i2c.h	Wed May  7 01:29:59 2003
@@ -280,10 +280,12 @@
 						/* Must equal I2C_M_TEN below */
 
 /* i2c adapter classes (bitmask) */
-#define I2C_ADAP_CLASS_SMBUS      (1<<0)        /* lm_sensors, ... */
-#define I2C_ADAP_CLASS_TV_ANALOG  (1<<1)        /* bttv + friends */
-#define I2C_ADAP_CLASS_TV_DIGINAL (1<<2)        /* dbv cards */
-#define I2C_ADAP_CLASS_DDC        (1<<3)        /* i2c-matroxfb ? */
+#define I2C_ADAP_CLASS_SMBUS        (1<<0)      /* lm_sensors, ... */
+#define I2C_ADAP_CLASS_TV_ANALOG    (1<<1)      /* bttv + friends */
+#define I2C_ADAP_CLASS_TV_DIGITAL   (1<<2)      /* dbv cards */
+#define I2C_ADAP_CLASS_DDC          (1<<3)      /* i2c-matroxfb ? */
+#define I2C_ADAP_CLASS_CAM_ANALOG   (1<<4)      /* camera with analog CCD */
+#define I2C_ADAP_CLASS_CAM_DIGITAL  (1<<5)      /* most webcams */
 
 /* i2c_client_address_data is the struct for holding default client
  * addresses for a driver and for the parameters supplied on the


  reply	other threads:[~2003-05-07 10:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-06 19:34 [patch] i2c #1/3: listify i2c core Gerd Knorr
2003-05-06 19:40 ` [patch] i2c #2/3: add i2c_clients_command Gerd Knorr
2003-05-06 19:51   ` [patch] i2c #3/3: add class field to i2c_adapter Gerd Knorr
2003-05-07 10:12     ` Mark McClelland [this message]
2003-05-09 22:00       ` Greg KH
2003-05-07  0:17 ` [patch] i2c #1/3: listify i2c core Greg KH

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=3EB8DC28.8040206@alpha.dyndns.org \
    --to=mark@alpha.dyndns.org \
    --cc=R.S.Bultje@pharm.uu.nl \
    --cc=fdavis@si.rr.com \
    --cc=greg@kroah.com \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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