Re: [RFC PATCH v3 4/7] regulator: add property parsing and callbacks to set protection limits

From: Vaittinen, Matti
Date: Sun Apr 04 2021 - 11:47:31 EST


Hi Mark,

Thanks for the review(s)!
On Fri, 2021-04-02 at 18:18 +0100, Mark Brown wrote:
> On Thu, Mar 11, 2021 at 12:23:02PM +0200, Matti Vaittinen wrote:
>
> > + /*
> > + * Existing logic does not warn if over_current_protection is
> > given as
> > + * a constraint but driver does not support that. I think we
> > should
> > + * warn about this type of issues as it is possible someone
> > changes
>
> The "existing logic" bit here is for a changelog, not the code - as
> soon
> as the patch is applied the comment becomes inaccurate. This also
> seems
> like a separate patch.

I don't think this patch changed the logic but kept it as it is now.
Eg, for the existing over_current_protection property we still silently
ignore case where property is given but driver does not support setting
it. For me this sounds like fragile approach and I did handle the new
properties (like detection) in a different way. Thus the comment should
stay valid - and thus I didn't think this warrants a new patch.

If you think we should change the logic, then we should definitely do
that in separate patch. That allows revert if existing setups break
everywhere. How would you like this to be? I can change the logic if
you see it's worth the risk of breaking existing setups.

Best Regards
Matti Vaittinen