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]
Date: Thu, 9 May 2024 17:15:03 +0800
From: Alina Yu <alina_yu@...htek.com>
To: Mark Brown <broonie@...nel.org>
CC: <lgirdwood@...il.com>, <linux-kernel@...r.kernel.org>,
	<johnny_lai@...htek.com>, <cy_huang@...htek.com>
Subject: Re: [PATCH v2 2/4] regulator: rtq2208: Fix LDO to be compatible with
 both fixed and adjustable vout

On Wed, May 08, 2024 at 08:53:34PM +0900, Mark Brown wrote:
> On Wed, May 08, 2024 at 02:54:02PM +0800, Alina Yu wrote:
> 
> > May I modify the code into this ?
> > I'll add 'richtek,fixed-microvolt' property in dtsi; remove 'regulator-min-microvolt' and 'regulator-max-microvolt'
> > to prevent fail caused by constraints->apply_uV.
> 
> Adding the new property seems fine.  You still need to permit the
> min/max microvolt properties for the case where the regulator is in
> normal mode and can vary, you could write rules that ensure that the
> constraints line up in the case where a fixed voltage is specified but
> I'm not sure it's worth the effort.

Or may I add the following condition to check the constraints.min_uV and constraints.max_uV match the specified fixed voltage ?


+       u32 fixed_uV;
        int ret, i;

..

+               /* specify working fixed voltage if the propery exists */
+               ret = of_property_read_u32(match->of_node, "richtek,fixed-microvolt", &fixed_uV);
+
+               if (!ret) {
+                       if (fixed_uV != init_data->constraints.min_uV ||
+                               fixed_uV != init_data->constraints.max_uV)
+                               return -EINVAL;
+
			desc->n_voltages = 1;
+                       desc->fixed_uV = fixed_uV;

..

Thanks,
Alina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ