Age | Commit message (Collapse) | Author | Files | Lines |
|
The palmas_smps_ramp_delay array should never modify, make it const.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>;
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.1
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
By setting curr_table, n_current_limits, csel_reg and csel_mask, the
regmap users can use regulator_set_current_limit_regmap and
regulator_get_current_limit_regmap for set/get_current_limit callbacks.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The csel_reg and csel_mask fields in struct regulator_desc needs to
be generic for drivers. Not just for TPS65218.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add support for suspend/resume and runtime PM to stm32-vrefbuf driver.
Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The *i2c and *i2c_8606 are no longer used since this driver was converted
to use regmap helpers. The *chip and *regulator are not really required.
So remove these unused fields.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Set volt_table filed then we can use regulator_list_voltage_table.
Since we have volt_table setting, now we can remove vol_table from
struct pm8607_regulator_info.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
They should never change, make them const.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
This driver uses regulator_get/set_voltage_sel_regmap so it does not use
vsel_shift. Actually, vsel_shift can be calculated by vsel_mask setting.
Signed-off-by: Axel Lin <[email protected]>
Tested-by: Tony Lindgren <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
LS3 has a selectable current limit.
Change units to microamp in the example.
Signed-off-by: Christian Hohnstaedt <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Document device-tree settings of the load-switch LS2
in the tps65218 device.
Signed-off-by: Christian Hohnstaedt <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct foo {
int stuff;
struct boo entry[];
};
size = sizeof(struct foo) + count * sizeof(struct boo);
instance = alloc(size, GFP_KERNEL)
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = alloc(struct_size(instance, entry, count), GFP_KERNEL)
Notice that, in this case, variable size is not necessary, hence it is
removed.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The module version is unlikely to be updated, use kernel version should be
enough.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Current code does not really avoid array access out of bounds,
fix it by add checking for pdata->slew_rate.
If pdata->slew_rate is too big, it's a bug in pdata that needs fix.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Setup .vsel_reg and .vsel_mask then we can use the standard
set/get_voltage_sel_regmap helpers to simplify the code.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The wm831x_dcdc_ilim entries needs to be uA because it is used to compare
with min_uA and max_uA.
While at it also make the array const and change to use unsigned int.
Fixes: e4ee831f949a ("regulator: Add WM831x DC-DC buck convertor support")
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:
struct foo {
int stuff;
struct boo entry[];
};
size = sizeof(struct foo) + count * sizeof(struct boo);
instance = alloc(size, GFP_KERNEL)
Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:
instance = alloc(struct_size(instance, entry, count), GFP_KERNEL)
Notice that, in this case, variable size is not necessary, hence it is
removed.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Current code already set .min_uV and .uV_step fields and it actually can
use regulator_list_voltage_linear.
So remove buck_volt_range and use regulator_list_voltage_linear instead.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Current code always return error, fix it.
Signed-off-by: Axel Lin <[email protected]>
Reviewed-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Re-use the "tps65218_pmic_*_current_limit()" functions of LS3
and calculate the different required bit-shift by counting the
trailing 0s in "struct regulator_desc.csel_mask"
Signed-off-by: Christian Hohnstaedt <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Axel Lin <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The s5m8767_opmode_reg should never change, make it const.
Signed-off-by: Axel Lin <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
When REGULATOR_CHANGE_DRMS is not set, drms_uA_update is a no-op.
It used to print a debug message, which was dropped in commit
8a34e979f684 ("regulator: refactor valid_ops_mask checking code")
Let's bring the debug message back, because it helps find missing
regulator-allow-set-load properties.
Signed-off-by: Marc Gonzalez <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The lp873x_buck_ramp_delay should never change, make it const.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Some contributions appears as Mathieu Othacehe and other as Mathieu
OTHACEHE.
Signed-off-by: Mathieu Othacehe <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
The FAN53526 differs from the FAN53555 only in that the mode bit in
VSEL0/VSEL1 is moved to the CONTROL register, the voltage selector mask
is extended by 1 bit and the step is different.
So extend the existing fan53555 driver to support FAN53526 as well.
Signed-off-by: Bjorn Andersson <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Use linear range to replace the twl6030ldo_list_voltage implementation.
With this change, the min_mV is not used and can be removed from
struct twlreg_info.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add missing .owner field in regulator_desc, which is used for refcounting.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add missing .owner field in regulator_desc, which is used for refcounting.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
- Fix list of valid LS3 currents from mA to µA
- Fix selection of min/max microAmps of LS3.
Selecting one of the configured values as max value now really
selects it instead of the next lower one
Signed-off-by: Christian Hohnstaedt <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Currently rdev is dereferenced when assigning desc before rdev is null
checked, this is leading to static analysis warnings. However, rdev
can never be null, so the null check is redundant and can be removed.
Detected by CoverityScan, CID#1476031 ("Dereference before null check")
Fixes: 77e3e3b165db ("regulator: axp20x: add software based soft_start for AXP209 LDO3")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
set_current_limit
Selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
set_current_limit
Selecting the minimal value is only true for voltage regulators.
For current regulators the maximum in the given range should be
selected instead.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix off-by-one while iterating current_limits array.
The valid index should be 0 ~ n_current_limits -1.
Fixes: c90456e36d9c ("regulator: pv88090: new regulator driver")
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix off-by-one while iterating current_limits array.
The valid index should be 0 ~ n_current_limits -1.
Fixes: 99cf3af5e2d5 ("regulator: pv88080: new regulator driver")
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Fix off-by-one while iterating current_limits array.
The valid index should be 0 ~ n_current_limits -1.
Fixes: f307a7e9b7af ("regulator: pv88060: new regulator driver")
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
|
|
Change buck1 voltage range to be conform with the data-sheet.
Signed-off-by: pascal paillet <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add support for active discharge for USB power switches.
Signed-off-by: pascal paillet <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|
|
Add support for active discharge for USB power switches.
Signed-off-by: pascal paillet <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
|