Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbbBRPGK (ORCPT ); Wed, 18 Feb 2015 10:06:10 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:38483 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631AbbBRPGH (ORCPT ); Wed, 18 Feb 2015 10:06:07 -0500 Date: Wed, 18 Feb 2015 15:06:02 +0000 From: Lee Jones To: Sebastian Hesselbarth Cc: Antoine Tenart , sameo@linux.intel.com, jszhang@marvell.com, zmxu@marvell.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de Subject: Re: [PATCH 01/11] mfd: add the Berlin controller driver Message-ID: <20150218150602.GE22296@x1> References: <20150216124808.GC14545@x1> <20150217092020.GC4507@kwain> <20150217115447.GA3989@x1> <20150218084004.GD21937@kwain> <20150218090958.GA18042@x1> <20150218092225.GE21937@kwain> <20150218104023.GA22296@x1> <54E4730D.1060507@gmail.com> <20150218115853.GB22296@x1> <54E48EF0.4050807@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54E48EF0.4050807@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3523 Lines: 84 On Wed, 18 Feb 2015, Sebastian Hesselbarth wrote: > On 02/18/2015 12:58 PM, Lee Jones wrote: > >I do agree that using 'simple-bus' to describe only this IP would be > >an abuse. However, my foundation thought/argument is unchanged. This > >'driver' is a hack. It has no functional use besides to work around a > >problem of semantics and as such has no place in MFD. > > Lee, > > sorry I don't get it. Here you say that using simple-bus is an abuse... > > >Back onto the simple-bus theme, as this is a syscon device it is a bus > >of sorts. Have you thought about making it a child of your its syscon > >node, then using simple-bus to get the OF framework to register the > >child devices? > > ... and here you suggest to use simple-bus to register the child > devices? Nope, that's not what I said: "I do agree that using 'simple-bus' to describe *ONLY THIS IP* would be an abuse." ... although I believe there is a need to treat syscon devices as simple buses. There are examples of devices doing this already: git grep -El 'syscon.*simple-bus' next/master next/master:arch/arm/boot/dts/imx6qdl.dtsi next/master:arch/arm/boot/dts/imx6sl.dtsi next/master:arch/arm/boot/dts/imx6sx.dtsi next/master:arch/arm/boot/dts/zynq-7000.dtsi > I fundamentally disagree that either this registers or syscon in general > should in any way be seen as a bus. The chip control registers is an > highly unsorted bunch of bits that we try to match with cleanly > separated subsystems. This makes it a resource but no bus of any sort. This is where my comment about semantics comes into play. syscon may not be a bus is the truest sense; however, this is clearly a requirement for sub devices to be probed in the same way a simple-bus is currently. So we're just missing a framework somewhere. We can fix that. > The problem that we try to solve here is not a DT problem but solely > driven by the fact that we need something to register platform_devices > for pinctrl and reset. The unit we describe in DT is a pinctrl-clock- > power-reset-unit - or short chip control. I agree with the last part, but this is a DT problem. It lacks the functionality to be able to cleanly register these types of (sub-)devices. Devices which, in my opinion should be described inside the parent syscon node. > If you argue that mfd is not the right place for this "driver" we'll > have to find a different place for it. I remember Mike has no problem > with extending early probed clock drivers to register additional > platform_devices - so I guess we end up putting it in there ignoring > mfd's ability to do it for us. My argument is not that this fake driver doesn't belong in MFD, it's that it doesn't belong. That includes shoving it in drivers/clk. I will be only too happy to have a chat with Mike and provide him with my reasons why. What I think we should do however, it write some framework code which can neatly handle these use-cases, which may just be a case of: s/of_platform_bus_probe/of_platform_subdevice_probe/ ... obviously I'm oversimplifying by quite some margin, but I'm sure you catch my drift. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- 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/