lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7391d6a4-0c0b-456f-a2ca-cf3dafa67c5a@app.fastmail.com>
Date: Tue, 28 May 2024 14:38:30 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Mark Brown" <broonie@...nel.org>, "Arnd Bergmann" <arnd@...nel.org>
Cc: "Liam Girdwood" <lgirdwood@...il.com>, "Alina Yu" <alina_yu@...htek.com>,
 Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: rtq2208: remove unused rtq2208_regulator_ldo_ops

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ