From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jon Smirl" Subject: Re: [PATCH 0/4] i2c: Introduce i2c listeners Date: Wed, 4 Jun 2008 15:28:54 -0400 Message-ID: <9e4733910806041228i330e145q439d3ee43494f4c4@mail.gmail.com> References: <20080604201334.19636f30@hyperion.delvare> <9e4733910806041155n7551ac74lf29c8a32163ec09a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9e4733910806041155n7551ac74lf29c8a32163ec09a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: Jean Delvare Cc: David Brownell , Linux I2C List-Id: linux-i2c@vger.kernel.org On 6/4/08, Jon Smirl wrote: > On 6/4/08, Jean Delvare wrote: > > Hi all, > > > > This patch set demonstrates a new concept which I would like to add to > > the i2c subsystem. It is named "i2c listeners" and is based on the > > following structure: Could the existing API be used something like this? Drivers register with i2c core using standard driver registration. Class and address ranges are exposed in a structure like PCI IDs. I2C can make up it's own ID structure equivalent to the PCI IDs one. When a new adapter/bus is created i2c core gets the event. Core then scans the registered driver structures looking for class matches. When a match is encountered it repeatedly calls the driver's probe function with the addresses from the range. Driver returns true/false on each probe which triggers creation of the device. Why do drivers need the bus creation (attach/detach adapter) events? -- Jon Smirl jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c