summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2012-06-04mfd: Commonize tps65910 regmap access through headerRhyland Klein
This change removes the read/write callback functions in favor of common regmap accessors inside the header file. This change also makes use of regmap_read/write for single register access which maps better onto what this driver actually needs. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> (Cherry-pick from mainline 3f7e82759c692df473675ed06fb90b20f1f225c3) Change-Id: Ida79b196acf65ed14ff9fd2cc1f7c0048f99ba2b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105922 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rhyland Klein <rklein@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-04regulator: tps62360: support force PWM mode via regulator modeLaxman Dewangan
Change the mechanism of enabling the force PWM mode through regulator set mode. This can be dynamically configured now. In the REGULATOR_MODE_FAST the force PWM is enabled and in REGULATOR_MODE_NORMAL the force PWM is disabled. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry-picked from mainline commit 9a00630 Change-Id: I39a77dbe5d0c4c2a5b81dbfe51163a65894bc98c Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105832 Reviewed-by: Automatic_Commit_Validation_User
2012-06-03regulator: rc5t583: Correct MODULE LICENSE to GPL v2Laxman Dewangan
Fixing build issue reported by Paul Gortmaker: It appears this breaks linux-next allmodconfig build, because it uses an uppercase V in the v2 of its MODULE_LICENSE. FATAL: modpost: GPL-incompatible module rc5t583-regulator.ko uses GPL-only symbol 'platform_driver_unregister' make[2]: *** [__modpost] Error 1 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 4eb06453648bb0d1eca3669f26798a19b6f40eb8) Change-Id: I8c715cf5a8e72555721a954d6db6879aed2eb423 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105884 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-06-03regulator: rc5t583: Remove nsteps from struct rc5t583_regulator_infoAxel Lin
The nsteps can be calculated by (_max_mv - _min_mv) * 1000 / _step_uV + 1, thus we can remove _nsteps from RC5T583_REG macro, and then remove nsteps from struct rc5t583_regulator_info. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit e3a7384c3e98c48b5f122e449e22cc8a1a6c7e0d) Change-Id: If6db39255b2f7f8be38b848f2ca2619301b19b38 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105883 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-06-03regulator: rc5t583: Fix off-by-one valid range checking for selectorAxel Lin
The valid selector should be 0 ... nsteps-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 9cc7a453b637d8c1f628f9873204ff55d7aa664c) Change-Id: Ie1a39883036de3b2945d35854e0a16c46d2a9db2 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105882 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-06-03regulator: Fix rc5t583_regulator_probe error handlingAxel Lin
1. regulator_register returns ERR_PTR on error, thus use IS_ERR to check the return value. 2. Fix off-by-one for unregistering the registered regulator. Current code does not unregister regs[0].rdev in clean_exit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit a69df8a14ae7b891ee22f0e4c081f3ff65c0640f) Change-Id: Ib5e00e655020e313c73e5b838e62dbdea54c28d0 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105881 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-06-03regulator: Add support for RICOH PMIC RC5T583 regulatorLaxman Dewangan
The RC5T583 PMIC from RICOH consists of 4 DCDC and 10 LDOs. This driver supports the control of different regulator output through regulator interface. This driver depends on MFD driver of RC5T583 and uses mfd rc5t583 apis to communicate to device for accessing different device's registers. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Cherry-picked from mainline commit 6ffc3270210efa2bea526953a142ffc908f5bd86) Change-Id: If6bcc9c987fc97ff6f0c61e53de715cd84d0151b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105877 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-06-01regulator: tps62360: fix stylistic issue and optimize codeLaxman Dewangan
Fix multiple stylistic issue like: - The print message should be not break into multiple line. - line gap after variable declaration and statement. - checkpatch error. - some typo. Some enhancement on error message printing to print error value also along with proper text. Avoid voltage_base conversion to microvolts every time. Put init functions in init section. Using efficient function inplace of calling multiple function to reduce the code size. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 2935fb18aa1e75e6afaab3303cdd1a4ac62be63e) Change-Id: I988938f8f8cc6fb5355e32bd6ac25d95db94913c Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105831 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: tps62360: Provide settling time for voltage changeLaxman Dewangan
Settling time is require when there is voltage output change. Implement set_voltage_time_sel() callback which returns delay time for voltage change to settle down to new value. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit a60cfce051dd5e22329df1018d278bf3e52d82bc) Change-Id: I522df8a72595622fd99cc46043c34610434d932f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105830 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: tps62360: enable register cacheLaxman Dewangan
Enable cache of device register using regmap cache RBTREE. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 16ea003bd1c95ea55a0b88187ce7cbeaca760fcf) Change-Id: If747dd18a488d500f8295f903c8da92c241c293e Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105829 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: tps62360: Convert to devm_regmap_init_i2c()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 9a4bdd87a29bf297d9046410b011d726d51c3999) Change-Id: Ic7cca64e14b2b2e812140c8d368279b615da074f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105828 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: Add support for tps62362 and tps62363 in tps62360-regulator driverAxel Lin
According to the datasheet[1], tps62360 is register compatible with tps62362. tps62361B is register compatible with tps62363. Thus this patch adds support for tps62362 and tps62363. [1] http://www.ti.com/litv/pdf/slvsau9b Change-Id: I62cdede0755d7decedeb7b1ef08e216a0dad3a12 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Cherry-picked from mainline commit d1cf4f6) Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Ib9c4a63f06182c0ed2c1f27d9bf63342aa8474bc Reviewed-on: http://git-master/r/105827 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: Remove unused name and client fields from struct tps62360_chipAxel Lin
The client field of struct tps62360_chip is not used after converting to regmap. The name field of struct tps62360_chip is not used in this driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from mainline commit c60f1718f508a40964c149f1139b4eaaae825fd3) Change-Id: If7b0606b60bd887bc20ecbdaf5cafa6ccba8ff77 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105826 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-06-01regulator: tps62360: Remove pointless test for unsigned less than zeroAxel Lin
The variable 'selector' is a 'unsigned int', so it can never be less than zero. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 46783a046e13588f0459271ad6db9785fa8dcb8b) Change-Id: I920b1628016b7d1c0b626497f24210c5c1f549ab Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/105825 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-05-18regulator: tps6238x0: enable output discharge alwaysLaxman Dewangan
Enable output discharge always to have faster ramp-down time. bug 981330 Change-Id: I0a00ab38e9be631a58bc8b11148be5c3c508d119 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102882 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-17regulator: max8973: implement regulator driver for maxim8973Laxman Dewangan
This driver supports ivoltage regulator driver for MAX8973 voltage regulator chip. The MAX8973 high-efficiency, three-phase, DC-DC step-down switching regulator delivers up to 9A of output current. bug 981355 Change-Id: I6e4ff62139face4e47e2be269554a64c2654e74b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102148 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-15regulator: TPS6238X0: Add tps6238X0 regulator driverLaxman Dewangan
The regulator module consists of 1 DCDC. The output voltage is configurable and is meant for supply power to the core voltage of Soc. Change-Id: Ic62d100a588f7b6f1b30c11fd44a925c97393069 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/100653 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-07regulator: max77663: fix fps update conditionJinyoung Park
Fix fps update condition in max77663_regulator_set_fps(). Bug 930883 Change-Id: I2f57603320a91b2727932586fc3c66d9de347d64 signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/92707 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-01regulator: add sysfs for rail enable/disableLaxman Dewangan
Added support for enable/disable rails from user space. bug 966960 Change-Id: Iae660699c60f537296f90508a78bd40959c46535 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/99186 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hunk Lin <hulin@nvidia.com> Tested-by: Hunk Lin <hulin@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-05-01mfd: max77663: Add FPWM and FSRADE clearing when initializationJinyoung Park
If sd power rail is not configured to FORCED_PWM_MODE or FSRADE_DISABLE, clear corresponding bits(FPWM and FSRADE) when initialization. Change-Id: I4e08329a430c6ccf7179b77cc7a283460ffaedd1 Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/98715 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-10regulator: max8907: Add driver specific data for regulatorAlok Chauhan
Adding the regulator driver specific information and passing this information through regulator driver data. This struture is containing delay operation which is require to voltage to be settle down after enabling rail. Bug 939242 Change-Id: I7da6ec487fe5f04857d3fd5f06a383b4a8fbcc7b Signed-off-by: Alok Chauhan <alokc@nvidia.com> Reviewed-on: http://git-master/r/94500 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-04-05Regulator: gpio_swtich: Remove gpio_switch regulator driverLaxman Dewangan
The gpio_switch regulator is NV driver developed during tegra3 bringup time. The driver functionality is upstreamed to mainline into fixed regulator and it is accepted by community. The required functionality is also downstream and required client driver is moved to use the fixed regulator. Hence this driver is just duplicating functionality with fixed regulator and hence removing this. Change-Id: I893328497644612a2267f2c24298ff2f668e75d4 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/94198 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-04-03regulator: fixed: Support for open drain gpio pinLaxman Dewangan
Adding flag on fixed regulator board configuration structure to specify whether gpio is open drain type or not. Passing this information to gpio library when requesting gpio so that gpio driver can set the pin state accordingly, for open drain type: - Pin can be set HIGH as setting as input, PULL UP on pin make this as HIGH. - Pin can be set LOW as setting it as output and drive to LOW. The non-open drain pin can be set HIGH/LOW by setting it to output and driving it to HIGH/LOW. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline commit a4d9f179cc788b7f4b735d32c2e4a3b2562e8240 Change-Id: I2ee7789db67fdeea77c0d6ac2b44876af36c803e Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/94150 Reviewed-by: Automatic_Commit_Validation_User
2012-03-18regulator: tps65910: Provide settling time for DCDC voltage changeLaxman Dewangan
Settling time is require when there is dcdc rail's voltage change. Returning proper delay time for dcdc voltage change to settle down the output voltage to new value. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 18039e0f16d50c8243fe0388a587c25a3b155ece) Change-Id: Ibd67d2661dd1d5b014754c221d44963baeb13726 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/90518 Reviewed-by: Automatic_Commit_Validation_User
2012-03-18regulator: tps65910: Provide settling time for enabling railsLaxman Dewangan
There is settling time for each rails when it is switched to ON. Implementing enable time for returning proper settling time of regulator rails when it is enabled. Filling the on-time for each rail as per tps65910/tps65911 datasheets. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 0651eed5e094a079a0a9fccd80a41cb3e7f2aa99) Change-Id: Ibdb05171cfb4c4e7a064c8f65193647997e8e9a8 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/90517 Reviewed-by: Automatic_Commit_Validation_User
2012-03-18regulator: Fix the logic of tps65910_get_modeAxel Lin
We actually clear LDO_ST_ON_BIT for standby mode in tps65910_set_mode. Fix the logic in tps65910_get_mode. Supply state (EEPROM bits): ST[1:0] = 00 : Off ST[1:0] = 01 : On high power (ACTIVE) ST[1:0] = 10 : Off ST[1:0] = 11 : On low power (SLEEP) Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 585993932ccc44ab6a8c6dc590a2f3d6b2facb41) Change-Id: I1cb46d05396a286ba34c84b1836b9070f0f78003 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/90516 Reviewed-by: Automatic_Commit_Validation_User
2012-03-18regulator: Rename set_voltage_sel callback function name to *_selAxel Lin
This change improves readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry-picked from mainline 94732b97c39859427cf99c34fc9de9750be7e5a5 Change-Id: Ie3eb5462a99cceab40ba0e26e4e3cdb93c5f3f0f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/90515 Reviewed-by: Automatic_Commit_Validation_User
2012-03-13regulator: max77663: Don't use low-power mode for N-Channel LDOsJohnny Qiu
N-Channel LDOs on MAX77663 doesn't work well. It has glitches. Don't use it as WAR. Bug 949641 Change-Id: Ib0c8918137bccc0ce3b30bd6d97ad5f9bd39277e Signed-off-by: Johnny Qiu <joqiu@nvidia.com> Reviewed-on: http://git-master/r/87691 Tested-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-03-12regulator: tps65910: Sleep off rails when ext sleep configuredLaxman Dewangan
Keep the rails OFF in sleep mode only when the rails are controlled by external sleep control. The devices tps65910 and tps65911, both has the sleep input. The tps65911's sleep input is not same as tps65910's EN3 and hence taking care of SLEEP input as separate external sleep control input. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline commit 87ae88a17396fe3f91c34ab44f460e5680eb6f61 Change-Id: I05645082ad5268a4553891db6b35af33650b7a95 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/89125
2012-03-09regulator: tps65910: Configure correct value for VDDCTRL vout regLaxman Dewangan
As per datasheet, the voltage output is defined as from SEL[6:0] = 3 to 64 (dec) Vout= (SEL[6:0] × 12.5 mV + 562.5 mV) The list_voltage returns the vout as 600mV + selector * 12.5mV and so equivalent VSEL is selector + 3. Adding 3 on selector when configuring VSEL register for VDDCTRL output. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline commit c4632aed3e5b134c55b54af19db49662959384c1 Change-Id: Ifc514a87803191cf796ffc0d75d979476e712dde Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/88830
2012-02-29regulator: add GCOV_PROFILEJuha Tukkinen
Add GCOV profiling for regulators in Makefile. This change has no effect if CONFIG_GCOV_KERNEL is not set in defconfig. This patch only makes it easier to trigger GCOV for the kernel. Change-Id: I921647e2742cda870ebb99afe3f63544396b7f02 Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/86277 Tested-by: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-02-22regulator: Fix module desciption for tps65910 regulatorAxel Lin
Fix the module desciption and also update Kconfig to include supporting tps65911 chip. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline commit 02c38f3e8e9b0cd76bdb835b0fd8d627ddf5e19b Change-Id: Iee8eaf208ae2d448f4c022b2c3908f8519191180 Reviewed-on: http://git-master/r/85124 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-02-22regulator: tps65910: Correct VIO voltage configurationLaxman Dewangan
The VIO regulator register specify the voltage configuration on bit3:2 of its register. And hence only these bits should be modified when setting voltage and used when reading voltage from register setting. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline commit 83e0323211e33b117ce585bab64636ca1fff807a Change-Id: Ica9d50dd62ccab15a02c8769e8b1279fb32d4a03 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/85122
2012-02-16regulator: max77663: add support for VDD_RTC tracking to VDD_COREJohnny Qiu
Bug 920845 Change-Id: Id84218efaeebcc834fdac6e0e5c30adc60a13ebc Signed-off-by: Johnny Qiu <joqiu@nvidia.com> Signed-off-by: Hao Tang <htang@nvidia.com> Reviewed-on: http://git-master/r/83727 Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-by: Liangchuan Mi <lmi@nvidia.com> Tested-by: Liangchuan Mi <lmi@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-02-14regulator: tps6236x: Remove tps6236x driverLaxman Dewangan
Removing duplicate driver tps6236x as there is mainline's driver for tps62360 and using the mainline's driver. Change-Id: I84c1c642f42d2dc934c8b8bf9b92a58a0bfbdc03 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/78415 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-02-13regulator: tps65910: Sleep control through external inputsLaxman Dewangan
Add support for sleep controls of different regulator through external inputs EN1, EN2 or EN3. Each regulator's output will be active when its external input is high and turns to OFF/Low power mode when its external input is low. The configuration parameters for sleep control is provided through board specific platform data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline 1e0c66f49762fa1866ab20b1feb6e86a9aa4838f Change-Id: Ie8256fae45c21f08b2d101efebca004cb32963a0 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/79181 Reviewed-by: Automatic_Commit_Validation_User
2012-02-13regulator: tps80031: Correct voltage selection logicsLaxman Dewangan
Fixing the voltage selection logics for a given mininum/maximum range. bug 934544 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/78970 (cherry picked from commit 59b0264b6eda9f1e8123ee5cd82eae7104c3513e) Change-Id: Ib9f6e8b1b1f0603aeb02af8345704110cd87b51a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/79512 Reviewed-by: Automatic_Commit_Validation_User
2012-02-06arch: arm: regulator: Fix LDK kernel build breakKrishna Monian
Fix Bug 935411 Change-Id: I3406bf1ff3450537b72de86b0cb68cb2329da6fc Reviewed-on: http://git-master/r/79292 Reviewed-by: Dinesh Israni <disrani@nvidia.com> Tested-by: Dinesh Israni <disrani@nvidia.com> Reviewed-by: Frank Bourgeois <fbourgeois@nvidia.com> Tested-by: Frank Bourgeois <fbourgeois@nvidia.com>
2012-02-03regulator: max77663: Add Global Low-Power ModeJin Park
Added GLPM(Global Low-Power Mode) to support Low-Power Mode during sleep mode. Bug 924686 Reviewed-on: http://git-master/r/75627 Change-Id: Ia4be1b6b24de95f29ac173bed71c045a246cbcde Signed-off-by: Jin Park <jinyoungp@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78701 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: tps65910: use appropriate variable names.Laxman Dewangan
Renaming the variables "table" to "voltage_table" and "table_len" to "n_voltages" of regulator information to have more meaningful. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry picked from commit 7d38a3cb9b9f6a6d31b1d19e4f07a7c0b71407d5 Change-Id: I8ef3a7544bf432a3c6efb98d99cb660b6fefde38 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77539 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: tps65910: Initialize n_voltages for rails.Laxman Dewangan
Initializing the number of voltages supported by different rails of pmic device tps65911. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry picked from mainline's commit 51ced5e288b4381705df173fb05f561dea35bfac Change-Id: I85ec3261125291f9862f9746ef7ec97e09fa375b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77538 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: tps65910: Add regulator info for RTC railLaxman Dewangan
Adding missing regulator info for VRTC rail for device tps65911. The regulator voltage rail index start from VRTC which is defined as 0. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry picked from mainline's commit c2f8efd7641b1b10b73ffa6f216a45209a5705dd Change-Id: I7e544ea2f0b3df677ad75bbca38b744c9a6f71da Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77537 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: TPS65910: Fix VDD1/2 voltage selector countAfzal Mohammed
Count of selector voltage is required for regulator_set_voltage to work via set_voltage_sel. VDD1/2 currently have it as zero, so regulator_set_voltage won't work for VDD1/2. Update count (n_voltages) for VDD1/2. Output Voltage = (step value * 12.5 mV + 562.5 mV) * gain With above expr, number of voltages that can be selected is step value count * gain count constant for gain count will be called VDD1_2_NUM_VOLT_COARSE existing constant for step value count is VDD1_2_NUM_VOLTS, use VDD1_2_NUM_VOLT_FINE instead to make clear that step value is not the only component in deciding selectable voltage count Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry picked from mainline's commit 780dc9ba4eb682a89be48d5b814feae6722a19e0 Change-Id: I1c246a02f1c647fe3c647b3dde2a0633c2783764 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77536 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: TPS65910: Create an array for init dataKyle Manna
Create an array of fixed size for the platform to pass regulator initalization data through. Passing an array of pointers to init data also allows more flexible definition of init data as well as prevents reading past the end of the array should the platform define an incorrectly sized array. Signed-off-by: Kyle Manna <kyle.manna@fuel7.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry picked from mainline's commit c1fc1480249dfe059254779a4bb7ca27cf5f8038 Change-Id: Ia298bbd2828e644d24e10ab67ff76f1169cf7f51 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77535 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: TPS65910: Move regulator defs to headerKyle Manna
Move the regulator defintions to the header so that platform board file can use them to configure specific regulators. Signed-off-by: Kyle Manna <kyle.manna@fuel7.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry picked from mainline's commit: 72c108cc4947db2fcdd3f3e8a2b60bd65e74a1cc Change-Id: I7659c33cab6f20c91dc4bf36e1c157e1878993ab Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77534 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: tps62360: Remove extra argument in regulator_registerLaxman Dewangan
As this dirver is back ported from kernel mainline, the function regulator_register() have one extra argument. Removing this extra argument. Change-Id: I615f995184e4908c399b9ccc91e090e49f10aec3 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: I999307c90092c3cc816952c948e04c170fc4303d Reviewed-on: http://git-master/r/77343 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30regulator: TPS62360: Add tps62360 regulator driverLaxman Dewangan
The regulator module consists of 1 DCDC. The output voltage is configurable and is meant for supply power to the core voltage of Soc. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherrypick from Mainline commit 6219929f5f82708309b3054ec7db6cb6e3ee47d5 Change-Id: Idfdbf06f7d01e0faaabcb658311a9aa5324ddc68 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77341 Reviewed-by: Automatic_Commit_Validation_User
2012-01-20regulator: Fix possible nullpointer dereference in regulator_enable()Heiko Stübner
In the case where _regulator_enable returns an error it was not checked if a supplying regulator exists before trying to disable it, leading to a null pointer-dereference if no supplying regulator existed. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry-pick from main stream: commit d1685e4e2c3854782272f32b71f2f3eff5c6e0d0 Change-Id: Ie4d8db9184a65e6a98964259299bfc7daa0f4048 Reviewed-on: http://git-master/r/75908 Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/76462 Reviewed-by: Automatic_Commit_Validation_User
2012-01-19regulator: Add driver for gpio-controlled regulatorsHeiko Stübner
This patch adds support for regulators that can be controlled via gpios. Examples for such regulators are the TI-tps65024x voltage regulators with 4 fixed and 1 runtime-switchable voltage regulators or the TI-bq240XX charger regulators. The number of controlling gpios is not limited, the mapping between voltage/current and target gpio state is done via the states map and the driver can be used for either voltage or current regulators. A mapping for a regulator with two GPIOs could look like: gpios = { { .gpio = GPIO1, .flags = GPIOF_OUT_INIT_HIGH, .label = "gpio name 1" }, { .gpio = GPIO2, .flags = GPIOF_OUT_INIT_LOW, .label = "gpio name 2" }, } The flags element of the gpios array determines the initial state of the gpio, set during probe. The initial state of the regulator is also calculated from these values states = { { .value = volt_or_cur1, .gpios = (0 << 1) | (0 << 0) }, { .value = volt_or_cur2, .gpios = (0 << 1) | (1 << 0) }, { .value = volt_or_cur3, .gpios = (1 << 1) | (0 << 0) }, { .value = volt_or_cur4, .gpios = (1 << 1) | (1 << 0) }, } The target-state for the n-th gpio is determined by the n-th bit in the bitfield of the target-value. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 3f0292ae8bb100cc8f96106a3de277df48134887) regulator: Add module.h include to gpio-regulator Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit ecc37edf7b670616a9dc78a0bdd4911a22d551ec) regulator: Fix compile break due to missing arguments to regulator_register The commit 2c043bcbf287 ("regulator: pass additional of_node to regulator_register()") caused a compile break because it missed updating the regulator_register() call in gpio-regulator.c with the additional parameter (NULL). The compile break as reported by Stephen Rothwell with the x86_64 allmodconfig looked like this drivers/regulator/gpio-regulator.c: In function 'gpio_regulator_probe': drivers/regulator/gpio-regulator.c:287:8: error: too few arguments to function 'regulator_register' include/linux/regulator/driver.h:215:23: note: declared here Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 156843470c4b9ea9698cc245d2cff769b3784088) Change-Id: I912886aae825ca440f4ad3e7a33fe4e84bde4e1b Reviewed-on: http://git-master/r/74924 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/75547 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-13regulator: TPS65090: Add regulator supportvenu byravarasu
Add regulator changes needed to support TPS65090. bug 909648 Change-Id: Ia88e6706051f7a7e920b01c656f64385b98fc33a Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/73144 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/74895 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>