Re: [PATCH v2] regulator: rt5033: Use linear ranges to map all voltage selection

From: Lee Jones
Date: Tue Jul 06 2021 - 04:24:22 EST


On Tue, 06 Jul 2021, cy_huang wrote:

> From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
>
> Instead of linear mapping, Use linear range to map all voltage selection.
>
> Signed-off-by: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
> ---
> Since v2
> - recover the volt number back in rt5033-private.h
> - Add the n_voltages from v1 back.
>
> Even though commit 6549c46af855 ("regulator: rt5033: Fix n_voltages settings for BUCK and LDO")
> can fix the linear mapping to the correct min/max voltage
> But there're still non-step ranges for the reserved value.
>
> To use the linear range can fix it for mapping all voltage selection.
> ---
> drivers/regulator/rt5033-regulator.c | 21 +++++++++++++++------

> include/linux/mfd/rt5033-private.h | 4 ++--

Acked-by: Lee Jones <lee.jones@xxxxxxxxxx>

> 2 files changed, 17 insertions(+), 8 deletions(-)

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog