Messages in this thread | | | Date | Wed, 8 May 2024 14:54:02 +0800 | From | Alina Yu <> | Subject | Re: [PATCH v2 2/4] regulator: rtq2208: Fix LDO to be compatible with both fixed and adjustable vout |
| |
On Mon, May 06, 2024 at 11:58:29PM +0900, Mark Brown wrote: > On Fri, May 03, 2024 at 03:35:36PM +0800, Alina Yu wrote: > > On Fri, May 03, 2024 at 10:41:04AM +0900, Mark Brown wrote: > > > > That's a substantail reconfiguration of the regulator, it would be > > > better to have an explicit property for these non-standard fixed > > > voltages rather than trying to do this using constraints, or at the very > > > least have validation that the values being set are supported by the > > > hardware. The code should also be very clear about what is going on. > > > May I add the 'richtek,use-fix-dvs' property back ? > > It sounds like it might be better to add a property specifying the > specific fixed voltage rather than overloading the constraints for this > purpose.
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.
+ u32 fixed_uV; int ret, i;
- if (init_data->constraints.min_uV == init_data->constraints.max_uV) { + if (!of_property_read_u32(match->of_node, "richtek,fixed-microvolt", &fixed_uV)) { desc->n_voltages = 1; - desc->fixed_uV = init_data->constraints.min_uV; + desc->fixed_uV = fixed_uV; desc->ops = &rtq2208_regulator_ldo_fix_ops; ..
Thanks, Alina
| |