From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760900AbZD1IJH (ORCPT ); Tue, 28 Apr 2009 04:09:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756226AbZD1IIt (ORCPT ); Tue, 28 Apr 2009 04:08:49 -0400 Received: from zone0.gcu-squad.org ([212.85.147.21]:33513 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753113AbZD1IIs (ORCPT ); Tue, 28 Apr 2009 04:08:48 -0400 Date: Tue, 28 Apr 2009 10:08:30 +0200 From: Jean Delvare To: Kay Sievers Cc: Michael E Brown , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Matt Domsch Subject: Re: Class device namespaces Message-ID: <20090428100830.1a5d944c@hyperion.delvare> In-Reply-To: References: <20090329174836.6de797d6@hyperion.delvare> <20090330104952.26f03c13@hyperion.delvare> <20090426085401.3788fc9c@hyperion.delvare> <20090427180036.269a40b3@hyperion.delvare> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kay, On Mon, 27 Apr 2009 23:57:40 +0200, Kay Sievers wrote: > On Mon, Apr 27, 2009 at 18:00, Jean Delvare wrote: > > > I'd like to give a try to converting i2c-adapter devices to bus devices > > rather than class devices, if you think that's how things should be. > > Can you please explain to me how this would be done? > > Register a "i2c" bus_type with the core, and instead of assigning > dev.class = class, you assign dev.bus = bus to the devices you > register, that should work, if there is nothing more complicated going > on in the background. Err, I'm confused. We _already_ have an "i2c" bus type, and we already assign dev.bus = &i2c_bus_type, but for i2c devices (or slaves if you prefer), not adapters (masters). Doing the same for adapters (the parents) and devices (the children) looks totally wrong to me. Are you really certain that i2c-adapters should be bus devices rather than class devices? -- Jean Delvare