16 Aug, 2012

1 commit

  • It seems commit 2098e95ce9bb039ff2e7bf836df358d18a176139 (regulator: twl:
    adapt twl-regulator driver to dt) accidentally deleted VINTANA1. Also
    the same commit defines VINTANA2 twice with TWL4030_ADJUSTABLE_LDO and
    TWL4030_FIXED_LDO. This patch changes the fixed one to be VINTANA1.

    I noticed this when auditing my N900 boot logs. I could not notice any
    change in device behaviour, though, except that the boot logs are now
    like before:

    ...
    [ 0.282928] VDAC: 1800 mV normal standby
    [ 0.284027] VCSI: 1800 mV normal standby
    [ 0.285400] VINTANA1: 1500 mV normal standby
    [ 0.286865] VINTANA2: 2750 mV normal standby
    [ 0.288208] VINTDIG: 1500 mV normal standby
    [ 0.289978] VSDI_CSI: 1800 mV normal standby
    ...

    Signed-off-by: Aaro Koskinen
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Aaro Koskinen
     

10 Aug, 2012

1 commit

  • Commit 65f735082de3 ("regulator: core: Add core support for GPIO controlled
    enable lines") introduced enable gpio entry in regulator configuration
    structure. Some drivers use '-1' as a placeholder for marking that such
    gpio line is not available, because '0' is considered as a valid gpio
    number. This patch fixes initialization of such drivers (like MAX8952
    on UniversalC210 board), when '-1' is provided as enable gpio pin in the
    regulator's platform data.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Mark Brown

    Marek Szyprowski
     

09 Aug, 2012

1 commit


08 Aug, 2012

8 commits

  • 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
     
  • The conversion to voltage tables in

    commit a3beb74261f26142019847128b2441b0301797ac
    "regulator: ab3100: Use regulator_list_voltage_table()"

    missed to add the voltage table to the buck. Fix this and
    it works like a charm.

    Signed-off-by: Linus Walleij
    Acked-by: Axel Lin
    Signed-off-by: Mark Brown

    Linus Walleij
     
  • The mask used in anatop_get_voltage_sel does not match the mask used in
    anatop_set_voltage_sel.
    We need to do left shift anatop_reg->vol_bit_shift bits for the correct mask.

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

    Axel Lin
     
  • As per datasheet, the vin pin for the regulator is named
    as vin_sm0, vin_sm1, vin_sm2 for sm0, sm1 and sm2 respectively.

    Correcting the names in driver and documentation to match with
    datasheet.

    Signed-off-by: Laxman Dewangan
    Reported-by: Stephen Warren
    Acked-by: Stephen Warren
    Signed-off-by: Mark Brown

    Laxman Dewangan
     
  • Fix below error handling cases:

    1. If reading PALMAS_SMPS_CTRL fails, simply returns ret rather than goto
    err_unregister_regulator because we have not call regulator_register().
    2. If palmas_ldo_init() fails, we need to call regulator_unregister() for the
    regulator we just successfully registered in this for loop iteration.

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

    Axel Lin
     
  • Current code uses wrong calls palmas_smps_[read|write] in palmas_ldo_init(),
    should be palmas_ldo_[read|write] instead.

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

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

    Axel Lin
     
  • This patch fixes below issues when choosing selector:

    1. Current code returns negative selector if min_uV < 900000 which is wrong.
    For example, it is possible to satisfy the request with selector = 1 if
    the requested min_uV is 850000.
    2. Current code may select a voltage lower than requested min_uV.
    For example, if the requested min_uV is 945000, current code chooses
    selector = 1 which is lower than requested min_uV.
    DIV_ROUND_UP to avoid this case.

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

    Axel Lin
     

31 Jul, 2012

2 commits

  • Due to a merge conflict we are getting this:

    drivers/regulator/s5m8767.c: In function ‘s5m8767_pmic_probe’:
    drivers/regulator/s5m8767.c:575:2: error: implicit declaration of function
    ‘s5m_reg_write’ [-Werror=implicit-function-declaration]

    This is fixed by fully converting this driver to the new s5m API.

    Cc: Mark Brown
    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • Pull MFD bits from Samuel Ortiz:
    "We have support for a few new drivers:
    - Samsung s2mps11
    - Wolfson Microelectronics wm5102 and wm5110
    - Marvell 88PM800 and 88PM805
    - TI twl6041

    We also have our regular driver improvements:
    - Device tree and IRQ domain support for STE AB8500
    - Regmap and devm_* API conversion for TI tps6586x
    - Device tree support for Samsung max77686
    - devm_* API conversion for STE AB3100

    Besides that, quite a lot of fixing and cleanup for mc13xxx, tps65910,
    tps65090, da9052 and twl-core."

    Fix up mostly trivial conflicts, with the exception of
    drivers/usb/host/ehci-omap.c in particular, which had some
    re-organization of the reset sequence (commit 1a49e2ac9651: "EHCI:
    centralize controller initialization") that clashed with commit
    2761a6394516 ("mfd: USB: Fix the omap-usb EHCI ULPI PHY reset fix
    issues").

    In particular, commit 2761a6394516 moved the usb_add_hcd() to the
    *middle* of the reset sequence, which clashes fairly badly with the
    reset sequence re-organization (although it could have been done inside
    the new omap_ehci_init() function).

    I left that part of commit 2761a6394516 just undone.

    * tag 'mfd-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (110 commits)
    mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core
    mfd: Arizone core should select MFD_CORE
    mfd: Fix arizona-irq.c build by selecting REGMAP_IRQ
    mfd: Add debug trace on entering and leaving arizone runtime suspend
    mfd: Correct tps65090 cell names
    mfd: Remove gpio support from tps6586x core driver
    ARM: tegra: defconfig: Enable tps6586x gpio
    gpio: tps6586x: Add gpio support through platform driver
    mfd: Cache tps6586x register through regmap
    mfd: Use regmap for tps6586x register access.
    mfd: Use devm managed resources for tps6586x
    input: Add onkey support for 88PM80X PMIC
    mfd: Add support for twl6041
    mfd: Fix twl6040 revision information
    mfd: Matches should be NULL when populate anatop child devices
    input: ab8500-ponkey: Create AB8500 domain IRQ mapping
    mfd: Add missing out of memory check for pcf50633
    Documentation: Describe the AB8500 Device Tree bindings
    mfd: Add tps65910 32-kHz-crystal-input init
    mfd: Drop modifying mc13xxx driver's id_table in probe
    ...

    Linus Torvalds
     

25 Jul, 2012

1 commit

  • Pull first round of SCSI updates from James Bottomley:
    "The most important feature of this patch set is the new async
    infrastructure that makes sure async_synchronize_full() synchronizes
    all domains and allows us to remove all the hacks (like having
    scsi_complete_async_scans() in the device base code) and means that
    the async infrastructure will "just work" in future.

    The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
    megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure
    work in sas and FC.

    Signed-off-by: James Bottomley "

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (97 commits)
    [SCSI] Revert "[SCSI] fix async probe regression"
    [SCSI] cleanup usages of scsi_complete_async_scans
    [SCSI] queue async scan work to an async_schedule domain
    [SCSI] async: make async_synchronize_full() flush all work regardless of domain
    [SCSI] async: introduce 'async_domain' type
    [SCSI] bfa: Fix to set correct return error codes and misc cleanup.
    [SCSI] aacraid: Series 7 Async. (performance) mode support
    [SCSI] aha152x: Allow use on 64bit systems
    [SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
    [SCSI] bfa: squelch lockdep complaint with a spin_lock_init
    [SCSI] qla2xxx: remove unnecessary reads of PCI_CAP_ID_EXP
    [SCSI] qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
    [SCSI] ufs: fix incorrect return value about SUCCESS and FAILED
    [SCSI] ufs: reverse the ufshcd_is_device_present logic
    [SCSI] ufs: use module_pci_driver
    [SCSI] usb-storage: update usb devices for write cache quirk in quirk list.
    [SCSI] usb-storage: add support for write cache quirk
    [SCSI] set to WCE if usb cache quirk is present.
    [SCSI] virtio-scsi: hotplug support for virtio-scsi
    [SCSI] virtio-scsi: split scatterlist per target
    ...

    Linus Torvalds
     

23 Jul, 2012

2 commits


20 Jul, 2012

3 commits

  • TI LP8788 PMU has 4 BUCKS and 22 LDOs.
    The voltage of BUCK1 and BUCK2 can be controlled by external gpios.
    And some LDOs also can be enabled by external gpios.
    The regmap interface is used for regulator operations.

    Signed-off-by: Milo(Woogyom) Kim
    Signed-off-by: Mark Brown

    Kim, Milo
     
  • This function does not exist, remove the extern function declaration.

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

    Axel Lin
     
  • This is in preparation for teaching async_synchronize_full() to sync all
    pending async work, and not just on the async_running domain. This
    conversion is functionally equivalent, just embedding the existing list
    in a new async_domain type.

    The .registered attribute is used in a later patch to distinguish
    between domains that want to be flushed by async_synchronize_full()
    versus those that only expect async_synchronize_{full|cookie}_domain to
    be used for flushing.

    [jejb: add async.h to scsi_priv.h for struct async_domain]
    Signed-off-by: Dan Williams
    Acked-by: Arjan van de Ven
    Acked-by: Mark Brown
    Tested-by: Eldad Zack
    Signed-off-by: James Bottomley

    Dan Williams
     

17 Jul, 2012

4 commits

  • Set the supply_name in the regulator descriptor unconditionally
    and make this parameter as required parameter in the device
    node for successfully registration of the regulator.

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

    Laxman Dewangan
     
  • The logic of calculating selector in palmas_map_voltage_smps() does not match
    the logic to list voltage in palmas_list_voltage_smps().

    We use below equation to calculate voltage when selector > 0:
    voltage = (0.49V + (selector * 0.01V)) * RANGE
    RANGE is either x1 or x2

    So we need to take into account with the multiplier set in VSEL register when
    calculating selector in palmas_map_voltage_smps()

    Signed-off-by: Axel Lin
    Acked-by: Graeme Gregory
    Signed-off-by: Mark Brown

    Axel Lin
     
  • Pass regulator id rahter than the index to lp872x_find_regulator_init_data(),
    then the code can be simpler.
    We can also get max_regulators by lp->num_regulators.

    Signed-off-by: Axel Lin
    Acked-by: Milo(Woogyom) Kim
    Tested-by: Milo(Woogyom) Kim
    Signed-off-by: Mark Brown

    Axel Lin
     
  • According to the datasheet, the voltage for twl6030ldo_ops is not linear for
    all cases. Linear mapping is only for the selection code from
    00000001 to 00011000.

    Table 9. LDO Output Voltage Selection Code
    CODE VOUT(V) COD VOUT(V) CODE VOUT(V) CODE VOUT(V)
    00000000 0 00001000 1.7 00010000 2.5 00011000 3.3
    00000001 1.0 00001001 1.8 00010001 2.6 00011001 Reserved
    00000010 1.1 00001010 1.9 00010010 2.7 00011010 Reserved
    00000011 1.2 00001011 2.0 00010011 2.8 00011011 Reserved
    00000100 1.3 00001100 2.1 00010100 2.9 00011100 Reserved
    00000101 1.4 00001101 2.2 00010101 3.0 00011101 Reserved
    00000110 1.5 00001110 2.3 00010110 3.1 00011110 Reserved
    00000111 1.6 00001111 2.4 00010111 3.2 00011111 2.75

    This patch implements the list_voltage callback based on above table.

    Signed-off-by: Axel Lin
    Tested-by: Rajendra Nayak
    Signed-off-by: Mark Brown

    Axel Lin
     

16 Jul, 2012

9 commits

  • As Prefix of Samsung pmic changed from s5m to s2m,
    To make common mfd driver for s2m and s5m series,
    This patch rename header of Samsung mfd and modify mfd driver.

    Signed-off-by: Sangbeom Kim
    Signed-off-by: Samuel Ortiz

    Sangbeom Kim
     
  • Previous naming rule of samsung pmic start with s5m prefix.
    But It is changed by s2m.
    To cover various samsung s2m and s5m series,
    This patch modify function and variable name for common usage.

    Signed-off-by: Sangbeom Kim
    Signed-off-by: Samuel Ortiz

    Sangbeom Kim
     
  • Previously, Samsung PMIC naming rule start with prefix of s5m.
    But Naming rule is changed.
    From now on, Prefix will be changed to s2m.
    So, To support pmic series of s5m and s2m, change mfd file and directory name.

    Signed-off-by: Sangbeom Kim
    Signed-off-by: Samuel Ortiz

    Sangbeom Kim
     
  • Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     
  • In twl6030ldo_set_voltage, current code use below formula to calculate vsel:
    vsel = (min_uV/1000 - 1000)/100 + 1;
    This is worng because when min_uV is 1000000 uV, vsel is 1.
    It should be 0 in this case.
    Fix it by change the equation to: (This equation is common for linear mapping)
    vsel = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step);

    In twl6030ldo_get_voltage, current code use below formula to calculate voltage:
    mV = 1000mv + 100mv * (vsel - 1)
    This is worng because when vsel is 0, mV is 900mV. Note the min_uV is 1000mV.
    Fix it by change the equation to: (This equation is common for linear mapping)
    return rdev->desc->min_uV + vsel * rdev->desc->uV_step;

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

    Axel Lin
     
  • Convert to devm_gpio_request to save a few error handling code.

    This patch properly handle the gpio_request failure, we should return error
    when gpio_request fails rather than just show warning.

    I think one of the reason we got -EBUSY is because current code does not free
    gpios in s5m8767_pmic_remove(). So it got -EBUSY when reload the module.

    Yest another reason is in current code if gpio_request() returns error,
    the rest of the code still calls gpio_direction_output to config buck_gpios
    and buck_ds gpios. This looks wrong to me.

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

    Axel Lin
     
  • Convert to devm_gpio_request to save a few error handling code.

    This patch properly handle the gpio_request failure with -EBUSY, we should
    return error rather than ommit the gpio_request failure with -EBUSY.

    I think one of the reason we got -EBUSY is because current code does not free
    gpios in max8997_pmic_remove(). So it got -EBUSY when reload the module.

    Yest another reason is in current code if gpio_request() returns -EBUSY,
    the rest of the code still calls gpio_direction_output to config buck125_gpios
    and set gpio value in max8997_set_gpio(). This looks wrong to me.

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

    Axel Lin
     
  • Use devm_ version of gpio APIs gpio_request_one() for
    requesting gpios.
    This avoid extra code for freeing gpios.

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

    Laxman Dewangan
     
  • Linux 3.5-rc7

    Mark Brown
     

13 Jul, 2012

8 commits