* [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops
@ 2024-05-28 12:12 Arnd Bergmann
2024-05-28 12:25 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-05-28 12:12 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Alina Yu
Cc: Arnd Bergmann, Uwe Kleine-König, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
After the recent rework, the structure is no longer referenced
anywhere and causes a build time warning:
drivers/regulator/rtq2208-regulator.c:222:35: error: 'rtq2208_regulator_ldo_ops' defined but not used [-Werror=unused-const-variable=]
222 | static const struct regulator_ops rtq2208_regulator_ldo_ops = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Remove it to get a clean build again.
Fixes: 38bcec0e7cbb ("regulator: rtq2208: Fix LDO discharge register and add vsel setting")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I did not analyze the change to see if this is the only required change
or if there should still have been a reference instead. Please review
and confirm, or provide a different fix.
---
drivers/regulator/rtq2208-regulator.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/regulator/rtq2208-regulator.c b/drivers/regulator/rtq2208-regulator.c
index b90e53d922d6..5b49eff90a7f 100644
--- a/drivers/regulator/rtq2208-regulator.c
+++ b/drivers/regulator/rtq2208-regulator.c
@@ -219,15 +219,6 @@ static const struct regulator_ops rtq2208_regulator_buck_ops = {
.set_suspend_mode = rtq2208_set_suspend_mode,
};
-static const struct regulator_ops rtq2208_regulator_ldo_ops = {
- .enable = regulator_enable_regmap,
- .disable = regulator_disable_regmap,
- .is_enabled = regulator_is_enabled_regmap,
- .set_active_discharge = regulator_set_active_discharge_regmap,
- .set_suspend_enable = rtq2208_set_suspend_enable,
- .set_suspend_disable = rtq2208_set_suspend_disable,
-};
-
static unsigned int rtq2208_of_map_mode(unsigned int mode)
{
switch (mode) {
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops
2024-05-28 12:12 [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops Arnd Bergmann
@ 2024-05-28 12:25 ` Mark Brown
2024-05-28 12:38 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2024-05-28 12:25 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Liam Girdwood, Alina Yu, Arnd Bergmann, Uwe Kleine-König,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
On Tue, May 28, 2024 at 02:12:13PM +0200, Arnd Bergmann wrote:
> I did not analyze the change to see if this is the only required change
> or if there should still have been a reference instead. Please review
> and confirm, or provide a different fix.
Fairly sure there should be a reference in _init_regulator_desc().
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops
2024-05-28 12:25 ` Mark Brown
@ 2024-05-28 12:38 ` Arnd Bergmann
2024-05-28 13:03 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2024-05-28 12:38 UTC (permalink / raw)
To: Mark Brown, Arnd Bergmann
Cc: Liam Girdwood, Alina Yu, Uwe Kleine-König, linux-kernel
On Tue, May 28, 2024, at 14:25, Mark Brown wrote:
> On Tue, May 28, 2024 at 02:12:13PM +0200, Arnd Bergmann wrote:
>
>> I did not analyze the change to see if this is the only required change
>> or if there should still have been a reference instead. Please review
>> and confirm, or provide a different fix.
>
> Fairly sure there should be a reference in _init_regulator_desc().
This is how 38bcec0e7cbb ("regulator: rtq2208: Fix
LDO discharge register and add vsel setting")] changed
the lines:
@@ -427,14 +448,11 @@ static void rtq2208_init_regulator_desc(struct rtq2208_regulator_desc *rdesc, in
rdesc->suspend_mode_mask = RTQ2208_BUCK_STRMODE_MASK;
} else {
/* init ldo desc */
- desc->enable_reg = curr_info->base;
- desc->ops = &rtq2208_regulator_ldo_ops;
- desc->n_voltages = 1;
- desc->active_discharge_reg = LDO_RG_SHIFT(curr_info->base, 2);
-
- rtq2208_ldo_match[*ldo_idx].name = desc->name;
- rtq2208_ldo_match[*ldo_idx].driver_data = rdesc;
- rtq2208_ldo_match[(*ldo_idx)++].desc = desc;
+ desc->active_discharge_reg = RTQ2208_REG_LDO_DVS_CTRL;
+ desc->active_discharge_on = curr_info->dis_on;
+ desc->active_discharge_mask = curr_info->dis_mask;
+ desc->vsel_reg = RTQ2208_REG_LDO_DVS_CTRL;
+ desc->vsel_mask = curr_info->vsel_mask;
rdesc->suspend_config_reg = curr_info->base;
rdesc->suspend_enable_mask = RTQ2208_LDO_EN_STR_MASK;
If the desc->ops was removed by accident, it seems
likely that desc->n_voltages also needs to be reverted.
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops
2024-05-28 12:38 ` Arnd Bergmann
@ 2024-05-28 13:03 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-05-28 13:03 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Liam Girdwood, Alina Yu, Uwe Kleine-König,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On Tue, May 28, 2024 at 02:38:30PM +0200, Arnd Bergmann wrote:
> On Tue, May 28, 2024, at 14:25, Mark Brown wrote:
> > Fairly sure there should be a reference in _init_regulator_desc().
> This is how 38bcec0e7cbb ("regulator: rtq2208: Fix
> LDO discharge register and add vsel setting")] changed
> the lines:
In fact there's a series in flight which adds support for fixed voltage
mode and fixes this, though we'll need a separate fix for v6.10.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-28 13:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 12:12 [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops Arnd Bergmann
2024-05-28 12:25 ` Mark Brown
2024-05-28 12:38 ` Arnd Bergmann
2024-05-28 13:03 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox