forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/regulator/isl9305.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * isl9305 - Intersil ISL9305 DCDC regulator
34 *
45 * Copyright 2014 Linaro Ltd
56 *
67 * Author: Mark Brown <broonie@kernel.org>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
128 */
139
1410 #include <linux/module.h>
....@@ -84,6 +80,7 @@
8480 .enable_mask = ISL9305_DCD1_EN,
8581 .supply_name = "VINDCD1",
8682 .ops = &isl9305_ops,
83
+ .owner = THIS_MODULE,
8784 },
8885 [ISL9305_DCD2] = {
8986 .name = "DCD2",
....@@ -98,6 +95,7 @@
9895 .enable_mask = ISL9305_DCD2_EN,
9996 .supply_name = "VINDCD2",
10097 .ops = &isl9305_ops,
98
+ .owner = THIS_MODULE,
10199 },
102100 [ISL9305_LDO1] = {
103101 .name = "LDO1",
....@@ -112,6 +110,7 @@
112110 .enable_mask = ISL9305_LDO1_EN,
113111 .supply_name = "VINLDO1",
114112 .ops = &isl9305_ops,
113
+ .owner = THIS_MODULE,
115114 },
116115 [ISL9305_LDO2] = {
117116 .name = "LDO2",
....@@ -126,6 +125,7 @@
126125 .enable_mask = ISL9305_LDO2_EN,
127126 .supply_name = "VINLDO2",
128127 .ops = &isl9305_ops,
128
+ .owner = THIS_MODULE,
129129 },
130130 };
131131
....@@ -137,8 +137,7 @@
137137 .cache_type = REGCACHE_RBTREE,
138138 };
139139
140
-static int isl9305_i2c_probe(struct i2c_client *i2c,
141
- const struct i2c_device_id *id)
140
+static int isl9305_i2c_probe(struct i2c_client *i2c)
142141 {
143142 struct regulator_config config = { };
144143 struct isl9305_pdata *pdata = i2c->dev.platform_data;
....@@ -198,7 +197,7 @@
198197 .name = "isl9305",
199198 .of_match_table = of_match_ptr(isl9305_dt_ids),
200199 },
201
- .probe = isl9305_i2c_probe,
200
+ .probe_new = isl9305_i2c_probe,
202201 .id_table = isl9305_i2c_id,
203202 };
204203