24 Oct, 2013

1 commit


11 Oct, 2013

2 commits


17 Sep, 2013

1 commit


30 Aug, 2013

1 commit

  • Below is the equation in original code:

    tps65217_uv1_ranges:
    0 ... 24: uV = vsel * 25000 + 900000;
    25 ... 52: uV = (vsel - 24) * 50000 + 1500000;
    = (vsel - 25) * 50000 + 1550000;
    53 ... 55: uV = (vsel - 52) * 100000 + 2900000;
    = (vsel - 53) * 100000 + 3000000;
    56 ... 62: uV = 3300000;

    tps65217_uv2_ranges:
    0 ... 8: uV = vsel * 50000 + 1500000;
    9 ... 13: uV = (vsel - 8) * 100000 + 1900000;
    = (vsel - 9) * 100000 + 2000000;
    14 ... 31: uV = (vsel - 13) * 50000 + 2400000;
    = (vsel - 14) * 50000 + 2450000;

    The voltage tables are composed of linear ranges.
    This patch converts this driver to use multiple linear ranges APIs.

    In original code, voltage range for DCDC1 is 900000 ~ 1800000 and voltage range
    for DCDC3 is 900000 ~ 1500000. This patch separates the range 25~52 in
    tps65217_uv1_ranges table to two linear ranges: 25~30 and 31~52.
    This change makes it possible to reuse the same linear_ranges table for DCDCx.

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

    Axel Lin
     

12 May, 2013

1 commit


24 Jan, 2013

1 commit

  • The dev parameter is the device requestiong the data.
    In this case it should be &pdev->dev rather than pdev->dev.parent.

    The dev parameter is used to call devm_kzalloc in of_get_regulator_init_data(),
    which means this fixes a memory leak because the memory is allocated every time
    probe() is called, thus it should be freed when this driver is unloaded.

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

    Axel Lin
     

20 Nov, 2012

3 commits


22 Aug, 2012

1 commit

  • Regulator platform data handling was mistakenly added to MFD
    driver. So we will see build errors if we compile MFD drivers
    without CONFIG_REGULATOR. This patch moves regulator platform
    data handling from TPS65217 MFD driver to regulator driver.

    This makes MFD driver independent of REGULATOR framework so
    build error is fixed if CONFIG_REGULATOR is not set.

    drivers/built-in.o: In function `tps65217_probe':
    tps65217.c:(.devinit.text+0x13e37): undefined reference
    to `of_regulator_match'

    This patch also fix allocation size of tps65217 platform data.
    Current implementation allocates a struct tps65217_board for each
    regulator specified in the device tree. But the structure itself
    provides array of regulators so one instance of it is sufficient.

    Signed-off-by: AnilKumar Ch

    AnilKumar Ch
     

13 Jul, 2012

1 commit


04 Jul, 2012

1 commit

  • It is ok to request voltage with min_uV < tps->info[rid]->min_uV and
    max_uV > tps->info[rid]->max_uV.

    The equation we used in uv_to_vsel() does not allow
    min_uV < tps->info[rid]->min_uV, otherwise it returns negative selector.
    So we need to set min_uV = tps->info[rid]->min_uV if
    min_uV < tps->info[rid]->min_uV.

    Signed-off-by: Axel Lin
    Acked-by: AnilKumar Ch
    Signed-off-by: Mark Brown

    Axel Lin
     

03 Jul, 2012

1 commit


02 Jul, 2012

1 commit


14 Jun, 2012

1 commit

  • This patch converts .is_enabled and .get_voltage_sel to
    regulator_is_enabled_regmap and regulator_get_voltage_sel_regmap.

    For .enable, .disable, and .set_voltage_sel, the write protect level is either
    1 or 2. So we cannot use regulator_[enable|disable|set_voltage_sel]_regmap.

    Now we store the enable reg/mask and vsel reg/mask in regulator_desc,
    so we can remove enable_mask, set_vout_reg, and set_vout_mask from
    struct tps_info.

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

    Axel Lin
     

18 May, 2012

1 commit


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
     

06 Apr, 2012

1 commit


12 Mar, 2012

2 commits


20 Jan, 2012

2 commits