summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
Commit message (Collapse)AuthorAgeFilesLines
* regulator: twl-regulator: fix up VINTANA1/VINTANA2Aaro Koskinen2012-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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 <aaro.koskinen@iki.fi> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* regulator: core: request only valid gpio pins for regulator enableMarek Szyprowski2012-08-091-1/+1
| | | | | | | | | | | | | 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 <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: twl: Remove references to the twl4030 regulatorMark Brown2012-08-091-1/+0
| | | | | | It's not referenced anywhere any more and the compiler notices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: gpio-regulator: Split setting of voltages and currentsHeiko Stübner2012-08-081-12/+26
| | | | | | | | | | | | | | | | | | | 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 <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab3100: add missing voltage tableLinus Walleij2012-08-071-0/+1
| | | | | | | | | | | | | | 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 <linus.walleij@linaro.org> Acked-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: anatop: Fix wrong mask used in anatop_get_voltage_selAxel Lin2012-08-071-2/+3
| | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps6586x: correct vin pin for sm0/sm1/sm2Laxman Dewangan2012-08-071-3/+5
| | | | | | | | | | | | | 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 <ldewangan@nvidia.com> Reported-by: Stephen Warren <swarren@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: palmas: Fix palmas_probe error handlingAxel Lin2012-08-071-2/+4
| | | | | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: palmas: Call palmas_ldo_[read|write] in palmas_ldo_initAxel Lin2012-08-071-2/+2
| | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_regAxel Lin2012-08-071-1/+3
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: palmas: Fix calculating selector in palmas_map_voltage_ldoAxel Lin2012-08-071-3/+6
| | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix an s5m8767 build failureSamuel Ortiz2012-07-311-3/+3
| | | | | | | | | | | | | 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 <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge tag 'mfd-3.6-1' of ↵Linus Torvalds2012-07-304-49/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 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 ...
| * mfd: Modify samsung mfd headerSangbeom Kim2012-07-161-2/+2
| | | | | | | | | | | | | | | | | | 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 <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Modify samsung mfd driver for common apiSangbeom Kim2012-07-161-39/+39
| | | | | | | | | | | | | | | | | | | | 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 <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Rename s5m file and directories to samsungSangbeom Kim2012-07-162-3/+3
| | | | | | | | | | | | | | | | | | | | 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 <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Register ab8500 devices using the newly DT:ed MFD APILee Jones2012-07-091-6/+0
| | | | | | | | | | | | | | | | | | | | Now the MFD API is Device Tree aware we can use it for platform registration again, even when booting with DT enabled. To aid in Device Node pointer allocation we provide each cell with the associative compatible string. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Register db8500-prcmu devices using the newly DT:ed MFD APILee Jones2012-07-091-6/+0
| | | | | | | | | | | | | | | | | | | | Now the MFD API is Device Tree aware we can use it for platform registration again, even when booting with DT enabled. To aid in Device Node pointer allocation we provide each cell with the associative compatible string. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds2012-07-241-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <JBottomley@Parallels.com>" * 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 ...
| * | [SCSI] async: introduce 'async_domain' typeDan Williams2012-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* | | Merge branch 'regulator-drivers' into regulator-nextMark Brown2012-07-2250-2505/+4930
|\ \ \
| * | | regulator: add new lp8788 regulator driverKim, Milo2012-07-204-0/+1479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: mc13xxx: Remove extern function declaration for mc13xxx_sw_regulatorAxel Lin2012-07-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function does not exist, remove the extern function declaration. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: tps65910: set input_supply on desc unconditionallyLaxman Dewangan2012-07-171-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: palmas: Fix calcuating selector in palmas_map_voltage_smpsAxel Lin2012-07-171-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()Axel Lin2012-07-161-21/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: twl: Fix list_voltate for twl6030ldo_opsAxel Lin2012-07-161-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: twl: Convert twl6030ldo_ops to [get|set]_voltage_selAxel Lin2012-07-151-17/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldoAxel Lin2012-07-151-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: s5m8767: Properly handle gpio_request failureAxel Lin2012-07-151-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: max8997: Properly handle gpio_request failureAxel Lin2012-07-151-31/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | regulator: tps62360: use devm_* for gpio requestLaxman Dewangan2012-07-151-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_ version of gpio APIs gpio_request_one() for requesting gpios. This avoid extra code for freeing gpios. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | | Merge tag 'v3.5-rc7' into regulator-driversMark Brown2012-07-151-5/+5
| |\ \ \ | | |/ / | | | | | | | | Linux 3.5-rc7
| | * | regulator: Fix recursive mutex lockdep warningStephen Boyd2012-07-031-5/+5
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recursive lockdep warning occurs if you call regulator_set_optimum_mode() on a regulator with a supply because there is no nesting annotation for the rdev->mutex. To avoid this warning, get the supply's load before locking the regulator's mutex to avoid grabbing the same class of lock twice. ============================================= [ INFO: possible recursive locking detected ] 3.4.0 #3257 Tainted: G W --------------------------------------------- swapper/0/1 is trying to acquire lock: (&rdev->mutex){+.+.+.}, at: [<c036e9e0>] regulator_get_voltage+0x18/0x38 but task is already holding lock: (&rdev->mutex){+.+.+.}, at: [<c036ef38>] regulator_set_optimum_mode+0x24/0x224 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rdev->mutex); lock(&rdev->mutex); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by swapper/0/1: #0: (&__lockdep_no_validate__){......}, at: [<c03dbb48>] __driver_attach+0x40/0x8c #1: (&__lockdep_no_validate__){......}, at: [<c03dbb58>] __driver_attach+0x50/0x8c #2: (&rdev->mutex){+.+.+.}, at: [<c036ef38>] regulator_set_optimum_mode+0x24/0x224 stack backtrace: [<c001521c>] (unwind_backtrace+0x0/0x12c) from [<c00cc4d4>] (validate_chain+0x760/0x1080) [<c00cc4d4>] (validate_chain+0x760/0x1080) from [<c00cd744>] (__lock_acquire+0x950/0xa10) [<c00cd744>] (__lock_acquire+0x950/0xa10) from [<c00cd990>] (lock_acquire+0x18c/0x1e8) [<c00cd990>] (lock_acquire+0x18c/0x1e8) from [<c080c248>] (mutex_lock_nested+0x68/0x3c4) [<c080c248>] (mutex_lock_nested+0x68/0x3c4) from [<c036e9e0>] (regulator_get_voltage+0x18/0x38) [<c036e9e0>] (regulator_get_voltage+0x18/0x38) from [<c036efb8>] (regulator_set_optimum_mode+0xa4/0x224) ... Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: tps6586x: add support for input supplyLaxman Dewangan2012-07-131-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is multiple voltage input pins on device which takes the voltage input for different voltage regulator. Support to configure the voltage input supplied by different regulator for each regulators. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: tps65217: Add device tree supportAnilKumar Ch2012-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds device tree support for tps65217 pmic. And usage details are added to device tree documentation. Driver is tested by using kernel module with regulator set and get APIs. Signed-off-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: aat2870: Remove unused min_uV and max_uV from struct ↵Axel Lin2012-07-121-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | aat2870_regulator Both min_uV and max_uV are not used in the code, remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: aat2870: Convert to regulator_list_voltage_tableAxel Lin2012-07-121-13/+3
| | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: da9052: initialize of_node param for regulator registerAxel Lin2012-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Initialize config.of_node for regulator before registering. This is needed for DT based regulator support. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask ↵Axel Lin2012-07-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | is 0xff Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: s2mps11: Fix wrong setting for config.devAxel Lin2012-07-121-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL. This patch fixes the settings for config.dev. Current code does not need the *dev and *iodev of struct s2mps11_info, so remove them. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: s2mps11: Fixup missing commasAxel Lin2012-07-121-7/+7
| | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: tps65910: Remvoe ↵Axel Lin2012-07-121-111/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tps65910_reg_[read|modify_bits|read_locked|write_locked] functions The tps65910 mfd driver has been converted to regmap APIs. This patch adds tps65910_reg_update_bits() in include/linux/mfd/tps65910.h. Thus we can use tps65910_reg_read/tps65910_reg_write/tps65910_reg_update_bits directly and remove tps65910_reg_[read|modify_bits|read_locked|write_locked] functions. With this change, we can also remove the mutex in struct tps65910_reg. Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: s2mps11: Add samsung s2mps11 regulator driverSangbeom Kim2012-07-113-0/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add Samsung S2MPS11 regulator driver. The S2MPS11 can support 10 Bucks and 38 LDOs and RTC. Especially, S2MPS11 is designed for high performance Samsung application processor. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: tps65910: correct init value of n_voltagesLaxman Dewangan2012-07-101-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent change in the core driver to get the maximum voltage is based on the (n_voltages -1) steps of voltage. For the tps65910, the (n_voltages -1)th step voltage is calculated based on the callback function list_voltage. This function direct maps the datasheet and adjust the first few steps for initial voltage as per datasheet, and hence initialize the n_voltages based on datasheet. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: max8952: Use core GPIO enable supportAxel Lin2012-07-101-55/+4
| | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: max8998: Remove wrong set_suspend_[en|dis]able callback settingsAxel Lin2012-07-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using the same ops for both [en|dis]able and set_suspend_[en|dis]able callbacks is actively broken. This patch removes .set_suspend_disable and .set_suspend_enable callback setting. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: max8952: Remove wrong set_suspend_disable callback settingAxel Lin2012-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Using the same ops for both .disable and .set_suspend_disable callbacks is actively broken. This patch removes .set_suspend_disable callback setting. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: da9052: Use for_each_child_of_node() macroAxel Lin2012-07-091-2/+1
| | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | regulator: max77686: Initialise rmatch.of_node to NULL.Yadwinder Singh Brar2012-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Now of_regulator_match() returns without finding the match if match->of_node is not NULL. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud