Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbbBRQQA (ORCPT ); Wed, 18 Feb 2015 11:16:00 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:55671 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047AbbBRQP4 (ORCPT ); Wed, 18 Feb 2015 11:15:56 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Sebastian Hesselbarth , jszhang@marvell.com, zmxu@marvell.com, sameo@linux.intel.com, Antoine Tenart , linux-kernel@vger.kernel.org, Lee Jones Subject: Re: [PATCH 01/11] mfd: add the Berlin controller driver Date: Wed, 18 Feb 2015 17:15:23 +0100 Message-ID: <8186955.8t2pyeaYSF@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <54E4B6EE.9030304@gmail.com> References: <1423671332-24580-1-git-send-email-antoine.tenart@free-electrons.com> <5101633.XnBqLvsiGQ@wuerfel> <54E4B6EE.9030304@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:rrpvMgl8pDhGeNyY92TQH0S1CMrjrya+6pUycFthMiWc0L4DU/K JI56ENlynhRP/0Ukidh7CadZD/X2d/YlQQfeE9ZaSpvNKXEIWlPrneTu54B1b07dO2BwQRG u+bUgUa0eK1dOAp7lvkCNPbigQ2wf/VIc113opJ23n55PYWcTTunXiFsoXDHtvIjlsspHGp Dls8DJ71Knhmfi2vZTahQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2253 Lines: 47 On Wednesday 18 February 2015 16:59:42 Sebastian Hesselbarth wrote: > > > The alternative is to come up with a way to probe all the child > > devices automatically, but then we should make that parent device > > have a generic driver that does not need to know about the children > > and that can work on any platform with similar requirements. > > Ok, this is most likely the part that Lee doesn't like on the current > driver: a platform_device for registering platform_devices *only* and > only for Berlin. > > So, out of the two options: > > (a) Go for syscon_of_populate_devices() with a new compatible (I guess) > and having sub-nodes for each Linux subsystem that we want to have > a platform_device for. I fear that this will clash with early > registration of clk and we still have to find a way, i.e. device > naming policy, to match the drivers with their devices. I don't see the problem with early clk registration, AFAICT it should just work as expected, you just end up with an extra platform_device for the clocks that does not get bound to a driver later because the device node is already in use by the clock driver. > (b) Join clk, pinctrl, reset into a single chip/soc-control node and > rewrite the sub-drivers to not directly rely on DT compatible. > With this, joining all sub-drivers into drivers/soc/berlin would > be a sane approach, right? Also, I have the strong feeling, that > we will encounter situations later that will require the clk driver > to pull a reset before changing a specific clk rate, e.g. for GPU. If we do this, I think it should be a single driver as well, without subdrivers. We should probably just do this if there is a small number of subsystems to bind to, so the driver doesn't get out of hand. This driver could live in drivers/soc then. If you want to have subdrivers after all, that would be a classic MFD and should live in drivers/mfd. The binding would be the same for both approaches. 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/