summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* regulator: ab8500-ext: Make the return type of ab8500_ext_regulator_exit() voidAxel Lin2013-04-113-10/+5
| | | | | | | | ab8500_ext_regulator_exit() never fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Remove get_voltage to avoid duplicate implementationAxel Lin2013-04-081-16/+0
| | | | | | | | | | | | The implementation of ab8500_ext_fixed_get_voltage is identical to ab8500_ext_list_voltage. We can avoid the duplicate implementation by just remove get_voltage. For fixed regulator, regulator core will call list_voltage(rdev, 0) to get voltage if both get_voltage get_voltage_sel are not implemented. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Remove unnecessary checking for ab9540 and ab8540Axel Lin2013-04-081-7/+0
| | | | | | | | | | | | | | | | | | This code was added by commit 0fe17e20a6 "regulator: ab8500-ext: Add support for AB9540 regulators" and commit bd44e2cb "regulator: ab8500: Also check for AB8505 based platforms" The original patch[1] is to set info->desc.ops = &ab9540_ext_regulator_ops. However, ab9540_ext_regulator_ops is identical to ab8500_ext_regulator_ops[2]. Thus we can complete remove the unnecessary checking for ab9540 and ab8540. [1] https://lkml.org/lkml/2013/3/28/333 [2] https://lkml.org/lkml/2013/4/1/178 Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Get rid of is_enabled from struct ↵Axel Lin2013-04-081-11/+3
| | | | | | | | | | | | | | | ab8500_ext_regulator_info The intention of this patch is to simplify the code. Maintain the is_enabled flag is not trivial, it not only needs to set/clear the flag in disable()/enable() but also needs to set the flag in is_enable() to get initial status. The only benefit of keeping is_enabled flag is just save a register read when set_mode(). Remove is_enabled flag makes the code simpler. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Get rid of is_enabled from struct ab8500_regulator_infoAxel Lin2013-04-081-40/+32
| | | | | | | | | | | | | | | | | | | | The intention of this patch is to simplify the code. Maintain the is_enabled flag is not trivial, it not only needs to set/clear the flag in disable()/enable() but also needs to set the flag in is_enable() to get initial status. The only benefit of keeping is_enabled flag is just save a register read when set_mode(). Remove is_enabled flag makes the code simpler. This patch also moves ab8500_regulator_is_enabled() close to ab8500_regulator_[en|dis]able functions. This is required to avoid a forward declaration because now we call ab8500_regulator_is_enabled() in ab8500_regulator_set_mode(). This change also makes the code better in readability by moving similar functions to one place. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Remove ab8500_regulator_set_voltage_time_selAxel Lin2013-04-051-11/+0
| | | | | | | | | All users of ab8500_regulator_volt_mode_ops and ab8500_regulator_volt_ops do not set info->desc.enable_time, thus set_voltage_time_sel() always returns 0. Remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add missing volt_table setting for AB8540_LDO_TVOUTAxel Lin2013-04-031-0/+1
| | | | | | | | This is required for regulator_list_voltage_table() to properly work. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Fix list_voltage for fixed voltage regulatorsAxel Lin2013-04-031-2/+2
| | | | | | | | | | | | commit b080c78a4e447e9c212c207f725999d4e32c5f19 "regulator: ab8500: Update voltage handling for fixed voltage regulators" removes min_uV settings and sets volt_table for all fixed voltages, thus we can not use regulator_list_voltage_linear now. Use regulator_list_voltage_table instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Regulators: Bring the AB8500 regulator platform data up-to-dateLee Jones2013-04-031-28/+47
| | | | | | | | Quite a few changes in this patch, including: supply-name changes, new consumers, initialisation and capability updates and new regulators. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Shuffle init functions into a more logical orderLee Jones2013-04-031-85/+85
| | | | | | | | | | | The ab*_match[] arrays should be moved out of the way, instead of bunched in the middle of the initialisation functions. This patch moves all initialisation code which currently resides above these arrays down to be grouped with the others. This makes the whole thing slightly easier to read. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Pass regulator platform data using the new formatLee Jones2013-04-032-13/+3
| | | | | | | | | Regulator platform data is now passed though a single structure as opposed to the old way where four separate struct elements were required. This patch makes use of the new format. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Use regulator_list_voltage_table() to look-up voltagesLee Jones2013-04-031-13/+6
| | | | | | | | | | The regulator framework offers a generic regulator_list_voltage_table() function which can directly look-up a regulator's voltage capabilities using a table provided through the desc structure. This patch ensures that information is available. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Remove the need for a 'delay' propertyLee Jones2013-04-031-4/+1
| | | | | | | | | | The regulator framework now has provisions to read a regulator's start-up time via the 'enable_time' attribute. So let's remove all 'enable_time'/'delay' duplication and just stick with 'enable_time' from now on. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Set enable enable_time in regulator_descLee Jones2013-04-031-0/+3
| | | | | | | | | | Allow the regulator framework to directly access the time it takes any given regulator to settle. This saves time and code because without it we would have to implement a dedication function to read the value from elsewhere. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Introduce aux5, aux6 regulators for AB8540Zhenhua HUANG2013-04-032-0/+67
| | | | | | | | | | | Introduce aux5, aux6 into ab8540 regulator framework. Signed-off-by: Zhenhua HUANG <zhenhua.huang@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com> Reviewed-by: David PARIS <david.paris@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Use a struct to select the good regulator configurationLee Jones2013-04-031-71/+64
| | | | | | | | At the probe use a structure to select the good regulator array from from ab9540, ab8505, ab8540 or ab8500 configuration. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Don't update info->is_enabled if write to register failsAxel Lin2013-04-021-2/+6
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: dbx500-prcmu: Remove operating_point from struct ↵Axel Lin2013-04-021-2/+0
| | | | | | | | | | | dbx500_regulator_info operating_point is not used since the initial commit of db8500-prcmu driver, remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Update vdmic, vamic[1|2] parameters for AB8540Lee Jones2013-04-021-5/+40
| | | | | | | Add voltage setting for vdmic; add LP mode setting for vamic1,2. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add mode operation for v-amicLee Jones2013-04-022-34/+169
| | | | | | | | | v-amic1 and v-amic2 regulators have dedicated mode registers and share the same mode bit. This patch adds special handling for those regulators. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add new operations for Vaux3Lee Jones2013-04-021-1/+128
| | | | | | | | | | | In former functions, only can set Vaux3 to 2.91V, because the highest bit of Vaux3 register is put into another register. So add new expanded functions for Vaux3's operation. Signed-off-by: zhang xiaomei <xiaomei.zhang@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Also check for AB8505 based platformsLee Jones2013-04-022-1/+4
| | | | | | | | | | Ensure we initialise AB8505 external supply regulators. Signed-off-by: Alexandre Torgue <alexandre.torgue@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Tested-by: Xiao Mei ZHANG <xiaomei.zhang@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add voltage selection for AUDIO and ANA on AB8505Lee Jones2013-04-021-6/+49
| | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Don't register external regulators on AB8505Rabin Vincent2013-04-021-8/+12
| | | | | | | | | ExtSupply regulators are not included on AB8505 based platforms. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Tested-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Supply platform specific regulator id valuesLee Jones2013-04-021-31/+31
| | | | | | | | The regulator ID in the regulator info array should be the same values as the position of the element within the array. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Add support for AB9540 regulatorsLee Jones2013-04-021-0/+6
| | | | | | | | | Add the support for ab9540 external regulators. Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Remove unused REGULATOR_AB8500_EXT guardLee Jones2013-04-021-15/+4
| | | | | | | | | | | Before the AB8500 External Regulator driver was Mainlined, it used to be conditionally compiled in using the CONFIG_REGULATOR_AB8500_EXT flag. During the review process that capability was removed, but the guard controlling prototyping slipped though the net. This patch cleans it up. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Use de-globalised version of id.hLee Jones2013-04-021-1/+1
| | | | | | | | | | Following commit: "7a4f260 ARM: ux500: de-globalize <mach/id.h>", the use of 'mach/id.h' is no longer valid. This patch continues the work of the aforementioned commit on patches applied around the same time, containing the merge-conflict. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Use regulator_list_voltage_table()Lee Jones2013-04-011-40/+22
| | | | | | | | | Following a recent move to regulator_list_voltage_table() for all previous abx500 related platforms this converts all recent platform updates over too. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Update voltage handling for fixed voltage regulatorsLee Jones2013-04-011-48/+44
| | | | | | | | | | There are a few over-lapping methods for voltage selection operating in the AB8500 regulator driver currently. This patch removes unused, unnecessary variables from the regulator_info structures and provides voltage tables for those regulators which have fixed voltages. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add support for the ab8540Lee Jones2013-04-012-8/+764
| | | | | | | | | | To obtain full AB8540 regulator support, the AB8500 regulator driver first needs to know its register layout and their initialisation values for each. That information is provided via a couple of large data structures which we provide here. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: add support for ab8505Lee Jones2013-04-014-9/+1195
| | | | | | | | | | To obtain full AB8505 regulator support, the AB8500 regulator driver first needs to know its register layout and their initialisation values for each. That information is provided via a couple of large data structures which we provide here. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Add support for AB8505/AB9540Bengt Jonsson2013-04-011-1/+1
| | | | | | | | | | The external regulator driver checks for old AB8500 HW to apply a fix. This patch adds a check to see that it is a AB8500 (not AB8505/AB9540). Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Correct TVOUT regulator enable timeLee Jones2013-04-011-1/+1
| | | | | | | | | | | Update TVOUT regulator to match specification. Was 10ms - changed to 500us. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Add support for the ab9540Lee Jones2013-04-011-9/+573
| | | | | | | | | | To obtain full AB9540 regulator support, the AB8500 regulator driver first needs to know its register layout and their initialisation values for each. That information is provided via a couple of large data structures which we provide here. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Prepare the driver for additional platformsLee Jones2013-04-011-27/+49
| | | | | | | | | | | More platforms are to be supported by the AB8500 regulator driver, so in this patch we prepare for their arrival. Instead of using the AB8500 settings blindly, we provide an infrastructure where adding a new platform is as easy as providing a couple of platform specific data structures. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Update info->update_val only when successfully update ↵Axel Lin2013-03-291-8/+19
| | | | | | | | | | register Don't update info->update_val if write to the register fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Init debug from regulator driverLee Jones2013-03-292-0/+24
| | | | | | | | | The purpose of this patch is to guarantee that ab8500-debug will record the regulator registers before they are modified by the ab8500 regulator driver. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Remove USB regulatorLee Jones2013-03-292-21/+0
| | | | | | | | | The USB regulator is controlled by hardware. The software support was only needed for early hardware (ED) which is no longer supported. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: Add HW request supportBengt Jonsson2013-03-292-27/+75
| | | | | | | | | | | | | | | Support for HW request is added in the external regulator driver. A flag in the board configuration can be set to let HW control the regulator when there is no SW request. This means that the regulator will be put in high power mode when there is a SW request and in HW-request mode otherwise. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Setup external regulator supply #2 for HREF v20 boardsLee Jones2013-03-291-0/+28
| | | | | | | | | | v20 HREFs require non-standard configuration of EXT_SUPPLY2 to function correctly (specific information is commented). Here we make use of the recently added mechanism to adapt initialisation values for such use-cases. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Turn off external regulator #1 when early HREFs suspendLee Jones2013-03-292-0/+19
| | | | | | | | When older variants of the HREF (earlier than v22) development platform enter suspend mode, power down EXT_SUPPLY1. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Provide a mechanism to over-ride regulator init valuesLee Jones2013-03-291-0/+18
| | | | | | | | If particular platforms require non-standard initialisation values, they can use this function to adapt them as required. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Add regulator platform data for AB8500 external regulatorsLee Jones2013-03-291-4/+55
| | | | | | | | | | Pass constraint information for recently supported external AB8500 controlled regulators. Also change the start-up initialisation settings for each of the 3 supported external supplies to low-power, off and high-power for supply 1, 2 and 3 respectively. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500-ext: New driver to control external regulatorsLee Jones2013-03-294-2/+434
| | | | | | | | | | The ABx500 is capable of controlling three external regulator supplies. Most commonly on and off are supported, but if an external regulator chipset or power supply supports high-power and low-power mode settings, we can control those too. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Amend the update value for AB8500_LDO_INTCORE regulatorLee Jones2013-03-281-1/+1
| | | | | | | The issues probably originated from a typo in the initial submission. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: regulator: Add accelerometer and fix magnetometer supply device IDLee Jones2013-03-281-1/+3
| | | | | | | | | This patch adds the LSM303DLHC Accelerometer to the list of VAUX1 consumers, as well as amending the already added LSM303DLHC Magnetometer's device ID. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Clean out SoC registersLee Jones2013-03-283-110/+28
| | | | | | | | | | | | | | Clean out initialisation that is handled by SoC. Regulator settings for Vpll (partly), Vsmps1, Vsmps2, Vsmps3 (partly), Vrf1, Varm, Vape, Vbb, Vmod are cleaned out. They should not be touched by the kernel. We also update many of the initialisation values to be more in-line with the current development efforts of ST-Ericsson internal engineers. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: regulators: List the MMIO camera as a consumer of VAUX1Lee Jones2013-03-281-0/+2
| | | | | | | The MMIO camera uses the VAUX1 as it's voltage supply. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: ux500: Add supply for the Cypress TrueTouch TouchscreenLee Jones2013-03-281-0/+2
| | | | | | | | This patch lists the Cypress TrueTouch Touchscreen as a consumer of the AB8500 VAUX1 regulator. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud