summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps80031-regulator.c
AgeCommit message (Collapse)Author
2012-08-07Fix compilation errors due to mergePradeep Kumar
Change-Id: I1067e7b9ab829bc6629eb79c1edd36dc1327e281 Reviewed-on: http://git-master/r/121393 Reviewed-by: Bo Yan <byan@nvidia.com> Tested-by: Bo Yan <byan@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-08-07Merge commit 'main-jb-2012.08.03-B4' into t114-0806Pradeep Kumar
Conflicts: arch/arm/boot/compressed/Makefile arch/arm/boot/compressed/atags_to_fdt.c arch/arm/boot/compressed/head.S arch/arm/boot/dts/tegra30.dtsi arch/arm/include/asm/bug.h arch/arm/kernel/traps.c arch/arm/mach-tegra/Makefile.boot arch/arm/mach-tegra/board-cardhu-sdhci.c arch/arm/mach-tegra/board-cardhu.c arch/arm/mach-tegra/board-enterprise-sdhci.c arch/arm/mach-tegra/board-enterprise.c arch/arm/mach-tegra/board-harmony.c arch/arm/mach-tegra/board-kai-sdhci.c arch/arm/mach-tegra/board-ventana.c arch/arm/mach-tegra/board-whistler.c arch/arm/mach-tegra/clock.h arch/arm/mach-tegra/fuse.h arch/arm/mach-tegra/tegra2_usb_phy.c arch/arm/mach-tegra/tegra3_clocks.c arch/arm/mach-tegra/tegra3_dvfs.c arch/arm/mach-tegra/tegra3_speedo.c arch/arm/mach-tegra/timer.c arch/arm/mach-tegra/usb_phy.c arch/arm/mach-tegra/wakeups-t3.c drivers/cpufreq/cpufreq_interactive.c drivers/input/touchscreen/atmel_mxt_ts.c drivers/mfd/tps65090.c drivers/mmc/core/mmc.c drivers/mmc/host/sdhci-tegra.c drivers/mmc/host/sdhci.c drivers/net/wireless/bcmdhd/bcmsdh_sdmmc_linux.c drivers/regulator/Kconfig drivers/regulator/core.c drivers/regulator/tps80031-regulator.c drivers/spi/Makefile drivers/staging/nvec/nvec.c drivers/tty/serial/Makefile include/linux/mmc/card.h sound/soc/tegra/tegra_max98095.c sound/usb/card.c Change-Id: I65043bc6ce9e97d0592683462215a39e50f403fd Reviewed-on: http://git-master/r/121392 Reviewed-by: Bo Yan <byan@nvidia.com> Tested-by: Bo Yan <byan@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-07-30regulator: tps80031: adjust tolerance if req minuV > dev minuVMallikarjun Kasoju
Adjust the tolerance voltage only when requested minimum voltage is more than the rail's minimum voltage. bug 997415 Change-Id: Ie139c657f8550adba07b74a0cd5d69e2b53d62c2 Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-on: http://git-master/r/116405 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-07-12regulator: tps80031: support for min voltage toleranceLaxman Dewangan
Sometimes the system allow to run in less than requested minimum voltage and if this tolerance allow the regulator to set voltage in lower side range than this saves the power. For the example, if client request vmin = 975mV for regulator voltage then it sets the voltage to 987.5mv as the nearest to this desired value. The next lower side for the voltage is 974.8mv. So if system runs on tolerance of 1mv and if it request for 975mv then driver can look for minimum voltage as 975 - tolerance(1) = 974mv and possible configure 974.8mv rather than 987.5mV and so it can save the power equivalent to 12.5mV higher voltage. Support the configuration of tolerance value. Change-Id: Ic8312bb397c2615a3ee0f84072ec394e513525ea Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/110523 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-07-12regulator: tps80031: Allow to configure in OFF mode in sleep stateLaxman Dewangan
Allow to configure the rail into sleep-off mode even if the external req is not supported for a regulator. bug 979143 Change-Id: I3c1bd789410b557a2ffc3133ca15ec3753ed2004 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/110881 Reviewed-by: Automatic_Commit_Validation_User
2012-03-25fixup: regulator_register (tps80031-regulator.c)Dan Willemsen
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-03-25fixup: module.h (tps80031-regulator.c)Dan Willemsen
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-03-23regulator: 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 Rebase-Id: Rc0c8133b9f49456d4ee1dff287fe8c5623d6f5a7
2012-03-23regulator: tps80031: use correct voltage conversion formulaLaxman Dewangan
The correct voltage conversion formula for the register programming is Code=((Vout-0.6077)/0.01266)+1 Changing existing formula to above equation. bug 915859 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Id745cc82269282318cc064f25e789837dc0dfa7a Reviewed-on: http://git-master/r/72017 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: R8517b18eead5b32f5f595c235720ed92cf35477e
2012-03-23regulator: tps80031: Set selector in __tps80031_ldo_set_voltageAntti P Miettinen
Set selector also in __tps80031_ldo_set_voltage(). Bug 886170 Change-Id: I17dab9cdfa6397dbdf9dba0232e4f8de0cf364f0 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/62147 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> Rebase-Id: R3e0e35b04d6429227e4e0e81486bf8811d870b3e
2012-03-23mfd: tps80031: Support sleep configuration through platform dataLaxman Dewangan
Supporting the sleep configuration through platform data. Rearranging clock initialization to take external power control. Reviewed-on: http://git-master/r/67076 (cherry picked from commit 9da9d369bdbe988b98eec9b63085dfdb26de8237) Change-Id: I40c5a8608522dbc322e148b5d569e8f5a00faa21 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/67331 Rebase-Id: R324d9acf8088880dcefdce33850f052aaff3e892
2012-03-23regulator: tps80031: Check configuraton for LDO2-Track modeLaxman Dewangan
Some of the values are not supported in the LDO2 configuration when using in track mode due to hw issue in tps80031 and tps80032-ES1.0. Adding proper check before configuring the LDO2 in this case. bug 898613 Reviewed-on: http://git-master/r/65441 (cherry picked from commit 58e3672102825b662ea904b46b6c1efbf639365b) Change-Id: I4e63a932d32c7cb2d13a07611acfa0b7dae649cc Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/66327 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> Rebase-Id: Rb66ed786391b3dbfefc6b8702cab3867c208fdff
2012-03-23mfd: tps80031: Move external pwr req to core driverLaxman Dewangan
Moving the configuration function for configuring the rail control through the PREQ line to core from regulator driver. Fixing the correct voltage configuration for the LDO2 based on TRACK mode. Reviewed-on: http://git-master/r/63503 (cherry picked from commit 9190130f6cf1ba0bae3231321841ebe4ad94a54e) Change-Id: I7dd511da7f809a44b1e66706054c0a4c57c36323 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/64055 Rebase-Id: R0e2a98e37da0d55b7aac68ad4079639e824aa947
2012-03-23regulator: tps80031: Proper configuration for PREQ1 controlLaxman Dewangan
When any rail is configured such that it can be enable by PREQ1 then only control the sleep mode of rails through TRANS register, not the STATE register. PREQ1 control the rail to switch from active to sleep and sleep to active mode. Reviewed-on: http://git-master/r/58278 (cherry picked from commit 6a8db3200c3119673b85769b1caa56422a22b4f9) Change-Id: I9763a4d283f0171eb9b7755d44ca3b9059755033 Reviewed-on: http://git-master/r/59289 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R25d191b2429a5f60e77d70aed1eefecaa3b75ba3
2012-03-23regulator: tps80031: Fix set_voltage to return selector valueAntti P Miettinen
Current regulator_ops interface expects selector value to be returned. Not doing so results in uninitialized variables used. Bug 886170 Change-Id: I23e664790311e434303eb23fafd194502ae2909c Reviewed-on: http://git-master/r/56654 Reviewed-by: Antti Miettinen <amiettinen@nvidia.com> Tested-by: Antti Miettinen <amiettinen@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R72759360aeca354ef82d0ec7431e8c9f2fcafdfb
2012-03-23regulator: tps80031: Optimize voltage change by register cacheLaxman Dewangan
Using the register caching for optimizing the update of pmu register through i2c. In this way, the frequent read of pmu register is avoided. bug 870689 Reviewed-on: http://git-master/r/56617 (cherry picked from commit 59426b56710e06b075769b4eb73723c3dcf28710) Change-Id: I9fc339587c8c5c82443bb99489992d608fd3534e Reviewed-on: http://git-master/r/56872 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: Reb0312eaaa88f9b082c540b752663089964ffee8
2012-03-23regulator: tps80031: Support for delay configurationLaxman Dewangan
Adding support for delay configuration after setting the voltage from platform data based on board behavior. Also providing flag to enable the VBUS discharging though internal pull down. bug 853393 Change-Id: I27e7ae1eab9893241e775e17ec7b98afac71195b Reviewed-on: http://git-master/r/41886 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R395c7ac35ccfabbea8de403d0db3cc4708981ab8
2012-03-23regulator: tps80031: Correcting voltage range for LDOs.Jin Park
The LDOs are supporting 1.0V to 3.3V on TPS80031, but current driver was implemented 1.1V to 3.3V. So corrected this. And adding bit mask in ldo_get_voltage to prevent wrong voltage calculation. Signed-off-by: Jin Park <jinyoungp@nvidia.com> Original-Change-Id: Ic3779730fd8ad1dec6cf156b4582b0099734e7e6 Reviewed-on: http://git-master/r/39515 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rffc735384a266c5d8cde7697e25d9d3f3081597c
2012-03-23regulator: tps80031: Fix build warningDan Willemsen
Original-Change-Id: I0bcfd38569b9a9a1cc21d0e9d12a0d114d87be9c Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rf1f1609942bd3ca4fae07ab37304cb214ab87774
2012-03-23arm: mfd/regulator: tps80031: Adding force_update for status registerJin Park
The state register is read and write register, if read, it returned current state, not current written value in register. So if it want to write the value into state register, it must unconditional write the value, don't use update(read and compare and then write). Bug 838189 Original-Change-Id: I2555875a822f159e664b0834af2d00073c859acd Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/38396 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R4fe2a3dce3d7aa9d1710f706ca7978a2848a1fe8
2012-03-23regulator: tps80031: Controls regulator output by PREQLaxman Dewangan
Based on platform, it is require to control the regulator output through the peripheral power request signal to pmu. Supporting this type of platform configuration to control output voltage by sw as well as through PREQ input line. bug 839809 bug 829405 Original-Change-Id: Ifa19b9062ca2a2c5cae84de1f311a33cec094ad0 Reviewed-on: http://git-master/r/38936 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: Rbdf280412ca9c3f2fa73b17bd15b85408ffc0996
2012-03-23regulator: tps80031: Add VBUS as regulatorLaxman Dewangan
Providing the control of VBUS through regulator api. bug 833736 Original-Change-Id: Id79f64dfb0ab30a5f0663521defb60a76681c767 Reviewed-on: http://git-master/r/38499 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Rebase-Id: R65f709d46eada58498564214a3b9f0957fb98f25
2012-03-23arm: mfd/regulator: tps80031: Fix I2C addressingLaxman Dewangan
This change adds the possibility of addressing all addresses on the tps80031 I2C Bus. The interrupt registers and SMPS1/2 and VIO require using different I2C addresses to be reached correctly. bug 830904 Original-Change-Id: I1b5b0d03e531c3c8a0551e5049055930e742e10f Reviewed-on: http://git-master/r/34866 Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Matt Wagner <mwagner@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: Rd3ec6b9b3fac3c13e0b6a58af428110e7e51a2c8
2012-03-23arm: mfd/regulator: Adding driver for tps80031Laxman Dewangan
Adding core and regulator driver for the TI pmu device tps80031. Following functionality is added: - Basic core driver interface to access register. - Regulator driver. - gpio driver. - interrupt support from pmu. - clock 32 initialization. bug 830904 bug 829658 Original-Change-Id: I41e732c0b5d0472209798552b5264038e5a97ee4 Reviewed-on: http://git-master/r/33109 Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R72919d00e28138767da61d673c9e805f74911341