From 0324bf59a8810cadf35d67f71f5ee409834ec4ee Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 4 Feb 2014 00:23:35 +0100 Subject: imx233: make button-lradc drive able to handle VDDIO derived values In most devices, the button ladder is not actually derived from VDDIO but from a constant voltage source, making it very easy to read it. However on some devices like ther ZEN X-Fi Style, the ladder is wired to VDDIO we can be changed so it's crucial that the button driver correctly scales the values wrt VDDIO. Change-Id: Ifc11abe2838fa7d16d0d60ecd96964a8dc5ea6d7 --- firmware/target/arm/imx233/lradc-imx233.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/target/arm/imx233/lradc-imx233.h') diff --git a/firmware/target/arm/imx233/lradc-imx233.h b/firmware/target/arm/imx233/lradc-imx233.h index f274db3520..e7853b97a5 100644 --- a/firmware/target/arm/imx233/lradc-imx233.h +++ b/firmware/target/arm/imx233/lradc-imx233.h @@ -65,6 +65,9 @@ /* frequency of the delay counter */ #define LRADC_DELAY_FREQ 2000 +/* maximum value of a sample (without accumulation), defines the precision */ +#define LRADC_MAX_VALUE 4096 + typedef void (*lradc_irq_fn_t)(int chan); void imx233_lradc_init(void); -- cgit v1.2.3