From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCHv1 1/2] Export SoC info through sysfs Date: Thu, 10 Mar 2011 15:29:25 +0100 Message-ID: <201103101529.25661.arnd@arndb.de> References: <1299689961-5028-1-git-send-email-maxime.coquelin-nonst@stericsson.com> <20110310140807.GB7411@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110310140807.GB7411@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Mark Brown Cc: ext Nishanth Menon , ext Tony Lindgren , Peter De-Schrijver , Ambresh , Saravana Kannan , Andrei Warkentin , Lee Jones , Rabin VINCENT , Russell King , Jonas ABERG , ext Kevin Hilman , David Brown , Maxime Coquelin , "linux-arm-msm@vger.kernel.org" , Loic PALLARDY , "eduardo.valentin@nokia.com" , maxime_coquelin@yahoo.fr, Ryan Mallon , Linux-OMAP , "linux-arm-kernel@lists.infradead.org" List-Id: linux-omap@vger.kernel.org On Thursday 10 March 2011, Mark Brown wrote: > On Thu, Mar 10, 2011 at 02:25:19PM +0100, Linus Walleij wrote: > > > "platform" means "platform bus" in this context, does it not? > > So your reasoning is that since on SoC:s there is one dominant > > bus called the platform bus that should also hold a reference to the > > SoC-specific stuff. > > Lots of stuff (like the MFD children of I2C devices) gets shoved on the > platform bus on Linux - every time someone considers creating a new bus > type for trivial devices the discussion ends up saying that the code > will end up being pretty much identical to the platform bus as it's so > straightforward so there's no point in cut'n'pasting the code. Note that there is a difference between using top-level platform devices (the ones that show up in /sys/devices/platform/) and platform devices that are children of others (all the others that are in /sys/bus/platform). Creating a new bus_type for trivial things is rather pointless, so using a platform device is fine for MFD, since the child devices just show up in the hierarchy. What some broken drivers do is to create platform devices ad hoc and just put them into /sys/platform/ directly although the devices clearly have a parent somewhere. These are bugs that should be fixed. Arnd