07 May, 2016

4 commits


27 Apr, 2016

1 commit

  • When commit b554e1450658 ("regulator: tps65917/palmas: Add bypass
    ops for LDOs with bypass capability") introduced bypass capability
    to palmas regulator, it went with the assumption that regulator
    regmap helpers just check val against the bypass_mask.

    Unfortunately, this ignored the explicit "on" and "off" values when
    the register value is masked with bypass_mask in commit ca5d1b3524b4
    ("regulator: helpers: Modify helpers enabling multi-bit control").

    With the recent commit dd1a571daee7 ("regulator: helpers: Ensure
    bypass register field matches ON value"), this issue gets highlighted
    and fails tps65917/palmas based platforms which need regulators/ldos
    that have bypass capability.

    Introduce the bypass_on value appropriately for tps65917/palmas
    regulator.

    Fixes: b554e1450658 ("regulator: tps65917/palmas: Add bypass ops for LDOs with bypass capability")
    Cc: Keerthy
    Cc: Mark Brown
    Signed-off-by: Nishanth Menon
    Signed-off-by: Mark Brown

    Nishanth Menon
     

17 Dec, 2015

1 commit


17 Mar, 2015

4 commits


20 Oct, 2014

1 commit


10 Sep, 2014

1 commit

  • These of_node_get() were added to balance refcount decrements inside of
    of_find_node_by_name().
    See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()")

    However of_find_node_by_name() was then replaced by of_get_child_by_name(),
    which doesn't call of_node_put() against its input parameter.

    So, need to remove these unnecessary of_node_get() calls.

    Signed-off-by: Guodong Xu
    Reviewed-by: Axel Lin
    Signed-off-by: Mark Brown

    Guodong Xu
     

03 Jul, 2014

6 commits

  • We use regmap regulator ops to enable/disable and check if regulator
    is enabled for various SMPS. However, these depend on valid
    enable_reg, enable_mask and enable_value in regulator descriptor.

    So, similar to fix we did in commit 318dbb02b50c
    ("regulator: palmas: Fix SMPS enable/disable/is_enabled"), populate the
    same for TPS65917 SMPS registration. LDO definitions are already in
    place.

    Fixes: d6f83370ed97 ("regulator: palmas: Add tps65917 PMIC support")
    Signed-off-by: Nishanth Menon
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     
  • Palmas regulator needs to full up the regulator_desc based on PMIC and
    type of regulator. However, we dont need to do desc[id] every time. we
    can simplify by using a pointer to desc[id] and filling up the
    parameters.

    Signed-off-by: Nishanth Menon
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     
  • With commit d6f83370ed978d5570b7c8c22988310cb9376202 (regulator: palmas:
    Add tps65917 PMIC support) palmas_regs_info naming is confusing as it is
    a driver data parameter and a local variable. To prevent mistaken
    updates, rename the local variable to palmas_generic_regs_info.

    Signed-off-by: Nishanth Menon
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     
  • Palmas register information is part of the ddata pointer which is used
    through out the code by indexing off the driver data array. Instead,
    just do the indexing once and use the pointer to further reference
    structure fields.

    This simplifies code and prevents errors by accessing wrong variables.

    Signed-off-by: Nishanth Menon
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     
  • reg_info is a generic term which might cause conflict at a later point
    in time. To prevent such a thing from occuring in future, rename to
    palmas_reg_info.

    Signed-off-by: Nishanth Menon
    Acked-by: Lee Jones
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     
  • convert to static variables to squelch the following sparse warnings:
    drivers/regulator/palmas-regulator.c:325:36: warning: symbol 'palma_sleep_req_info' was not declared. Should it be static?
    drivers/regulator/palmas-regulator.c:1414:32: warning: symbol 'palmas_ddata' was not declared. Should it be static?
    drivers/regulator/palmas-regulator.c:1427:32: warning: symbol 'tps65917_ddata' was not declared. Should it be static?

    Signed-off-by: Nishanth Menon
    Tested-by: Stephen Warren
    Tested-by: Keerthy
    Signed-off-by: Mark Brown

    Nishanth Menon
     

24 Jun, 2014

2 commits


23 Jun, 2014

3 commits


21 Jun, 2014

1 commit

  • We use regmap regulator ops to enable/disable and check if regulator
    is enabled for various SMPS. However, these depend on valid
    enable_reg, enable_mask and enable_value in regulator descriptor.

    Currently we do not populate these for SMPS other than SMPS10, this
    results in spurious results as regmap assumes that the values are
    valid and ends up reading register 0x0 RTC:SECONDS_REG on Palmas
    variants that do have RTC! To fix this, we update proper parameters
    for the descriptor fields.

    Further, we want to ensure the behavior consistent with logic
    prior to commit dbabd624d4eec50b6, where, once you do a set_mode,
    enable/disable ensure the logic remains consistent and configures
    Palmas to the configuration that we set with set_mode (since the
    configuration register is common). To do this, we can rely on the
    regulator core's regulator_register behavior where the regulator
    descriptor pointer provided by the regulator driver is stored. (no
    reallocation and copy is done). This lets us update the enable_value
    post registration, to remain consistent with the mode we configure as
    part of set_mode.

    Fixes: dbabd624d4eec50b6 ("regulator: palmas: Reemove open coded functions with helper functions")
    Reported-by: Alexandre Courbot
    Signed-off-by: Nishanth Menon
    Tested-by: Alexandre Courbot
    Signed-off-by: Mark Brown

    Nishanth Menon
     

05 Jun, 2014

1 commit

  • get_voltage_sel reads from SMPS register - if the read selector value
    is 0, the SMPS is actually disabled - So, this is in addition to the
    ctrl_register that may also be used to enable/disable the SMPS.

    The original logic(prior to commit dbabd624d4eec50b6) used to be:
    static int palmas_map_voltage_smps(struct regulator_dev *rdev,
    int min_uV, int max_uV)

    if (min_uV == 0)
    return 0;

    To handle this scenario, with the transition to regulator_list
    implementation, we seem to have missed the data necessary to mark as
    one of the valid entries as "0" 'disabled regulator' which results in
    0 volts - So, stick with pre-existing logic.

    Without this added to the list, palmas regulator driver,
    on probe, attempts to setup constraints and in the case of
    OMAP5uEVM, SMPS9 (which is mapped for 2v1 audio supply) fails in
    regulator_list_voltage_linear_range mapping of '0', and as a fall back
    of constraints not being applied, the entire regulator list is not
    enumerated due to assumption that something system wide has gone bad
    on with the PMIC.

    Fixes: dbabd624d4eec50b6 ("regulator: palmas: Reemove open coded functions with helper functions")
    Reported-by: Olof Johansson
    Signed-off-by: Nishanth Menon
    Signed-off-by: Mark Brown

    Nishanth Menon
     

03 Jun, 2014

1 commit


22 May, 2014

1 commit


08 May, 2014

1 commit


24 Oct, 2013

2 commits


07 Oct, 2013

1 commit

  • The device tree binding of Palmas regulator driver says as:

    palmas_pmis {
    compatible = "ti,palmas-pmic";
    ...
    regulators {
    ...
    }
    };

    In this "regulators" subnode is expected to be part of parent node, not
    the outside of parent node. Hence to get the regulator node, the correct
    call is of_get_child_by_name() rather than of_find_node_by_name() which
    actually searches the "regulators" node from the parent node to end of DTS
    file.

    Signed-off-by: Laxman Dewangan
    Reviewed-by: Stephen Warren
    Signed-off-by: Mark Brown

    Laxman Dewangan
     

17 Sep, 2013

6 commits


10 Sep, 2013

1 commit


04 Sep, 2013

1 commit

  • With the following change
    ---------
    commit ad02e846878ca35e9d3fa584be8ee770e9e14fce
    Author: Axel Lin

    regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_sel

    Don't adjust the selector in [get|set]_voltage_sel, fix it in list_voltage() instead.

    For smps*(except smps10), the vsel reg-value and voltage mapping as below:
    ----------
    The list_voltage() takes the true value of selector which is
    programmed in the register. As per smsp voltage table
    reg-value volt (uV) ( Assume RANGE is x1 )
    0 0
    1 500000
    2 500000
    3 500000
    4 500000
    5 500000
    6 500000 (0.49V + 1 * 0.01V) * RANGE
    7 510000 (0.49V + 2 * 0.01V) * RANGE
    8 520000 (0.49V + 3 * 0.01V) * RANGE
    9 530000 (0.49V + 4 * 0.01V) * RANGE
    ....
    121 1650000 (0.49V + 116 * 0.1) * RANGE

    Hence making n_voltages for smps to 122.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Mark Brown

    Laxman Dewangan
     

01 Sep, 2013

1 commit