* [PATCH] regulator: max14577: Get rid of match_init_data/match_of_node functions
@ 2019-03-12 15:52 Axel Lin
2019-03-14 16:57 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2019-03-12 15:52 UTC (permalink / raw)
To: Mark Brown
Cc: Chanwoo Choi, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
Liam Girdwood, linux-kernel, Axel Lin
This driver has been converted to use regulator core's simplified DT
parsing code. So the match_init_data/match_of_node functions are not
necessary now, remove them.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/max14577-regulator.c | 55 --------------------------
1 file changed, 55 deletions(-)
diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c
index 85a88a9e4d42..07a150c9bbf2 100644
--- a/drivers/regulator/max14577-regulator.c
+++ b/drivers/regulator/max14577-regulator.c
@@ -155,58 +155,6 @@ static const struct regulator_desc max77836_supported_regulators[] = {
[MAX77836_LDO2] = MAX77836_LDO_REG(2),
};
-#ifdef CONFIG_OF
-static struct of_regulator_match max14577_regulator_matches[] = {
- { .name = "SAFEOUT", },
- { .name = "CHARGER", },
-};
-
-static struct of_regulator_match max77836_regulator_matches[] = {
- { .name = "SAFEOUT", },
- { .name = "CHARGER", },
- { .name = "LDO1", },
- { .name = "LDO2", },
-};
-
-static inline struct regulator_init_data *match_init_data(int index,
- enum maxim_device_type dev_type)
-{
- switch (dev_type) {
- case MAXIM_DEVICE_TYPE_MAX77836:
- return max77836_regulator_matches[index].init_data;
-
- case MAXIM_DEVICE_TYPE_MAX14577:
- default:
- return max14577_regulator_matches[index].init_data;
- }
-}
-
-static inline struct device_node *match_of_node(int index,
- enum maxim_device_type dev_type)
-{
- switch (dev_type) {
- case MAXIM_DEVICE_TYPE_MAX77836:
- return max77836_regulator_matches[index].of_node;
-
- case MAXIM_DEVICE_TYPE_MAX14577:
- default:
- return max14577_regulator_matches[index].of_node;
- }
-}
-#else /* CONFIG_OF */
-static inline struct regulator_init_data *match_init_data(int index,
- enum maxim_device_type dev_type)
-{
- return NULL;
-}
-
-static inline struct device_node *match_of_node(int index,
- enum maxim_device_type dev_type)
-{
- return NULL;
-}
-#endif /* CONFIG_OF */
-
/**
* Registers for regulators of max77836 use different I2C slave addresses so
* different regmaps must be used for them.
@@ -265,9 +213,6 @@ static int max14577_regulator_probe(struct platform_device *pdev)
if (pdata && pdata->regulators) {
config.init_data = pdata->regulators[i].initdata;
config.of_node = pdata->regulators[i].of_node;
- } else {
- config.init_data = match_init_data(i, dev_type);
- config.of_node = match_of_node(i, dev_type);
}
config.regmap = max14577_get_regmap(max14577,
supported_regulators[i].id);
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: max14577: Get rid of match_init_data/match_of_node functions
2019-03-12 15:52 [PATCH] regulator: max14577: Get rid of match_init_data/match_of_node functions Axel Lin
@ 2019-03-14 16:57 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2019-03-14 16:57 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Chanwoo Choi, Bartlomiej Zolnierkiewicz,
Liam Girdwood, linux-kernel
On Tue, 12 Mar 2019 at 16:52, Axel Lin <axel.lin@ingics.com> wrote:
>
> This driver has been converted to use regulator core's simplified DT
> parsing code. So the match_init_data/match_of_node functions are not
> necessary now, remove them.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/regulator/max14577-regulator.c | 55 --------------------------
> 1 file changed, 55 deletions(-)
Looks correct, thanks! Although I do not have anymore HW to test it.
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-14 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 15:52 [PATCH] regulator: max14577: Get rid of match_init_data/match_of_node functions Axel Lin
2019-03-14 16:57 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®