aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77650-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-04regulator: max77650: use vsel_stepBartosz Golaszewski1-64/+9
Use the new vsel_step field in the regulator description to instruct the regulator API on the required voltage ramping. Switch to using the generic regmap helpers for voltage setting and remove the old set_voltage callback that handcoded the selector stepping. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20190703161035.31808-3-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-03regulator: max77650: add MODULE_ALIAS()Bartosz Golaszewski1-0/+1
Define a MODULE_ALIAS() in the regulator sub-driver for max77650 so that the appropriate module gets loaded together with the core mfd driver. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20190703084849.9668-1-brgl@bgdev.pl Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-23regulator: max77650: Move max77651_SBB1_desc's declaration downNathan Chancellor1-2/+2
Clang warns: drivers/regulator/max77650-regulator.c:32:39: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct max77650_regulator_desc' [-Wtentative-definition-incomplete-type] static struct max77650_regulator_desc max77651_SBB1_desc; ^ drivers/regulator/max77650-regulator.c:32:15: note: forward declaration of 'struct max77650_regulator_desc' static struct max77650_regulator_desc max77651_SBB1_desc; ^ 1 warning generated. Move max77651_SBB1_desc's declaration below max77650_regulator_desc's definition so this warning does not happen. Fixes: 3df4235ac41c ("regulator: max77650: Convert MAX77651 SBB1 to pickable linear range") Link: https://github.com/ClangBuiltLinux/linux/issues/491 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-08regulator: max77650: Convert MAX77651 SBB1 to pickable linear rangeAxel Lin1-89/+45
The pickable linear range is suitable for The MAX77651 SBB1. According to MAX77651 TV_SBB1 Code Table: Use BIT[1:0] as range selectors. Use BIT[5:2] as selectors for each linear range. The MAX77651 SBB1 supports up to selector 57, selector 58 ~ 63 are RSVD, thus set n_voltage to 58. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-18regulator: max77650: Use unsigned int for max77651_sbb1_regulator_volt_tableAxel Lin1-1/+1
Make it consistent as .volt_table should be const unsigned int *. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-03regulator: max77650: Convert to use regulator_set/get_current_limit_regmapAxel Lin1-49/+25
Use regulator_set/get_current_limit_regmap helpers to save some code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-22regulator: max77650: Fix set_current_limit implementationAxel Lin1-4/+2
Current code always return error, fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-20regulator: max77650: Add missing .owner field in regulator_descAxel Lin1-0/+6
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-30regulator: max77650: Fix include filesAxel Lin1-1/+1
This is a platform driver, no need to include linux/i2c.h. Include linux/of.h for of_match_ptr. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-29regulator: max77650: add regulator supportBartosz Golaszewski1-0/+518
Add regulator support for max77650. We support all four variants of this PMIC including non-linear voltage table for max77651 SBB1 rail. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>