[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240508065402.GA7462@linuxcarl2.richtek.com>
Date: Wed, 8 May 2024 14:54:02 +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 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
Powered by blists - more mailing lists