- 01 9月, 2013 1 次提交
-
-
由 Axel Lin 提交于
da9063_ldo_lim_event() is only referenced in this driver, make it static. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 8月, 2013 7 次提交
-
-
由 Axel Lin 提交于
lp872x regulator driver can be built a module after commit 631a1fc4 "regulator: build: Allow most regulators to be built as modules". Make REGULATOR_LP872X depend on I2C to allow building lp872x module when I2C=m. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Below is the equation in original code: tps65217_uv1_ranges: 0 ... 24: uV = vsel * 25000 + 900000; 25 ... 52: uV = (vsel - 24) * 50000 + 1500000; = (vsel - 25) * 50000 + 1550000; 53 ... 55: uV = (vsel - 52) * 100000 + 2900000; = (vsel - 53) * 100000 + 3000000; 56 ... 62: uV = 3300000; tps65217_uv2_ranges: 0 ... 8: uV = vsel * 50000 + 1500000; 9 ... 13: uV = (vsel - 8) * 100000 + 1900000; = (vsel - 9) * 100000 + 2000000; 14 ... 31: uV = (vsel - 13) * 50000 + 2400000; = (vsel - 14) * 50000 + 2450000; The voltage tables are composed of linear ranges. This patch converts this driver to use multiple linear ranges APIs. In original code, voltage range for DCDC1 is 900000 ~ 1800000 and voltage range for DCDC3 is 900000 ~ 1500000. This patch separates the range 25~52 in tps65217_uv1_ranges table to two linear ranges: 25~30 and 31~52. This change makes it possible to reuse the same linear_ranges table for DCDCx. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
regulator_register() does not return NULL, it returns ERR_PTR on error. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
All the current limit tables have the values in ascend order. So we can slightly optimize the for loop iteration because the first match is the minimal value. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Mostly for testing without bloating the kernel image rather than actual utility. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Matthias Kaehlcke 提交于
Add a resource managed regulator_get_exclusive() Signed-off-by: NMatthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krystian Garbaciak 提交于
The driver adds support for the following DA9063 PMIC regulators: - 11x LDOs (named LDO1 - LDO11), - 6x buck converters (BCORE1, BCORE2, BPRO, BMEM, BIO, BPERI), Regulators provide following operations: - REGULATOR_CHANGE_STATUS and REGULATOR_CHANGE_VOLTAGE for all regulators, - REGULATOR_CHANGE_MODE for LDOs and buck converters, where: - LDOs allow REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY, - buck converters allow REGULATOR_MODE_FAST, REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY, - REGULATOR_CHANGE_CURRENT for buck converters (current limits). The driver generates REGULATOR_EVENT_OVER_CURRENT for LDO3, LDO4, LDO7, LDO8 and LDO11. Internally, PMIC provides two voltage configurations for normal and suspend system state for each regulator. The driver switches between those on suspend/wake-up to provide quick and fluent output voltage change. This driver requires MFD core driver for operation. Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 8月, 2013 1 次提交
-
-
由 Julia Lawall 提交于
Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,e,e1; expression ret != 0; identifier l; @@ res = platform_get_resource_byname(...); - if (res == NULL) { ... \(goto l;\|return ret;\) } e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 8月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Just for neatness. Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 8月, 2013 1 次提交
-
-
由 Dan Carpenter 提交于
This is supposed to be testing "i < ARRAY_SIZE()" instead of just "ARRAY_SIZE()". Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 13 8月, 2013 4 次提交
-
-
由 Axel Lin 提交于
The modalias is set by the MODULE_DEVICE_TABLE, thus remove redundant MODULE_ALIAS. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
The code to check whether num_regulator is valid is wrong because it should iterate all array entries rather than break from the for loop if pdata->regulators[i] is NULL. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Current code has wrong mask and val arguments for updating ramp_delay. Fix it. Also ensure the return value of get_ramp_delay() won't greater than 3 because the mask field for ramp_val only takes 2 bits. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Current code calls regmap_update_bits() with mask and val arguments swapped. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 12 8月, 2013 1 次提交
-
-
由 Kishon Vijay Abraham I 提交于
SMPS10 has two outputs OUT1 and OUT2 and have one input IN1. SMPS10-OUT2 is connected to SMPS10-IN1 and can be configured either in BOOST mode or BYPASS mode. regulator_enable of SMPS10-OUT2 configures it in BOOST mode. For BYPASS mode regulator_allow_bypass() API can be used. SMPS10-OUT1 is connected to SMPS10-OUT2 and can be enabled using regulator_enable(). [ axel.lin@ingics.com : Simplify regulator_desc setting for SMPS10_[OUT1|OUT2] Signed-off-by: NJ Keerthy <j-keerthy@ti.com> Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 8月, 2013 1 次提交
-
-
由 Axel Lin 提交于
Move regulator_list_voltage_{linear,linear_range,table} helper functions to helpers.c. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 08 8月, 2013 1 次提交
-
-
由 Daniel Mack 提交于
Fix a build warning for !CONFIG_OF and a cast from void* to unsigned int which is invalid on 64bit machines. Signed-off-by: NDaniel Mack <zonque@gmail.com> Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 8月, 2013 2 次提交
-
-
由 Mark Brown 提交于
Reduce the size of core.c a bit. Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Steve Twiss 提交于
I2C driver for the Dialog DA9210 Multi-phase 12A DC-DC Buck. Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: NDavid Dajun Chen <david.chen@diasemi.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 8月, 2013 1 次提交
-
-
由 Daniel Mack 提交于
This patch adds devicetree bindings for max8660, along with some documentation. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 8月, 2013 3 次提交
-
-
由 Axel Lin 提交于
max_register should be register count - 1. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NRobin Gong <b38343@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Daniel Mack 提交于
No functional change, just makes the code shorter. [Resolved conflict with platdata patch -- broonie] Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Daniel Mack 提交于
Introduce an enum and denote the device type via struct i2c_id's driver_data field rather than comparing strings. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 8月, 2013 1 次提交
-
-
由 Axel Lin 提交于
Simplify the equation to calculate ramp_delay. Below equations are equivalent: ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 50000 / (4 * ramp_delay); ramp_delay = 25000 / (2 * ramp_delay); ramp_delay = 12500 / ramp_delay; So we don't need to read BIT6 of rdev->desc->vsel_reg for applying different equations. Also use rdev->desc->vsel_reg instead of run-time calculate register address. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NRobin Gong <b38343@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 31 7月, 2013 1 次提交
-
-
由 Mark Brown 提交于
While the majority of supplies on devices are mandatory and can't be physically omitted for electrical reasons some devices do have optional supplies and need to know if they are missing, MMC being the most common of these. Currently the core accurately reports all errors when regulators are requested since it does not know if the supply is one that must be provided even if by a regulator software does not know about or if it is one that may genuinely be disconnected. In order to allow this behaviour to be changed and stub regulators to be provided in the former case add a new regulator request function regulator_get_optional() which provides a hint to the core that the regulator may genuinely not be connected. Currently the implementation is identical to the current behaviour, future patches will add support in the core for returning stub regulators in the case where normal regulator_get() fails and the board has requested it. Signed-off-by: NMark Brown <broonie@linaro.org> Acked-by: NChris Ball <cjb@laptop.org>
-
- 30 7月, 2013 2 次提交
-
-
由 Jingoo Han 提交于
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Current code adjust min_uV and uV_step but missed adjusting the n_voltages setting. When BIT6 is clear: n_voltages = (1975000 - 400000) / 25000 + 1 = 64 When BIT6 is set: n_voltages = (3300000 - 800000) / 50000 + 1 = 51 The n_voltages needs update because when BIT6 is set 0x73 ~ 0x7f are reserved. When using regulator_list_voltage_linear, the n_voltages does matter here because wrong n_voltages setting make the equation return wrong result. e.g. if selector is 63, regulator_list_voltage_linear returns 800000 + (50000 * 63) = 4000000 It should return -EINVAL if the selector is in the range of 51 ~ 63. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 29 7月, 2013 5 次提交
-
-
由 Axel Lin 提交于
All table based voltage list have ascendant order. Use regulator_map_voltage_ascend for them. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
i2c drivers use "i2c:" prefix for module alias. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Since this is a i2c driver, use i2c_[set|get]_clientdata instead of dev_[set|get]_drvdata. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
This fixes below build errors: CC [M] drivers/regulator/pfuze100-regulator.o drivers/regulator/pfuze100-regulator.c:342:21: error: variable 'pfuze_regmap_config' has initializer but incomplete type drivers/regulator/pfuze100-regulator.c:343:2: error: unknown field 'reg_bits' specified in initializer drivers/regulator/pfuze100-regulator.c:343:2: warning: excess elements in struct initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:343:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default] drivers/regulator/pfuze100-regulator.c:344:2: error: unknown field 'val_bits' specified in initializer drivers/regulator/pfuze100-regulator.c:344:2: warning: excess elements in struct initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:344:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default] drivers/regulator/pfuze100-regulator.c:345:2: error: unknown field 'max_register' specified in initializer drivers/regulator/pfuze100-regulator.c:345:2: warning: excess elements in struct initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:345:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default] drivers/regulator/pfuze100-regulator.c:346:2: error: unknown field 'cache_type' specified in initializer drivers/regulator/pfuze100-regulator.c:346:2: warning: excess elements in struct initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:346:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default] drivers/regulator/pfuze100-regulator.c: In function 'pfuze100_regulator_probe': drivers/regulator/pfuze100-regulator.c:370:2: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration] drivers/regulator/pfuze100-regulator.c:370:21: warning: assignment makes pointer from integer without a cast [enabled by default] cc1: some warnings being treated as errors make[2]: *** [drivers/regulator/pfuze100-regulator.o] Error 1 make[1]: *** [drivers/regulator] Error 2 make: *** [drivers] Error 2 Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Robin Gong 提交于
Fix building error on x86_64 and i386: WARNING: modpost: missing MODULE_LICENSE() in drivers/regulator/pfuze100-regulator.o Signed-off-by: NRobin Gong <b38343@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 28 7月, 2013 1 次提交
-
-
由 Axel Lin 提交于
The voltage table of da9034 LDO12 is: 1700000, 1750000, 1800000, 1850000, 1900000, 1950000, 2000000, 2050000 2700000, 2750000, 2800000, 2850000, 2900000, 2950000, 3000000, 3050000 The voltage table is composed of two linear ranges: for selector 0 ... 7: volt = 1700000 + 50000 * selector for selector: 8 ... 15: volt = 2700000 + 50000 * (selector - 8) This patch converts da9034 LDO12 to use newly introduced helpers for multiple linear ranges. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 27 7月, 2013 1 次提交
-
-
由 Robin Gong 提交于
fix building warning and correct the binding doc Signed-off-by: NRobin Gong <b38343@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 25 7月, 2013 2 次提交
-
-
由 Robin Gong 提交于
Add pfuze100 regulator driver. Signed-off-by: NRobin Gong <b38343@freescale.com> Tested-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Greg Kroah-Hartman 提交于
The dev_attrs field of struct class is going away soon, dev_groups should be used instead. This converts the regulator class code to use the correct field. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 7月, 2013 2 次提交
-
-
由 Axel Lin 提交于
The ldo voltage table is composed of linear ranges. Below is the equation in original code (tps65912_vsel_to_uv_ldo): 0 ... 32: uv = vsel * 25000 + 800000; 33 ... 60: uv = (vsel - 32) * 50000 + 1600000; = (vsel -33) * 50000 + 1650000; 61 ...63: uv = (vsel - 60) * 100000 + 3000000; = (vsel - 61) * 100000 + 3100000; This patch converts tps65912_ops_ldo to use multiple linear ranges APIs. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
The SD, ALDO, and DLDO vlotage tables are composed of linear ranges. This patch converts as3711 to use newly introduced helpers for multiple linear ranges. Below is the voltage table on datasheet: SD: 00h: DC/DC powered down 01h-40h: Volt = 0.6V + sdx_vsel * 12.5mV 41h-70h: Volt = 1.4V + (sdx_vsel - 40h) * 25mV 71h-7Fh: Volt = 2.6V + (sdx_vsel - 70h) * 50mV ALDO: 0h-0Fh: 1.2V + ldox_vsel * 50mV 10h-1Fh: 1.8V + (ldox_vsel - 10h) * 100mV DLDO: 00h-10h: Volt = 0.9V + ldox_vsel * 50mV 11h-1fh: Do not use 20h-3fh: Volt = 1.75V + (ldox_vsel - 20h) * 50mV Note, when convert to use linear ranges APIs, the equation for SD needs below adjustment because the linear ranges APIs wiil substract range->min_sel when apply the equation. SD ( the equation to be used with linear ranges APIs ) 01h-40h: Volt = 0.6125V + (sdx_vsel - 1h) * 12.5mV 41h-70h: Volt = 1.425V + (sdx_vsel - 41h) * 25mV 71h-7Fh: Volt = 2.650V + (sdx_vsel - 71h) * 50mV Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 20 7月, 2013 1 次提交
-
-
由 Axel Lin 提交于
Some regulator APIs are broken if n_voltages setting is not set. e.g. regulator_count_voltages(), regulator_list_voltage(), and regulator_can_change_voltage() do not work if n_voltages setting is missing. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-