devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Versatile Express sysregs rework
@ 2014-02-11 16:53 Pawel Moll
  2014-02-11 16:53 ` [PATCH 1/3] driver core & of: Mark of_nodes of added device as populated Pawel Moll
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pawel Moll @ 2014-02-11 16:53 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, devicetree, lm-sensors, arm
  Cc: Rob Herring, Mark Rutland, Ian Campbell, Kumar Gala,
	Greg Kroah-Hartman, Mike Turquette, Jean Delvare, Guenter Roeck,
	Samuel Ortiz, Lee Jones, Arnd Bergmann, Grant Likely,
	Dmitry Eremin-Solenikov, David Woodhouse, Liam Girdwood,
	Mark Brown, Pawel Moll

It's over 6 month since I promised Samuel to rework the
not-really-MFD driver for Versatile Express sysregs. It's
also a while since I sent the RFC for the series, but
finally - it is here!

As suggested by Arnd back then, the VE configuration
infrastructure is now exposing standard regmap interface
instead of a custom one. As requested by Samuel, the sysreg
driver mainly consists of MFD cells definition now.

All this was possible thanks to the first patch, which
tries to address in a simple way an issue discussed
a number of times - a problem of early devices registration
in a "DT-powered" system. It simply makes it possible
to manually create devices for selected nodes at appropriate
init levels and guarantees that such devices will not
be created again during the massive of_platform_populate().

I think it would make sense to merge the whole series
through arm-soc tree so will appreciate opinions and/or
acks from respective maintainers.

Pawel Moll (3):
  driver core & of: Mark of_nodes of added device as populated
  mfd: vexpress: Convert custom func API to regmap
  mfd: vexpress: Define the device as MFD cells

 .../devicetree/bindings/arm/vexpress-sysreg.txt    |  79 ++-
 Documentation/devicetree/bindings/arm/vexpress.txt |  15 +-
 arch/arm/boot/dts/vexpress-v2m-rs1.dtsi            |  76 ++-
 arch/arm/boot/dts/vexpress-v2m.dtsi                |  76 ++-
 arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts         |   5 +-
 arch/arm/mach-vexpress/ct-ca9x4.c                  |  10 +-
 arch/arm/mach-vexpress/v2m.c                       |  25 +-
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi       |   2 +-
 drivers/base/core.c                                |   4 +
 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                                |  15 +-
 drivers/mfd/Makefile                               |   2 +-
 drivers/mfd/vexpress-config.c                      | 288 -----------
 drivers/mfd/vexpress-sysreg.c                      | 538 ++++++---------------
 drivers/misc/Kconfig                               |   9 +
 drivers/misc/Makefile                              |   1 +
 drivers/misc/vexpress-syscfg.c                     | 320 ++++++++++++
 drivers/of/device.c                                |  16 +
 drivers/of/platform.c                              |   6 +-
 drivers/power/reset/vexpress-poweroff.c            |  13 +-
 drivers/regulator/vexpress.c                       |  50 +-
 include/linux/of.h                                 |   6 +
 include/linux/of_device.h                          |  11 +
 include/linux/vexpress.h                           |  93 +---
 28 files changed, 1059 insertions(+), 923 deletions(-)
 create mode 100644 drivers/bus/vexpress-config.c
 delete mode 100644 drivers/mfd/vexpress-config.c
 create mode 100644 drivers/misc/vexpress-syscfg.c

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] mfd: vexpress: Convert custom func API to regmap
@ 2014-02-12  2:26 Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2014-02-12  2:26 UTC (permalink / raw)
  To: Pawel Moll
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA, arm-DgEjT+Ai2ygdnm+yROfE0A,
	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

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 <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> ---
>  .../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 <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-04-28 17:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 16:53 [PATCH 0/3] Versatile Express sysregs rework Pawel Moll
2014-02-11 16:53 ` [PATCH 1/3] driver core & of: Mark of_nodes of added device as populated Pawel Moll
2014-02-11 17:32   ` Christopher Covington
2014-04-28 17:40     ` Pawel Moll
     [not found]   ` <1392137610-27842-2-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-02-13 19:15     ` Rob Herring
2014-04-28 17:37       ` Pawel Moll
2014-04-28 17:50         ` Pawel Moll
2014-02-11 16:53 ` [PATCH 2/3] mfd: vexpress: Convert custom func API to regmap Pawel Moll
2014-02-11 16:53 ` [PATCH 3/3] mfd: vexpress: Define the device as MFD cells Pawel Moll
  -- strict thread matches above, loose matches on Subject: below --
2014-02-12  2:26 [PATCH 2/3] mfd: vexpress: Convert custom func API to regmap Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).