- Oct 28, 2010
-
-
Lukasz Majewski authored
max8998_pmic_probe: - modified to check if valid pins are defined at platform data - maximal voltage values (predefined at platform data) are uploaded to max8998 device max8998_set_voltage_buck: - BUCK1/2 voltages change between values already defined - Checks if valid GPIO pins are passed from platform data - If requested voltage cannot be satisfied from already defined values, then one of free slots is used - Predefined maximum voltages (as defined at platform data) are always available Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Lukasz Majewski authored
BUCK1/2 internal voltages and indexes defined in the struct max8998_data max_get_voltage_register now uses index values to chose proper register More generic BUCK1/2 registers names provided Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Lukasz Majewski authored
Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Mattias Wallin authored
This patch makes the ab8500 mixed signal chip expose the same interface for register access as the ab3100, ab3550 and ab5500 chip. The ab8500_read() and ab8500_write() is removed and replaced with abx500_get_register_interruptible() and abx500_set_register_interruptible(). Signed-off-by:
Mattias Wallin <mattias.wallin@stericsson.com> Acked-by:
Linus Walleij <linus.walleij@stericsson.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Joonyoung Shim authored
The MAX8998 chip have regulator and rtc features. The i2c slave address of regulator and rtc is different, so needs each i2c client on i2c operation functions. Also, this patch exports i2c operation functions instead of callback to make easy to read. Signed-off-by:
Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Samuel Ortiz <sameo@linux.intel.com>
-
Axel Lin authored
In current implementation, vid is declared as u8, then "vid == -1" is always false, and "vid >= 0" is always true. Thus change it to s8. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Anand Gadiyar authored
Commit f03f91826 (regulator: Add option for machine drivers to enable the dummy regulator) in the regulators tree seems to have introduced the following build break when CONFIG_REGULATOR_DUMMY is disabled. Fix this. CC drivers/regulator/dummy.o drivers/regulator/dummy.c:41: error: redefinition of 'regulator_dummy_init' drivers/regulator/dummy.h:28: note: previous definition of 'regulator_dummy_init' was here make[2]: *** [drivers/regulator/dummy.o] Error 1 make[1]: *** [drivers/regulator] Error 2 make: *** [drivers] Error 2 Signed-off-by:
Anand Gadiyar <gadiyar@ti.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Randy Dunlap <randy.dunlap@oracle.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Jeffrey Carlyle authored
I have a regulator A that sets regulator B as its supply. When I call set_supply to add B as the supply for A, regulator A gets added to the supply_list for regulator B. When I call regulator_disable(A), I end up with a call chain like this: regulator_disable(A) > mutex_lock(A) > _regulator_disable(A) >> _regulator_disable(B) >>> _notifier_call_chain(B) >>>> mutex_lock(A) Which results in dead lock since we are trying to acquire the mutex lock for regulator A which we already hold. This patch addresses this issue by moving the call to disable regulator B outside of the lock aquired inside the initial call to regulator_disable. This change also addresses the issue of not acquiring the mutex for regulator B before calling _regulator_disable(B). Signed-off-by:
Jeffrey Carlyle <jeff.carlyle@motorola.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Mark Brown authored
Allow machine drivers to explicitly enable the use of the dummy regulator, enabling simpler support for systems with only a few specific supplies visible to software. It is strongly recommended that this is not used on systems with substantial software control over their PMICs, for maximum functionality constrints should be as fully specified as possible. Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
This patch includes below fixes based on Mark's comment. - Return actual error if i2c_smbus_read_byte_data() fail - Add spaces around bitwise AND operator(&) to improve readability - Add comment to explain why we need to update voltage change control register for LDO1 and LDO5 - Logging the value for diagnostics if chip reported incorrect voltage value - Add __devinit annotation for setup_regulators() - Show system control register1 value if the value is mismatched - Logging the value for diagnostics if failed to detect device Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
This patch adds regulator drivers for National Semiconductors LP3972 PMIC. This LP3972 PMIC controller has 3 DC/DC voltage converters and 5 low drop-out (LDO) regulators. LP3972 PMIC controller uses I2C interface. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
MyungJoo Ham authored
MAX8952 PMIC is used to provide voltage output between 770mV - 1400mV with DVS support. In this initial release, users can set voltages for four DVS modes, RAMP delay values, and SYNC frequency. Controlling FPWM/SYNC_MODE/Pull-Down/Ramp Modes and reading CHIP_ID is not supported in this release. If GPIO of EN is not valid in platform data, the driver assumes that it is always-on. If GPIO of VID0 or VID1 is invalid, the driver pulls down VID0 and VID1 to fix DVS mode as 0 and disables DVS support. We assume that V_OUT is capable to provide every voltage from 770mV to 1.40V in 10mV steps although the data sheet has some ambiguity on it. Signed-off-by:
MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> -- v2: - Style correction - Can accept platform_data with invalid GPIOs - Removed unnecessary features - Improved error handling Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
- Oct 02, 2010
-
-
Axel Lin authored
The SYNC bits are BIT6 and BIT7 of MAX8649_SYNC register. pdata->extclk_freq could be [0|1|2]. (MAX8649_EXTCLK_26MHZ|MAX8649_EXTCLK_13MHZ|MAX8649_EXTCLK_19MHZ) It requires to left shift 6 bits to properly set extclk_freq. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Cyril Chemparathy authored
This patch fixes a typo that incorrectly reports mA numbers as uA. Signed-off-by:
Cyril Chemparathy <cyril@ti.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Vasiliy Kulikov authored
If device_register() fails then call put_device(). See comment to device_register. Signed-off-by:
Vasiliy Kulikov <segooon@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
- Sep 30, 2010
-
-
Wolfram Sang authored
A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit. This is obsolete meanwhile, so fix it and hope the word will spread. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Sep 06, 2010
-
-
Axel Lin authored
In wm8350_dcdc_set_mode(), we set DCx_SLEEP bit of WM8350_DCDC_SLEEP_OPTIONS register for REGULATOR_MODE_STANDBY mode. ( DCx_SLEEP bits: 0: Normal DC-DC operation 1: Select LDO mode ) In wm8350_dcdc_get_mode(), current logic to determinate REGULATOR_MODE_STANDBY mode is just reverse. ( sleep is set should mean REGULATOR_MODE_STANDBY mode. ) Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
Problem description in current implementation: When setting REGULATOR_MODE_IDLE mode, current implementation set WM831X_LDO1_LP_MODE bit of ctrl_reg (which is wrong, it should clear the bit). But due to a missing break statement for case REGULATOR_MODE_IDLE, the code fall through to case REGULATOR_MODE_STANDBY and then clear WM831X_LDO1_LP_MODE bit. So it still looks OK when checking the status by wm831x_gp_ldo_get_mode(). When setting REGULATOR_MODE_STANDBY mode, it just does not work. wm831x_gp_ldo_get_mode() will still return REGULATOR_MODE_IDLE because the accordingly WM831X_LDO1_LP_MODE bit is clear. Correct behavior should be: Clear WM831X_LDO1_LP_MODE bit of ctrl_reg for REGULATOR_MODE_IDLE mode. Set WM831X_LDO1_LP_MODE bit of ctrl_reg for REGULATOR_MODE_STANDBY mode. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
- Sep 05, 2010
-
-
Axel Lin authored
selector is used as array index of info->supported_voltages Thus the valid value range should be 0 .. info->voltages_len -1 Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@openource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In choose_voltage(), we use i as array index of info->vol_table. The valid value range for i should be 0 .. ARRAY_SIZE(info->vol_table) - 1. Take LDO1 as example, ARRAY_SIZE(LDO1_table) is 4, vol_nbits of LDO1 is 2. for (i = 0; i < (2 << info->vol_nbits); i++) is equivalent to for (i = 0; i < 8; i++) which is wrong. The same value range checking also applies for index in pm8607_list_voltage(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@openource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
- Sep 01, 2010
-
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In current implementation, the address return from regulator_register() is different from the address for regulator_unregister(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Sonic Zhang <sonic.zhang@analog.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
max8998->dev is NULL in current implementation, set it to &pdev->dev. regulator_register() still return success if max8998->dev is NULL, but rdev->dev.parent will be set to NULL which is incorrect. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
The third parameter of tps6586x_set_bits() is the bit_mask, thus we should use (1 << ri->go_bit) instead of ri->go_bit. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
val is used as array index of ri->voltages. Thus the valid value range should be 0 .. ri->desc.n_voltages - 1. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
Set max8998->num_regulators = pdata->num_regulators, otherwise it's default value is 0. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
We only use max8998->rdev[0] .. max8998->rdev[pdata->num_regulators-1], max8998->rdev[pdata->num_regulators] is not used. Thus fix the memory allocation size. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
This driver is a platform driver, not a i2c driver. Thus remove incorrect tps6507x_remove comments. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
A little bit improvement in the logic of choosing selector. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In current implementation, ab8500_regulator_info[0].regulator is not unregistered if the error happen at i > 0. This patch fixes the resource leak and also improves the readability. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Linus Walleij <linus.walleij@stericsson.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In current implementation, ab3100_regulators[0].rdev is not unregistered if the error happen at i > 0. This patch fixes the resource leak and also improves the readability. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Linus Walleij <linus.walleij@stericsson.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Dan Carpenter authored
I moved the dereference of "ab8500" below the check for NULL. Signed-off-by:
Dan Carpenter <error27@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
- Aug 11, 2010
-
-
Mark Brown authored
Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Mike Rapoport <mike@compulab.co.il> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
We should call platform_set_drvdata() before calling platform_get_drvdata(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mike Rapoport <mike@compulab.co.il> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
i2c_smbus_write_byte_data() returns zero or negative value, therefore no need to check if ret is greater than zero or not. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In max8660_probe(), we allocate memory for max660. In max8660_remove(), current implementation only free rdev which is a member of struct max8660. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max660 to i2c clientdata, and properly kfree(max8660) in max8660_remove(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Axel Lin authored
In max1586_pmic_probe(), we allocate memory for max1586. In max1586_pmic_remove(), current implementation only free rdev which is a member of struct max1586_data. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max1586 to i2c clientdata, and properly kfree(max1586) in max1586_pmic_remove(). Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by:
Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-
Joonyoung Shim authored
This ensures that if the GPIO was not enabled prior to the driver starting the regulator API will insert the required powerup ramp delay when it enables the regulator. The gpiolib API does not provide this information. [Rewrote changelog to describe the actual change -- broonie.] Signed-off-by:
Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by:
Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org Signed-off-by:
Liam Girdwood <lrg@slimlogic.co.uk>
-