Skip to content

Commit c91ebcc

Browse files
pcercueijic23
authored andcommitted
iio/adc: ingenic: Fix battery VREF for JZ4770 SoC
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: a515d64 ("IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.") Signed-off-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Artur Rojek <contact@artur-rojek.eu> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201104192843.67187-1-paul@crapouillou.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent fe0b980 commit c91ebcc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/adc/ingenic-adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#define JZ4725B_ADC_BATTERY_HIGH_VREF_BITS 10
7272
#define JZ4740_ADC_BATTERY_HIGH_VREF (7500 * 0.986)
7373
#define JZ4740_ADC_BATTERY_HIGH_VREF_BITS 12
74-
#define JZ4770_ADC_BATTERY_VREF 6600
74+
#define JZ4770_ADC_BATTERY_VREF 1200
7575
#define JZ4770_ADC_BATTERY_VREF_BITS 12
7676

7777
#define JZ_ADC_IRQ_AUX BIT(0)

0 commit comments

Comments
 (0)