Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978Ab1DSOgD (ORCPT ); Tue, 19 Apr 2011 10:36:03 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:60827 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665Ab1DSOfw (ORCPT ); Tue, 19 Apr 2011 10:35:52 -0400 From: Arnd Bergmann To: "Arend van Spriel" Subject: Re: Could I (ab)use bus (struct bus_type) for virtual Broadcom bus? Date: Tue, 19 Apr 2011 16:35:40 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.37; KDE/4.3.2; x86_64; ; ) Cc: =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= , "George Kashperko" , "Hauke Mehrtens" , "Russell King" , "linux-kernel@vger.kernel.org" , "linux-wireless@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Jonas Gorski" , "b43-dev@lists.infradead.org" , "Greg KH" , "Andy Botting" , "Larry Finger" References: <201104171938.12834.arnd@arndb.de> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201104191635.40351.arnd@arndb.de> X-Provags-ID: V02:K0:fXRHylkA2+wY5vvPccKtk0WgJgGWi5iGHjGdgqzhdEo 6XBSVH3DhdZK8pM+0UJqoTQ8FGrzP+mPieg2ZZ5NqP1G3kYb8b y4QSq/b28zX+uwD23cinmRgCmUX8jdCfGEL1bnJRGTYBjdTP5A fW1LHcw0cxMaQyxglXX7WZ9VAt9FqPp3SdqFxzaWeWtOVyDK/e YgEm5asWKvTzjG26RwVNw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2053 Lines: 41 On Tuesday 19 April 2011, Arend van Spriel wrote: > > A new bus_type really only makes sense if you expect a lot of devices > > to use this and you want to have the probing in the bus. If you only > > want to have a way to enumerate devices that get created by the > > parent driver, you can also use platform devices. > > The main assumption of the (bcm)axi driver seems to be that each core can > be considered as a device. Correct me if I am wrong, but I consider a > device to be an entity providing a particular system function. So an > ethernet device provides ethernet connectivity function, a mixer device > provides sound mixing function, and so on. The cores within a chip are not > always self-contained like this. To clarify let's say a system function is > realized by programming core A, core B, and finally trigger core A to set > the function in motion. This implies the need of coordination between the > programming steps on those cores. > > Is my view on what is a device wrong? Does a platform device differ in > this respect from a regular device? A platform device means something that cannot be probed, in every other respect it is the same as other devices. From your explanation above, it seems that you don't actually need to represent the cores on your particular chips as struct device in Linux at all. If you wanted to use platform_device, the right way would probably be an MFD device that creates multiple child devices (which end up as platform_device, though you don't need to worry about that) from the PCI driver. Then you could use the child devices completely independent from one another. Since you say that the cores in this case are tightly coupled and don't provide independent functionality to the system, there is no need to represent them as devices. Arnd -- 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/