10 Sep, 2012

1 commit

  • Many regulators support a bypass mode where they simply switch their
    input supply to the output. This is mainly used in low power retention
    states where power consumption is extremely low so higher voltage or
    less clean supplies can be used.

    Support this by providing ops for the drivers and a consumer API which
    allows the device to be put into bypass mode if all consumers enable it
    and the machine enables permission for this.

    This is not supported as a mode since the existing modes are rarely used
    due to fuzzy definition and mostly redundant with modern hardware which is
    able to respond promptly to load changes.

    Signed-off-by: Mark Brown
    Reviewed-by: Graeme Gregory

    Mark Brown
     

18 Jun, 2012

2 commits

  • This change makes it possible to set ramp_delay with 0.xxx mV/uS without
    truncation issue.

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

    Axel Lin
     
  • For some hardwares ramp_delay for BUCKs is a configurable parameter which can
    be configured through DT or board file.This patch adds ramp_delay to regulator
    constraints and allow user to configure it for regulators which supports this
    feature, through DT or board file. It will provide two ways of setting the
    ramp_delay for a regulator:
    First, by setting it as constraints in board file(for configurable
    regulators) and set_machine_constraints() will take care of setting it on
    hardware by calling(the provided) .set_ramp_delay() operation(callback).
    Second, by setting it as data in regulator_desc(as fixed/default
    ramp_delay rate) for a regulator in driver.

    regulator_set_voltage_time_sel() will give preference to
    constraints->ramp_delay while reading ramp_delay rate for regulator. Similarly
    users should also take care accordingly while refering ramp_delay rate(in case
    of implementing their private .set_voltage_time_sel() callbacks for different
    regulators).

    [Rewrote subject for 80 columns -- broonie]

    Signed-off-by: Yadwinder Singh Brar
    Signed-off-by: Mark Brown

    Yadwinder Singh Brar
     

29 Mar, 2012

1 commit


02 Feb, 2012

1 commit


15 Oct, 2011

1 commit


27 May, 2011

2 commits

  • Some systems, particularly physically large systems used for early
    prototyping, may experience substantial voltage drops between the regulator
    and the consumers as a result of long traces in the system. With these
    systems voltages may need to be set higher than requested in order to
    ensure reliable system operation.

    Allow systems to work around such hardware issues by allowing constraints
    to supply an offset to be applied to any requested and reported voltages.
    This is not ideal, especially since the voltage drop may be load dependant,
    but is sufficient for most affected systems, it is not expected to be used
    in production hardware. The offset is applied after all constraint
    processing so constraints should be specified in terms of consumer values
    not physically configured values.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     
  • supply_regulator_dev (using a struct pointer) has been deprecated in favour
    of supply_regulator (using a regulator name) for quite a few releases
    now with a warning generated if it is used and there are no current in tree
    users so just remove the code.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     

26 Mar, 2011

1 commit

  • The regulator core had suspend-prepare that turns off the regulators
    when entering a system-wide suspend. However, it did not have
    suspend-finish that pairs with suspend-prepare and the regulator core
    has assumed that the regulator devices and their drivers support
    autonomous recover at resume.

    This patch adds regulator_suspend_finish that pairs with the
    previously-existed regulator_suspend_prepare. The function
    regulator_suspend_finish turns on the regulators that have always_on set
    or positive use_count so that we can reset the regulator states
    appropriately at resume.

    In regulator_suspend_finish, if has_full_constraints, it disables
    unnecessary regulators.

    Signed-off-by: MyungJoo Ham
    Signed-off-by: Kyungmin Park
    Acked-by: Mark Brown
    --
    Updates
    v3
    comments corrected (Thanks to Igor)
    v2
    disable unnecessary regulators (Thanks to Mark)
    Signed-off-by: Liam Girdwood

    MyungJoo Ham
     

29 Oct, 2010

1 commit

  • Allow machine drivers to explicitly enable the use of the dummy regulator,
    enabling simpler support for systems with only a few specific supplies
    visible to software.

    It is strongly recommended that this is not used on systems with
    substantial software control over their PMICs, for maximum functionality
    constrints should be as fully specified as possible.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     

25 May, 2010

1 commit

  • When one regulator supplies another allow the relationship to be specified
    using names rather than struct regulators, in a similar manner to that
    allowed for consumer supplies. This allows static configuration at compile
    time, reducing the need for dynamic init code.

    Also change the references to LINE supply to be system supply since line
    is sometimes used for actual supplies and therefore potentially confusing.

    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     

17 Dec, 2009

1 commit

  • Since some regulators in the system may not support suspend mode
    configuration we need to allow some regulators to have a missing
    suspend mode configuration. Do this by requiring that disabled
    regulators are explicitly flagged and then skip over regulators
    that have no state specified.

    Try to avoid surprises by warning the if we could set the state
    but no configuration is provided. This also ensures that an all
    zeros configuration generates a warning rather than silently
    disabling the regulator.

    Reported-by: Joonyoung Shim
    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Mark Brown
     

22 Sep, 2009

4 commits


31 Mar, 2009

4 commits


09 Jan, 2009

1 commit


14 Oct, 2008

1 commit

  • This improves the machine level API in order to configure
    regulator constraints and consumers as platform data and removes the
    old string based API that required several calls to set up each regulator.

    The intention is to create a struct regulator_init_data, populate
    it's fields with constraints, consumers devices, etc and then register
    the regulator device from board.c in the standard Linux way.

    e.g. regulator LDO2 (supplying codec and sim) platform data.

    /* regulator LDO2 consumer devices */
    static struct regulator_consumer_supply ldo2_consumers[] = {
    {
    .dev = &platform_audio_device.dev,
    .supply = "codec_avdd",
    },
    {
    .dev = &platform_sim_device.dev,
    .supply = "sim_vcc",
    }
    };

    /* regulator LDO2 constraints */
    static struct regulator_init_data ldo2_data = {
    .constraints = {
    .min_uV = 3300000,
    .max_uV = 3300000,
    .valid_modes_mask = REGULATOR_MODE_NORMAL,
    .apply_uV = 1,
    },
    .num_consumer_supplies = ARRAY_SIZE(ldo2_consumers),
    .consumer_supplies = ldo2_consumers,
    };

    /* machine regulator devices with thier consumers and constraints */
    static struct platform_device wm8350_regulator_devices[] = {
    {
    .name = "wm8350-regulator",
    .id = WM8350_LDO_2,
    .dev = {
    .platform_data = &ldo2_data,
    },
    },
    };

    Changes in detail:-

    o Removed all const char* regulator config functions in machine API.
    o Created new struct regulator_init_data to contain regulator
    machine configuration constraints and consmuers.
    o Changed set_supply(), set_machine_constraints(),
    set_consumer_device_supply() to remove their string identifier
    parameters. Also made them static and moved functions nearer top of
    core.c.
    o Removed no longer used inline func to_rdev()
    o Added regulator_get_init_drvdata() to retrieve init data.
    o Added struct device* as parameter to regulator_register().
    o Changed my email address.

    Signed-off-by: Eric Miao
    Signed-off-by: Mark Brown
    Signed-off-by: Liam Girdwood

    Liam Girdwood
     

30 Jul, 2008

1 commit

  • This interface is for machine specific code and allows the creation of
    voltage/current domains (with constraints) for each regulator. It can
    provide regulator constraints that will prevent device damage through
    overvoltage or over current caused by buggy client drivers. It also
    allows the creation of a regulator tree whereby some regulators are
    supplied by others (similar to a clock tree).

    Signed-off-by: Liam Girdwood
    Signed-off-by: Philipp Zabel
    Signed-off-by: Mark Brown

    Liam Girdwood