20 Jan, 2017

1 commit

  • commit c090959b9dd8c87703e275079aa4b4a824ba3f8e upstream.

    Make sure to drop the reference to the parent device taken by
    class_find_device() after populating the bus.

    Fixes: 3b9334ac835b ("mfd: vexpress: Convert custom func API to regmap")
    Acked-by: Sudeep Holla
    Signed-off-by: Johan Hovold
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

08 Aug, 2016

1 commit


01 Feb, 2016

1 commit

  • for_each_compatible_node performs an of_node_get on each iteration, so
    to break out of the loop an of_node_put is required.

    Found using Coccinelle. The semantic patch used for this is as follows:

    //
    @@
    expression e;
    local idexpression n;
    @@

    for_each_compatible_node(n, ...) {
    ... when != of_node_put(n)
    when != e = n
    (
    return n;
    + of_node_put(n);
    ? return ...;
    )
    ...
    }
    //

    Acked-by: Liviu Dudau
    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Sudeep Holla

    Amitoj Kaur Chawla
     

07 Aug, 2015

1 commit


27 May, 2014

1 commit

  • The versatile express changes for 3.16 introduced a number of
    build regressions for randconfig kernels by not tracking dependencies
    between the components right.

    This patch tries to rectify that:

    * the mach-vexpress code cannot link without the syscfg driver,
    which in turn needs MFD_VEXPRESS_SYSREG
    * various drivers call devm_regmap_init_vexpress_config(), which
    has to be exported so it can be used by loadable modules
    * the configuration bus uses OF DT helper functions that are not
    available to platforms disable CONFIG_OF
    * The sysreg driver exports GPIOs through gpiolib, which can
    be disabled on some platforms.
    * The clocksource code cannot be built on platforms that don't
    use modern timekeeping but rely on gettimeoffset.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

16 May, 2014

1 commit

  • 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
    * power/reset driver - API change
    * regulator - API change plus error handling
    simplification
    * osc clock driver - this one required larger rework
    in order to turn in into a standard platform driver

    Signed-off-by: Pawel Moll
    Acked-by: Mark Brown
    Acked-by: Lee Jones
    Acked-by: Guenter Roeck
    Acked-by: Mike Turquette

    Pawel Moll