summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* regulator: rc5t583: Use regulator_set_voltage_time_sel()Axel Lin2012-06-241-14/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Use list_voltage() to get voltage in regulator_set_voltage_time_selAxel Lin2012-06-231-14/+9
| | | | | | | | | With this change, regulator_set_voltage_time_sel() can be more generic and not limited to linear and table based mapping now. One side-effect of this change is that list_voltage() must be implemented. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8998: Convert to set_voltage_sel and regulator_map_voltage_linearAxel Lin2012-06-231-70/+27
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8998: Convert to regulator_list_voltage_linear()Axel Lin2012-06-231-25/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chipAxel Lin2012-06-231-5/+2
| | | | | | | | The chip_id is not used. The voltage_base is not necessary, set base voltage to tps->desc.min_uV instead. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Add export of regulator_set_voltage_time_sel()Mark Brown2012-06-231-0/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65910: Convert to regulator_list_voltage_tableAxel Lin2012-06-221-54/+40
| | | | | | | | Convert tps65910_ops and tps65910_ops_vdd3 to regulator_list_voltage_table. 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>
* regulator: tps65910: Remove unused min_uV and max_uV from struct tps_infoAxel Lin2012-06-221-50/+0
| | | | | | | | | | | | | | | The min_uV and max_uV fields of struct tps_info are not used in the code. For the case voltage_table is provided, the min_uV and max_uV are the same values as volt_table[0] and volt_table[n_voltages -1]. For the case voltage_table is not available, having the min_uV and max_uV seems misleading. Current code uses equations to get the voltage value in this case, but these equations do not use the min_uV and max_uV fields of struct tps_info. Thus this patch removes the min_uV and max_uV fields from struct tps_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>
* regulator: change message level on probing lp872x driverKim, Milo2012-06-211-1/+1
| | | | | | | Use err log rather than warning message when the platform data is NULL Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Depend on I2C=yMark Brown2012-06-211-1/+1
| | | | | | | Kconfig doesn't do the right thing for us here. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65910: Convert to regulator_set_voltage_time_sel()Axel Lin2012-06-211-28/+6
| | | | | | 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>
* regulator: arizona: Add support for microphone supplies on Arizona devicesMark Brown2012-06-203-0/+192
| | | | | | | | The Wolfson Arizona platform is used for a range of low power audio hub CODECs. Many of these devices feature an integrated power supply for the microphone which is supported by this driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Return -EINVAL if pdata is NULLAxel Lin2012-06-201-5/+5
| | | | | | | | Return -EINVAL if pdata is NULL, otherwise we have NULL dereference bug. This patch also moves the code checking pdata earlier in lp872x_probe. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Implement .set_ramp_delay() callbackYadwinder Singh Brar2012-06-201-8/+29
| | | | | | | | | | | | This patch implements the .set_ramp_delay callback to set the ramp_delay on hardware for BUCK2/3/4 if ramp_delay is set in regulator constraints. This patch also do some cleaning work for unrequired members of struct max77686_data. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Initialize regulator_configAxel Lin2012-06-201-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Don't allow modular buildMark Brown2012-06-201-1/+2
| | | | | | | Fixes link failure due to devm_gpio_request_one() Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: add new regulator driver for lp872xKim, Milo2012-06-194-0/+1055
| | | | | | | | This driver supports TI/National LP8720, LP8725 PMIC. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Reviewed-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65023: Convert tps65023_ldo_ops to ↵Axel Lin2012-06-191-38/+13
| | | | | | | regulator_[get|set]_voltage_sel_regmap Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: s5m8767a: Support AP watchdog reset operationSangbeom Kim2012-06-192-44/+98
| | | | | | | | | | | | | | | | | | | | | | | | | The S5M8767A can't know status of ap reset. So, After AP watchdog reset, AP can't boot normally. Problem can be happened like below condition. - AP Bootable lowest voltage(vdd_arm): 0.9v - AP DVFS voltage table: 0.8v, 0.9v, 1.0v - During AP works on lowest voltage(0.8V), watchdog reset is asserted - AP can't boot, because vdd arm is still 0.8v Solution - Basic concept: After ap watchdog reset, GPIO configuration is changed by default value - S5M8767A has function of voltage control with gpio (8 levels with 3 gpios) - Set bootable voltage on level 0 -> can work with default gpio configuration - In the probing, Change voltage control level from level 0 to level 1 - Execute normal dvfs operation on level 1 - After watchdog reset, ap gpio is set by default value - PMIC operation mode is changed by ap reset (level1 -> level0) - Regardless of previous vdd_arm voltage, AP always can be booted. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Convert driver to use regulator_set_voltage_time_sel.Yadwinder Singh Brar2012-06-191-33/+9
| | | | | | | | | | This patch converts the driver to use regulator_set_voltage_time_sel() as .set_voltage_time_sel() callback. It also sets ramp_delay as 100000 uV/us for LDOs & normal BUCKs and 27500 uV/us(default/reset value) for BUCKs[2/3/4] in regulator_desc[]. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65023: Convert to get_voltage_selAxel Lin2012-06-191-7/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65023: Convert to regulator_list_voltage_tableAxel Lin2012-06-191-104/+49
| | | | | | | | | | | | | | | | In current mapping table settings, min_uV/max_uV are always equal to volt_table[0] and volt_table[table_len -1]. Thus remove min_uV and max_uV from struct tps_info. The table based mapping with table_len == 1 means fixed voltage. So we don't need fixed flag to differentiate if it is fixed or not. This patch adds DCDC_FIXED_3300000_VSEL_table and DCDC_FIXED_1800000_VSEL_table for fixed voltage cases. So we can convert tps65023_dcdc_ops to regulator_list_voltage_table. This makes the code simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: mc13xxx: Remove mc13xxx_sw_regulator_is_enabled functionAxel Lin2012-06-193-8/+0
| | | | | | | | | If .is_enabled callback is not implemented, regulator core assumes that the regulator is always on. Thus we don't need mc13xxx_sw_regulator_is_enabled function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: twl: Remove references to 32kHz clock from DT bindingsMark Brown2012-06-182-3/+0
| | | | | | | | | | Due to the lack of a generic clock API we'd had the 32kHz clock in the regulator driver but this is definitely a Linux-specific thing and now we have a clock API hopefully the code can be moved elsewhere. Try to avoid getting DTs deployed relying on the 32kHz clock by removing it from the bindings, grep seems to tell me it's not currently used anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65910: Don't use 0 as NULLMark Brown2012-06-181-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Change the unit of ramp_delay from mV/uS to uV/uSAxel Lin2012-06-184-5/+5
| | | | | | | | This change makes it possible to set ramp_delay with 0.xxx mV/uS without truncation issue. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Support table based mapping in regulator_set_voltage_time_selAxel Lin2012-06-181-12/+25
| | | | | | | | | | | | | | For table based mapping, we can calculate voltage difference by below equation: abs(rdev->desc->volt_table[new_selector] - rdev->desc->volt_table[old_selector]) Thus we can make regulator_set_voltage_time_sel work for table based mapping. regulator_set_voltage_time_sel() only supports linear or table based mapping. In case it is misused, also warn if neither linear nor table based mapping is used with regulator_set_voltage_time_sel(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Fix setting constraints->ramp_delay in of_get_regulation_constraintsAxel Lin2012-06-181-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Add ramp_delay configuration to constraintsYadwinder Singh Brar2012-06-175-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | For some hardwares ramp_delay for BUCKs is a configurable parameter which can be configured through DT or board file.This patch adds ramp_delay to regulator constraints and allow user to configure it for regulators which supports this feature, through DT or board file. It will provide two ways of setting the ramp_delay for a regulator: First, by setting it as constraints in board file(for configurable regulators) and set_machine_constraints() will take care of setting it on hardware by calling(the provided) .set_ramp_delay() operation(callback). Second, by setting it as data in regulator_desc(as fixed/default ramp_delay rate) for a regulator in driver. regulator_set_voltage_time_sel() will give preference to constraints->ramp_delay while reading ramp_delay rate for regulator. Similarly users should also take care accordingly while refering ramp_delay rate(in case of implementing their private .set_voltage_time_sel() callbacks for different regulators). [Rewrote subject for 80 columns -- broonie] Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Convert wm831x_buckv_ops to set_voltage_sel and ↵Axel Lin2012-06-171-13/+8
| | | | | | | map_voltage Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Convert wm831x_buckp_ops to ↵Axel Lin2012-06-171-35/+9
| | | | | | | regulator_set_voltage_sel_regmap Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-ldo: Convert to regulator_set_voltage_sel_regmap and ↵Axel Lin2012-06-171-91/+38
| | | | | | | map_voltage Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab3100: Convert fixed voltage to use regulator_list_voltage_linearAxel Lin2012-06-171-11/+13
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: pcf50633: Convert to regulator_set_voltage_sel_regmap and map_voltageAxel Lin2012-06-171-14/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Remove min_uV and max_uV from struct ab8500_regulator_infoAxel Lin2012-06-171-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The min_uV and max_uV are not really used in the code and misleading because the min_uV and max_uV settings does not match the value in the voltage table. For example, we have static const unsigned int ldo_vaux3_voltages[] = { 1200000, 1500000, 1800000, 2100000, 2500000, 2750000, 2790000, 2910000, }; With below min_uV/max_uV settings for AB8500_LDO_AUX3. .min_uV = 1100000, .max_uV = 3300000, The min_uV/max_uV for AB8500_LDO_AUX3 seems copy-paste from AB8500_LDO_AUX2 and is wrong. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: ab8500: Use regulator_list_voltage_linear for ↵Axel Lin2012-06-171-32/+9
| | | | | | | | | | | ab8500_regulator_fixed_ops Also removes set_voltage_time_sel callback from ab8500_regulator_fixed_ops because the voltage won't change. ( And ab8500_regulator_fixed_ops does not implement get_voltage_sel so set_voltage_time_sel won't be called ) Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: mc13xxx: Convert to regulator_list_voltage_tableAxel Lin2012-06-174-70/+49
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: mc13xxx: Fix voltage checking for mc13xxx_fixed_regulator_set_voltageAxel Lin2012-06-171-2/+2
| | | | | | | | The voltage range checking should be to ensure mc13xxx_regulators[id].voltages[0] falls with min_uV and max_uV. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Simplify tps62360_set_voltage_time_sel implementationAxel Lin2012-06-171-10/+3
| | | | | | | | | | For linear mappings, we can use below equation to get the voltage difference between new_selector and old_selector: abs(new_selector - old_selector) * rdev->desc->uV_step Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Convert wm831x_buckp_ops to ↵Axel Lin2012-06-171-11/+4
| | | | | | | regulator_list_voltage_linear Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65023: Set n_voltages to 1 for fixed voltageAxel Lin2012-06-171-1/+4
| | | | | | | For fixed voltage, the n_voltages should be 1 rather than 0. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8350: Reuse map_voltage() to get selector of a given uVAxel Lin2012-06-171-77/+50
| | | | | | | | | | Reuse map_voltage() to get the selector of a given uV. Then we can remove wm8350_ldo_mvolts_to_val() and wm8350_dcdc_mvolts_to_val(). Also remove unused wm8350_dcdc_val_to_mvolts() function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8350: Use wm8350_ldo_list_voltage instead of open code to ↵Axel Lin2012-06-171-31/+21
| | | | | | | | | | | | | | | | | | verify selected voltage Call wm8350_ldo_list_voltage() instead of open code to verify selected voltage falls within specified range. Use wm8350_ldo_list_voltage() here is less error prone. wm8350_ldo_val_to_mvolts() is only used in wm8350_ldo_list_voltage now, so remove it and move the implementation to wm8350_ldo_list_voltage(). This patch also include below small changes in wm8350_ldo_map_voltage: 1. wm8350_ldo_map_voltage() returns selector, thus rename variable mV to sel. 2. Use DIV_ROUND_UP macro to calculate selector. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65217: Convert to regulator_[is_enabled|get_voltage_sel]_regmapAxel Lin2012-06-132-78/+42
| | | | | | | | | | | | | | | This patch converts .is_enabled and .get_voltage_sel to regulator_is_enabled_regmap and regulator_get_voltage_sel_regmap. For .enable, .disable, and .set_voltage_sel, the write protect level is either 1 or 2. So we cannot use regulator_[enable|disable|set_voltage_sel]_regmap. Now we store the enable reg/mask and vsel reg/mask in regulator_desc, so we can remove enable_mask, set_vout_reg, and set_vout_mask from struct tps_info. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8400: Adjust the equation for selector >= 15 in ↵Axel Lin2012-06-131-1/+1
| | | | | | | | | | | wm8400_ldo_list_voltage Adjust the equation for selector >= 15 for better readability. The equation "1700000 + ((selector - 15) * 100000)" can be interpreted by: Starting from selector 15: Steps of 100mV from 1700mV Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Replace set_voltage with set_voltage_selSangbeom Kim2012-06-131-24/+14
| | | | | | | | To apply delay time for voltage change, replace s5m8767_set_voltage with s5m8767_set_voltage_sel. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8400: Use wm8400_ldo_list_voltage instead of open code to ↵Axel Lin2012-06-131-15/+7
| | | | | | | | | | | verify selected voltage Call wm8400_ldo_list_voltage() instead of open code to verify selected voltage falls within specified range. Use wm8400_ldo_list_voltage() here is less error prone. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Remove s5m8767a buck initializationSangbeom Kim2012-06-131-3/+0
| | | | | | | As s5m8767a is revisioned, remove unnecessary buck 2,3,4 initialization routine. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8350: Add missing min_uV and uV_step settings for DCDC4Axel Lin2012-06-131-0/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: core: Return correct delay time in regulator_set_voltage_time_selAxel Lin2012-06-111-1/+1
| | | | | | | | | | rdev->desc->uV_step * abs(new_selector - old_selector) returns uV. The unit of ramp_delay is mV/us. Current code multiples 1000 at wrong place. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud