Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbbBRL7D (ORCPT ); Wed, 18 Feb 2015 06:59:03 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:35783 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbbBRL7B (ORCPT ); Wed, 18 Feb 2015 06:59:01 -0500 Date: Wed, 18 Feb 2015 11:58:53 +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: <20150218115853.GB22296@x1> References: <1423671332-24580-1-git-send-email-antoine.tenart@free-electrons.com> <1423671332-24580-2-git-send-email-antoine.tenart@free-electrons.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54E4730D.1060507@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: 2586 Lines: 66 On Wed, 18 Feb 2015, Sebastian Hesselbarth wrote: > On 18.02.2015 11:40, Lee Jones wrote: > >On Wed, 18 Feb 2015, Antoine Tenart wrote: > [...] > >>chip: chip-controller@ea0000 { > >> compatible = "marvell,berlin2q-chip-ctrl", "syscon"; > >> reg = <0xea0000 0x400>, <0xdd0170 0x10>; > >> #clock-cells = <1>; > >> clocks = <&refclk>; > >> clock-names = "refclk"; > >> > >> soc_pinctrl: pin-controller { > >> compatible = "marvell,berlin2q-soc-pinctrl"; > >> > >> twsi0_pmux: twsi0-pmux { > >> groups = "G6"; > >> function = "twsi0"; > >> }; > >> > >> twsi1_pmux: twsi1-pmux { > >> groups = "G7"; > >> function = "twsi1"; > >> }; > >> }; > >> > >> chip_rst: reset { > >> compatible = "marvell,berlin2-reset"; > >> #reset-cells = <2>; > >> }; > >>}; > > > >This is what I'd expect to see in DT, so we're heading in the right > >direction. So make to my original question, what's the point of this > >MFD driver, and why don't you just let DT framework register these > >devices for you? > > > >You issue a compatible string here, then duplicate it in the driver, > >why do you think this is necessary? > > there is no DT framework that automatically probes for > compatible<->driver matches. You either make it "simple-bus" compatible > which will call of_foo_populate() or you have to register each of the > devices yourself. It clearly is not a bus, so if we use this as a > workaround, we'll get yelled at by others. 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. 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? -- 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/