Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbaBLC0Y (ORCPT ); Tue, 11 Feb 2014 21:26:24 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:62320 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085AbaBLC0W (ORCPT ); Tue, 11 Feb 2014 21:26:22 -0500 Date: Tue, 11 Feb 2014 18:26:16 -0800 From: Guenter Roeck To: Pawel Moll Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, lm-sensors@lm-sensors.org, arm@kernel.org, Rob Herring , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Mike Turquette , Jean Delvare , Samuel Ortiz , Lee Jones , Arnd Bergmann , Grant Likely , Dmitry Eremin-Solenikov , David Woodhouse , Liam Girdwood , Mark Brown Subject: Re: [PATCH 2/3] mfd: vexpress: Convert custom func API to regmap Message-ID: <20140212022616.GA19334@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 On Tue, Feb 11, 2014 at 04:53:29PM +0000, Pawel Moll wrote: > Components of the Versatile Express platform (configuration > microcontrollers on motherboard and daughterboards in particular) > talk to each other over a custom configuration bus. They > provide miscellaneous functions (from clock generator control > to energy sensors) which are represented as platform devices > (and Device Tree nodes). The transactions on the bus can > be generated by different "bridges" in the system, some > of which are universal for the whole platform (for the price > of high transfer latencies), others restricted to a subsystem > (but much faster). > > Until now drivers for such functions were using custom "func" > API, which is being replaced in this patch by regmap calls. > This required: > > * a rework (and move to drivers/bus directory, as suggested > by Samuel and Arnd) of the config bus core, which is much > simpler now and uses device model infrastructure (class) > to keep track of the bridges; non-DT case (soon to be > retired anyway) is simply covered by a special device > registration function > > * the new config-bus driver also takes over device population, > so there is no need for special matching table for > of_platform_populate nor "simple-bus" hack in the arm64 > model dtsi file (relevant bindings documentation has > been updated); this allows all the vexpress devices > fit into normal device model, making it possible > to remove plenty of early inits and other hacks in > the near future > > * adaptation of the syscfg bridge implementation in the > sysreg driver, again making it much simpler; there is > a special case of the "energy" function spanning two > registers, where they should be both defined in the tree > now, but backward compatibility is maintained in the code > > * modification of the relevant drivers: > > * hwmon - just a straight-forward API change > * regulator - API change plus error handling > simplification > * power/reset driver - API change, but as devm_regmap*() > can't be called when the system is dying, it must > be requested at driver probe time > * osc clock driver - this one required larger rework > in order to turn in into a standard platform driver > (and this a good thing on its own) > > Signed-off-by: Pawel Moll > --- > .../devicetree/bindings/arm/vexpress-sysreg.txt | 43 ++- > Documentation/devicetree/bindings/arm/vexpress.txt | 15 +- > arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 5 +- > arch/arm/mach-vexpress/ct-ca9x4.c | 10 +- > arch/arm/mach-vexpress/v2m.c | 18 +- > arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi | 2 +- > drivers/bus/Kconfig | 9 + > drivers/bus/Makefile | 2 + > drivers/bus/vexpress-config.c | 202 +++++++++++ > drivers/clk/versatile/clk-vexpress-osc.c | 94 +++-- > drivers/hwmon/vexpress.c | 15 +- > drivers/mfd/Kconfig | 7 - > drivers/mfd/Makefile | 2 +- > drivers/mfd/vexpress-config.c | 288 --------------- > drivers/mfd/vexpress-sysreg.c | 395 +++++++++++---------- > drivers/power/reset/vexpress-poweroff.c | 13 +- > drivers/regulator/vexpress.c | 50 +-- > include/linux/vexpress.h | 79 +---- > 18 files changed, 568 insertions(+), 681 deletions(-) > create mode 100644 drivers/bus/vexpress-config.c > delete mode 100644 drivers/mfd/vexpress-config.c > For hwmon: Acked-by: Guenter Roeck -- 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/