- 30 8月, 2015 3 次提交
-
-
由 kbuild test robot 提交于
drivers/regulator/mt6311-regulator.c:169:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
The driver has a I2C device id table that is used to create the modaliases and already contains a "ltc3589" device id. So the modalias is unnecessary. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
The driver has a I2C device id table that is used to create the modaliases and also "ad5398-regulator" is not a supported I2C id, so it's never used. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 8月, 2015 2 次提交
-
-
由 Javier Martinez Canillas 提交于
The driver has a I2C device id table that is used to create the modaliases and also "pfuze100-regulator" is not a supported I2C id, so is never used. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Archit Taneja 提交于
When calling regulator_set_load, regulator_check_drms prints and returns an error if the regulator device's flag REGULATOR_CHANGE_DRMS isn't set. drms_uA_update, however, bails out without reporting an error. Replace the error print with a debug level print so that we don't get such prints when the underlying regulator doesn't support DRMS. Signed-off-by: NArchit Taneja <architt@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 8月, 2015 3 次提交
-
-
由 Milo Kim 提交于
If memory allocation gets failed on parsing the DT, then it returns error '-ENOMEM' explicitly. Then, the driver exists from the _probe(). Signed-off-by: NMilo Kim <milo.kim@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Milo Kim 提交于
Currently, lp872x driver parses the DT and copies values into the 'cl->dev.platform_data' if 'of_node' exists. This may have architectural issue. Platform data is configurable through the DT or I2C board info inside the platform area. However, lp872x driver changes this configuration when it is loaded. The lp872x driver should get data from the platform side and use the private data, 'lp872x->pdata' instead of changing the original platform data. Signed-off-by: NMilo Kim <milo.kim@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
The I2C core always reports the MODALIAS uevent as "i2c:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: I2C id table or OF match table). So drivers needs to export the I2C id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. But this means that OF-only drivers needs to have both OF and I2C id tables that have to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. Which can lead to issues if two vendors use the same I2C device name for example. To avoid the above, the I2C core behavior may be changed in the future to not require an SPI device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table even when is unused now to prevent breaking module loading when the core changes. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 8月, 2015 1 次提交
-
-
由 Marek Szyprowski 提交于
MAX77693 based regulators are used by USB gadget subsystem, which doesn't support deferred probe, so the driver should be registered before USB gadget drivers get probed. Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 8月, 2015 1 次提交
-
-
由 Axel Lin 提交于
Just setting fixed_uV is not enough, the regulator core will also check n_voltages setting. The fixed_uV only works when n_voltages is 1. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 8月, 2015 2 次提交
-
-
由 Viresh Kumar 提交于
Use IS_ERR_OR_NULL() rather than open coding it. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bjorn Andersson 提交于
Driver for regulators exposed by the Resource Power Manager (RPM) found in devices based on Qualcomm 8974 and newer platforms. Signed-off-by: NBjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by: NAndy Gross <agross@codeaurora.org> Tested-by: NTim Bird <tim.bird@sonymobile.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 8月, 2015 1 次提交
-
-
由 Kishon Vijay Abraham I 提交于
regulator_disable of pbias always writes '0' to the enable_reg. However actual disable value of pbias regulator is not always '0'. Fix it by populating the disable_val in pbias_reg_info for the various platforms and assign it to the disable_val of pbias regulator descriptor. This will be used by regulator_disable_regmap while disabling pbias regulator. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 13 8月, 2015 1 次提交
-
-
由 Viresh Kumar 提交于
Trivial spell fix, s/succesfully/successfully. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 8月, 2015 3 次提交
-
-
由 Mark Brown 提交于
The regulator_list has exactly the same contents as the list that the driver core maintains of regulator_class members so is redundant. As a first step in converting over to use the class device list convert our iteration in late_initcall() to use the class device iterator. Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mark Brown 提交于
We really ought to be using the class dvice lifetime management features more than we are rather than open coding them so take a step towards that by moving some of the simplest deallocations to the dev_release() function. Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mark Brown 提交于
When we release a regulator we need to remove references to it from the rdev which means locking the rdev. Currently we also free resources associated with the regulator inside the rdev lock but there is no need to do this, we can reduce the region the lock is held by restricting it to just actions that affect the rdev. Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 8月, 2015 1 次提交
-
-
由 Mark Brown 提交于
When removing a regulator we hold regulator_list_mutex in order to ensure the regualtor doesn't become removed again. However we only need to protect the list until we remove the regulator from the list so move the unlock earlier to reduce the locked region. Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 8月, 2015 1 次提交
-
-
由 Ian Campbell 提交于
This allows the module to be autoloaded. Together with 07949bf9 ("cpufreq: dt: allow driver to boot automatically") this is sufficient to allow a modular kernel (such as Debian's) to enable cpufreq on a Cubietruck. Signed-off-by: NIan Campbell <ijc@hellion.org.uk> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 8月, 2015 2 次提交
-
-
由 Axel Lin 提交于
Make mt6311_buck_ops, mt6311_ldo_ops and mt6311_regulators const and remove unneeded error variable in mt6311_i2c_probe(). Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Henry Chen 提交于
The maximum voltage of buck should be 1.39375V. 1.39375V = 0.6V + 0.00625V * 127, 127 is the max_sel of linear range. Reported-by: NAxel Lin <axel.lin@ingics.com> signed-off-by: NHenry Chen <henryc.chen@mediatek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 8月, 2015 1 次提交
-
-
由 Javier Martinez Canillas 提交于
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 7月, 2015 1 次提交
-
-
由 Mikko Perttunen 提交于
Use regmap helpers for get_voltage_sel and set_voltage_sel ops if the DVS GPIO is not set. The DVS GPIO allows on the fly selection of the VSEL register from two choices. However, if it is not set, the VSEL register will stay fixed and we can use the regmap ops. This allows use of the *hardware_vsel* regulator APIs. Signed-off-by: NMikko Perttunen <mperttunen@nvidia.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 7月, 2015 2 次提交
-
-
由 Stephen Boyd 提交于
Add support for over current protection (OCP), pin control selection, soft start strength, and auto-mode. Cc: <devicetree@vger.kernel.org> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stephen Boyd 提交于
Some regulators can automatically shut down when they detect an over current event. Add an op (set_over_current_protection) and a DT property + constraint to support this capability. Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 7月, 2015 1 次提交
-
-
由 Henry Chen 提交于
Add regulator support for mt6311. It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage data to the driver, and creates the regulator_desc table. Supported operations for Buck are enabled/disabled and voltage change, only enabled/disabled for LDO. Signed-off-by: NHenry Chen <henryc.chen@mediatek.com> Reviewed-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 7月, 2015 1 次提交
-
-
由 Daniel Kurtz 提交于
of_regulator_match.driver_data is (void *). tps6586x uses it to store an anonymous enum value (those TPS6586X_ID_ values). Later, it tries to extract the ID by casting directly to an int, which is a no-no ([-Wpointer-to-int-cast]): drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_parse_regulator_dt': drivers/regulator/tps6586x-regulator.c:430:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] id = (int)tps6586x_matches[i].driver_data; ^ Instead of casting to int, uintptr_t is better suited for receiving and comparing integers extracted from void *. This is especially true on 64-bit systems where sizeof(void *) != sizeof(int). Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 7月, 2015 2 次提交
-
-
由 Uwe Kleine-König 提交于
The gpiod functions include variants for managed gpiod resources. Use it to simplify the remove function. As the driver handles a device node without a specification of dvs gpios just fine, additionally use the variant of gpiod_get exactly for this use case. This makes error checking more strict. As a third benefit this patch makes the driver use the flags parameter of gpiod_get* which will not be optional any more after 4.2 and so prevents a build failure when the respective gpiod commit is merged. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Uwe Kleine-König 提交于
This fixes a build problem on mips found by the kbuild test robot: drivers/regulator/rk808-regulator.c: In function 'rk808_buck1_2_get_voltage_sel_regmap': drivers/regulator/rk808-regulator.c:97:2: error: implicit declaration of function 'gpiod_get_value' [-Werror=implicit-function-declaration] if (IS_ERR(gpio) || gpiod_get_value(gpio) == 0) ^ Fixes: bad47ad2 ("regulator: rk808: fixed the overshoot when adjust voltage") Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 7月, 2015 1 次提交
-
-
由 Chris Zhong 提交于
There is a overshoot in DCDC1/DCDC2, we have 2 method to workaround: 1st is use dvs pin to switch the voltage between value in BUCKn_ON_VSEL and BUCKn_DVS_VSEL. If DVS pin is inactive, the voltage of DCDC1/DCDC2 are controlled by BUCKn_ON_VSEL, when we pull dvs1/dvs2 pin to active, they would be controlled by BUCKn_DVS_VSEL. In this case, the ramp rate is same as the value programmed in BUCKn_RATE, and the fastest rate is 10mv/us. 2nd method is gradual adjustment, adjust the voltage to a target value step by step via i2c, each step is set to 100 mA. If you write the voltage directly using an i2c write the rk808 will always ramp as fast as it possibly can, about 100mv/us. Signed-off-by: NChris Zhong <zyw@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 7月, 2015 10 次提交
-
-
由 Krzysztof Kozlowski 提交于
The max77693 regulator driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
The charger and safeout parts of MAX77843 are almost the same as MAX77693. From regulator point of view the only differences are the constraints and register values related to these constraints. Now the max77693 regulator driver can be used for MAX77843 device. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
This prepares for merging some of the drivers between max77693 and max77843 so the child MFD driver can be attached to any parent MFD main driver. Move the state container to common header file. Additionally add consistent 'i2c' prefixes to its members (of 'struct i2c_client' type). Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: NSebastian Reichel <sre@kernel.org> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Add support for different configurations of charger's registers so the same driver could be used on other devices (e.g. MAX77843). Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
The regulator_resolve_supply() function calls set_supply() which in turn calls create_regulator() to allocate a supply regulator. If an error occurs after set_supply() succeeded, the allocated regulator has to be freed before propagating the error code. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
When a regulator is unregistered with regulator_unregister(), a call to regulator_put() is made for its input supply if there is one. This does a module_put() to decrement the refcount of the module that owns the supply but there isn't a corresponding try_module_get() in set_supply() to make the calls balanced. Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Vaibhav Hiremath 提交于
This patch is add regulator_nodes/of_match in the regulator descriptor for using information from DT instead of specific codes. With this patch, driver gets simplified, - No need to maintain "struct of_regulator_match" table and call of_regulator_match() fn. - No need for pm800_regulator_dt_init() fn, as it was only used for of_regulator_match(). - probe() fn got simplified around regulator_config and regulator_desc initialization. Signed-off-by: NVaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Vaibhav Hiremath 提交于
This patch replaces standard regulator_register with devm_regulator_register() fn, as using devm_regulator_register() fn simplifies the driver return/exit path. As part of this update, patch also cleanups up all unnecessary changes which is result of this patch - - Remove _remove() fn, as devm_ variant takes care of it. - Remove pm800_regulators.regulators[] field, as it was only needed during cleanup, so we no longer need this. This also saved some amount of memory. Signed-off-by: NVaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Vaibhav Hiremath 提交于
This patch makes code more clean from readability point of view, make all assignments of LDO, BUCk and regulator_ops structure at the same indentation. Signed-off-by: NVaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-