29 Jan, 2013

2 commits


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Liam Girdwood
    Cc: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Dec, 2012

4 commits


06 Dec, 2012

1 commit


20 Nov, 2012

3 commits


14 Nov, 2012

1 commit


13 Nov, 2012

1 commit

  • Need initilize of_node in regulator config when register regulator,
    otherwise regulator driver think it is no-dt device.

    in regulator_dev_lookup
    list_for_each_entry(r, ®ulator_list, list)
    if (r->dev.parent &&
    node == r->dev.of_node)
    return r

    r->dev.of_noe will be zero if miss config in cfg.

    Signed-off-by: Frank Li
    Signed-off-by: Mark Brown

    Frank Li
     

17 Oct, 2012

1 commit


08 Aug, 2012

1 commit

  • Originally gpio-regulator used the first item of its state list
    that matched the given voltage or current range.

    Commit 4dbd8f63f0 (regulator: gpio-regulator: Set the smallest voltage/current
    in the specified range) changed this, to make the selection independent of
    the ordering of the state list.

    But selecting the minimal value is only true for voltage regulators.
    For current regulators the maximum in the given range should be
    selected instead.

    Therefore split the previous common selection function into specific
    functions for voltage and current regulators.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Mark Brown

    Heiko Stübner
     

04 Jul, 2012

2 commits


04 Jun, 2012

3 commits


23 Apr, 2012

1 commit

  • All the drivers that need delay for the regulator voltage output voltage to
    stabilize after being enabled or after being set to a new value has been
    converted to implement enable_time and set_voltage_time_sel callbacks.
    Then regulator core will take care of the necessary delay.

    For the drivers that don't need the delay, don't need to include linux/delay.h.
    This patch removes the unneeded include of linux/delay.h in regulator drivers.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     

09 Apr, 2012

1 commit

  • Rather than adding new arguments to regulator_register() every time we
    want to add a new bit of dynamic information at runtime change the function
    to take these via a struct. By doing this we avoid needing to do further
    changes like the recent addition of device tree support which required each
    regulator driver to be updated to take an additional parameter.

    The regulator_desc which should (mostly) be static data is still passed
    separately as most drivers are able to configure this statically at build
    time.

    Signed-off-by: Mark Brown

    Mark Brown
     

04 Apr, 2012

1 commit


01 Apr, 2012

1 commit


24 Nov, 2011

1 commit

  • The commit 2c043bcbf287 ("regulator: pass additional of_node to
    regulator_register()") caused a compile break because it missed
    updating the regulator_register() call in gpio-regulator.c with
    the additional parameter (NULL).

    The compile break as reported by Stephen Rothwell with the
    x86_64 allmodconfig looked like this

    drivers/regulator/gpio-regulator.c: In function 'gpio_regulator_probe':
    drivers/regulator/gpio-regulator.c:287:8: error: too few arguments to function 'regulator_register'
    include/linux/regulator/driver.h:215:23: note: declared here

    Reported-by: Stephen Rothwell
    Signed-off-by: Rajendra Nayak
    Signed-off-by: Mark Brown

    Rajendra Nayak
     

11 Oct, 2011

1 commit


09 Oct, 2011

1 commit

  • This patch adds support for regulators that can be controlled via gpios.

    Examples for such regulators are the TI-tps65024x voltage regulators
    with 4 fixed and 1 runtime-switchable voltage regulators
    or the TI-bq240XX charger regulators.

    The number of controlling gpios is not limited, the mapping between
    voltage/current and target gpio state is done via the states map
    and the driver can be used for either voltage or current regulators.

    A mapping for a regulator with two GPIOs could look like:

    gpios = {
    { .gpio = GPIO1, .flags = GPIOF_OUT_INIT_HIGH, .label = "gpio name 1" },
    { .gpio = GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "gpio name 2" },
    }

    The flags element of the gpios array determines the initial state of
    the gpio, set during probe. The initial state of the regulator is also
    calculated from these values

    states = {
    { .value = volt_or_cur1, .gpios = (0 << 1) | (0 << 0) },
    { .value = volt_or_cur2, .gpios = (0 << 1) | (1 << 0) },
    { .value = volt_or_cur3, .gpios = (1 << 1) | (0 << 0) },
    { .value = volt_or_cur4, .gpios = (1 << 1) | (1 << 0) },
    }

    The target-state for the n-th gpio is determined by the n-th bit
    in the bitfield of the target-value.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Mark Brown

    Heiko Stübner