Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763603AbYBLRmj (ORCPT ); Tue, 12 Feb 2008 12:42:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763349AbYBLRm1 (ORCPT ); Tue, 12 Feb 2008 12:42:27 -0500 Received: from sj-iport-1.cisco.com ([171.71.176.70]:43580 "EHLO sj-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759153AbYBLRm0 (ORCPT ); Tue, 12 Feb 2008 12:42:26 -0500 To: Greg KH Cc: Jeff Garzik , Stephen Rothwell , LKML , linux-next@vger.kernel.org, linux-arch@vger.kernel.org, Andrew Morton , Linus Subject: Re: multiple drivers, single device X-Message-Flag: Warning: May contain useful information References: <20080212120208.f7168a91.sfr@canb.auug.org.au> <20080212042133.GA4625@kroah.com> <47B1C829.8020800@garzik.org> <20080212164232.GA326@kroah.com> From: Roland Dreier Date: Tue, 12 Feb 2008 09:42:20 -0800 In-Reply-To: <20080212164232.GA326@kroah.com> (Greg KH's message of "Tue, 12 Feb 2008 08:42:32 -0800") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 12 Feb 2008 17:42:23.0297 (UTC) FILETIME=[9FC77B10:01C86D9E] Authentication-Results: sj-dkim-4; header.From=rdreier@cisco.com; dkim=pass ( sig from cisco.com/sjdkim4002 verified; ); Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1159 Lines: 24 > The work I'm doing here is for stupid PCI firmware engineers, who have > created devices that are different things, all bound up under the same > PCI device. I'm thinking of watchdog timers and random number > generator and i2c controller on the same PCI device, or even the more > basic, frame buffer and DRM access to the same PCI video device. > > The OLPC is a good example of hardware that needs this kind of > functionality. Sounds interesting. I've been meaning to work on this too for quite a while, but I'm glad to see you beat me to it. An example of an in-tree use case for this would be the mlx4 drivers-- you can look at drivers/net/mlx4/intf.c to see the simple stupid solution I came up with to allow an IB and a NIC (not yet upstream) driver to share the same PCI device. A good test for your stuff would be if it simplifies the code from the ad hoc solution I came up with. - R. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/