[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cb8b8ff426500db61c61b51413f3746c@artur-rojek.eu>
Date: Wed, 04 Nov 2020 23:29:58 +0100
From: Artur Rojek <contact@...ur-rojek.eu>
To: Paul Cercueil <paul@...pouillou.net>
Cc: Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>, od@...c.me,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] iio/adc: ingenic: Fix battery VREF for JZ4770 SoC
Hi Paul,
On 2020-11-04 20:28, Paul Cercueil wrote:
> The reference voltage for the battery is clearly marked as 1.2V in the
> programming manual. With this fixed, the battery channel now returns
> correct values.
>
> Fixes: a515d6488505 ("IIO: Ingenic JZ47xx: Add support for JZ4770 SoC
> ADC.")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Paul Cercueil <paul@...pouillou.net>
> ---
> drivers/iio/adc/ingenic-adc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ingenic-adc.c
> b/drivers/iio/adc/ingenic-adc.c
> index ecaff6a9b716..19b95905a45c 100644
> --- a/drivers/iio/adc/ingenic-adc.c
> +++ b/drivers/iio/adc/ingenic-adc.c
> @@ -71,7 +71,7 @@
> #define JZ4725B_ADC_BATTERY_HIGH_VREF_BITS 10
> #define JZ4740_ADC_BATTERY_HIGH_VREF (7500 * 0.986)
> #define JZ4740_ADC_BATTERY_HIGH_VREF_BITS 12
> -#define JZ4770_ADC_BATTERY_VREF 6600
> +#define JZ4770_ADC_BATTERY_VREF 1200
> #define JZ4770_ADC_BATTERY_VREF_BITS 12
>
> #define JZ_ADC_IRQ_AUX BIT(0)
I thought we set it to 6600 because GCW Zero was not showing correct
battery values at 1200.
But if you verified that 1200 works with JZ4770, then:
Acked-by: Artur Rojek <contact@...ur-rojek.eu>
Powered by blists - more mailing lists