All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: bd71828: remove get_voltage operation
@ 2019-12-19 11:34 Matti Vaittinen
  2019-12-20 13:09 ` Applied "regulator: bd71828: remove get_voltage operation" to the regulator tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Matti Vaittinen @ 2019-12-19 11:34 UTC (permalink / raw)
  To: matti.vaittinen, mazziesaccount; +Cc: Liam Girdwood, Mark Brown, linux-kernel

Simplify LDO6 voltage getting on BD71828 by removing the
get_voltage call-back and providing the fixed voltage in
regulator_desc instead

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Suggested-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd71828-regulator.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/regulator/bd71828-regulator.c b/drivers/regulator/bd71828-regulator.c
index edba51da5661..b2fa17be4988 100644
--- a/drivers/regulator/bd71828-regulator.c
+++ b/drivers/regulator/bd71828-regulator.c
@@ -197,15 +197,9 @@ static const struct regulator_ops bd71828_ldo_ops = {
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 };
 
-static int bd71828_ldo6_get_voltage(struct regulator_dev *rdev)
-{
-	return BD71828_LDO_6_VOLTAGE;
-}
-
 static const struct regulator_ops bd71828_ldo6_ops = {
 	.enable = regulator_enable_regmap,
 	.disable = regulator_disable_regmap,
-	.get_voltage = bd71828_ldo6_get_voltage,
 	.is_enabled = regulator_is_enabled_regmap,
 };
 
@@ -697,6 +691,7 @@ static const struct bd71828_regulator_data bd71828_rdata[] = {
 			.id = BD71828_LDO6,
 			.ops = &bd71828_ldo6_ops,
 			.type = REGULATOR_VOLTAGE,
+			.fixed_uV = BD71828_LDO_6_VOLTAGE,
 			.n_voltages = 1,
 			.enable_reg = BD71828_REG_LDO6_EN,
 			.enable_mask = BD71828_MASK_RUN_EN,

base-commit: 522498f8cb8c547f415a9a39fb54fd1f7e1a1eda
-- 
2.21.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-20 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 11:34 [PATCH] regulator: bd71828: remove get_voltage operation Matti Vaittinen
2019-12-20 13:09 ` Applied "regulator: bd71828: remove get_voltage operation" to the regulator tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.