hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/regulator/tps6105x-regulator.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for TPS61050/61052 boost converters, typically used for white LEDs
34 * or audio amplifiers.
....@@ -6,8 +7,6 @@
67 * Written on behalf of Linaro for ST-Ericsson
78 *
89 * Author: Linus Walleij <linus.walleij@linaro.org>
9
- *
10
- * License terms: GNU General Public License (GPL) version 2
1110 */
1211
1312 #include <linux/module.h>
....@@ -27,7 +26,7 @@
2726 5000000, /* There is an additional 5V */
2827 };
2928
30
-static struct regulator_ops tps6105x_regulator_ops = {
29
+static const struct regulator_ops tps6105x_regulator_ops = {
3130 .enable = regulator_enable_regmap,
3231 .disable = regulator_disable_regmap,
3332 .is_enabled = regulator_is_enabled_regmap,
....@@ -38,6 +37,7 @@
3837
3938 static const struct regulator_desc tps6105x_regulator_desc = {
4039 .name = "tps6105x-boost",
40
+ .of_match = of_match_ptr("regulator"),
4141 .ops = &tps6105x_regulator_ops,
4242 .type = REGULATOR_VOLTAGE,
4343 .id = 0,
....@@ -72,6 +72,7 @@
7272 config.dev = &tps6105x->client->dev;
7373 config.init_data = pdata->regulator_data;
7474 config.driver_data = tps6105x;
75
+ config.of_node = pdev->dev.parent->of_node;
7576 config.regmap = tps6105x->regmap;
7677
7778 /* Register regulator with framework */