Skip to content

Commit 8b4c271

Browse files
miquelraynalEduardo Valentin
authored andcommitted
thermal: armada: rename the initialization routine
Calling a hook ->init_sensor() while what is initialized is the IP itself and not the sensors is misleading. Rename the hook ->init() to avoid any confusion in later work bringing multi-sensors support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
1 parent c5d7d57 commit 8b4c271

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

drivers/thermal/armada_thermal.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ struct armada_thermal_priv {
7373
};
7474

7575
struct armada_thermal_data {
76-
/* Initialize the sensor */
77-
void (*init_sensor)(struct platform_device *pdev,
78-
struct armada_thermal_priv *);
76+
/* Initialize the thermal IC */
77+
void (*init)(struct platform_device *pdev,
78+
struct armada_thermal_priv *priv);
7979

8080
/* Test for a valid sensor value (optional) */
8181
bool (*is_valid)(struct armada_thermal_priv *);
@@ -94,8 +94,8 @@ struct armada_thermal_data {
9494
bool needs_control0;
9595
};
9696

97-
static void armadaxp_init_sensor(struct platform_device *pdev,
98-
struct armada_thermal_priv *priv)
97+
static void armadaxp_init(struct platform_device *pdev,
98+
struct armada_thermal_priv *priv)
9999
{
100100
u32 reg;
101101

@@ -117,8 +117,8 @@ static void armadaxp_init_sensor(struct platform_device *pdev,
117117
writel(reg, priv->status);
118118
}
119119

120-
static void armada370_init_sensor(struct platform_device *pdev,
121-
struct armada_thermal_priv *priv)
120+
static void armada370_init(struct platform_device *pdev,
121+
struct armada_thermal_priv *priv)
122122
{
123123
u32 reg;
124124

@@ -136,8 +136,8 @@ static void armada370_init_sensor(struct platform_device *pdev,
136136
msleep(10);
137137
}
138138

139-
static void armada375_init_sensor(struct platform_device *pdev,
140-
struct armada_thermal_priv *priv)
139+
static void armada375_init(struct platform_device *pdev,
140+
struct armada_thermal_priv *priv)
141141
{
142142
u32 reg;
143143

@@ -164,8 +164,8 @@ static void armada_wait_sensor_validity(struct armada_thermal_priv *priv)
164164
STATUS_POLL_TIMEOUT_US);
165165
}
166166

167-
static void armada380_init_sensor(struct platform_device *pdev,
168-
struct armada_thermal_priv *priv)
167+
static void armada380_init(struct platform_device *pdev,
168+
struct armada_thermal_priv *priv)
169169
{
170170
u32 reg = readl_relaxed(priv->control1);
171171

@@ -186,8 +186,8 @@ static void armada380_init_sensor(struct platform_device *pdev,
186186
armada_wait_sensor_validity(priv);
187187
}
188188

189-
static void armada_ap806_init_sensor(struct platform_device *pdev,
190-
struct armada_thermal_priv *priv)
189+
static void armada_ap806_init(struct platform_device *pdev,
190+
struct armada_thermal_priv *priv)
191191
{
192192
u32 reg;
193193

@@ -247,7 +247,7 @@ static struct thermal_zone_device_ops ops = {
247247
};
248248

249249
static const struct armada_thermal_data armadaxp_data = {
250-
.init_sensor = armadaxp_init_sensor,
250+
.init = armadaxp_init,
251251
.temp_shift = 10,
252252
.temp_mask = 0x1ff,
253253
.coef_b = 3153000000ULL,
@@ -257,7 +257,7 @@ static const struct armada_thermal_data armadaxp_data = {
257257

258258
static const struct armada_thermal_data armada370_data = {
259259
.is_valid = armada_is_valid,
260-
.init_sensor = armada370_init_sensor,
260+
.init = armada370_init,
261261
.is_valid_bit = BIT(9),
262262
.temp_shift = 10,
263263
.temp_mask = 0x1ff,
@@ -268,7 +268,7 @@ static const struct armada_thermal_data armada370_data = {
268268

269269
static const struct armada_thermal_data armada375_data = {
270270
.is_valid = armada_is_valid,
271-
.init_sensor = armada375_init_sensor,
271+
.init = armada375_init,
272272
.is_valid_bit = BIT(10),
273273
.temp_shift = 0,
274274
.temp_mask = 0x1ff,
@@ -280,7 +280,7 @@ static const struct armada_thermal_data armada375_data = {
280280

281281
static const struct armada_thermal_data armada380_data = {
282282
.is_valid = armada_is_valid,
283-
.init_sensor = armada380_init_sensor,
283+
.init = armada380_init,
284284
.is_valid_bit = BIT(10),
285285
.temp_shift = 0,
286286
.temp_mask = 0x3ff,
@@ -292,7 +292,7 @@ static const struct armada_thermal_data armada380_data = {
292292

293293
static const struct armada_thermal_data armada_ap806_data = {
294294
.is_valid = armada_is_valid,
295-
.init_sensor = armada_ap806_init_sensor,
295+
.init = armada_ap806_init,
296296
.is_valid_bit = BIT(16),
297297
.temp_shift = 0,
298298
.temp_mask = 0x3ff,
@@ -306,7 +306,7 @@ static const struct armada_thermal_data armada_ap806_data = {
306306

307307
static const struct armada_thermal_data armada_cp110_data = {
308308
.is_valid = armada_is_valid,
309-
.init_sensor = armada380_init_sensor,
309+
.init = armada380_init,
310310
.is_valid_bit = BIT(10),
311311
.temp_shift = 0,
312312
.temp_mask = 0x3ff,
@@ -429,7 +429,7 @@ static int armada_thermal_probe(struct platform_device *pdev)
429429
priv->control1 = control + CONTROL1_OFFSET;
430430
}
431431

432-
priv->data->init_sensor(pdev, priv);
432+
priv->data->init(pdev, priv);
433433

434434
thermal = thermal_zone_device_register(priv->zone_name, 0, 0, priv,
435435
&ops, NULL, 0, 0);

0 commit comments

Comments
 (0)