summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/creative-zen
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-04 00:23:35 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-10 23:14:25 +0100
commit0324bf59a8810cadf35d67f71f5ee409834ec4ee (patch)
treea636cb9b3ab6cfd6c0d3c54eb5659294799291a2 /firmware/target/arm/imx233/creative-zen
parent0e0c610df0d3d4044d0b21ddc1752a5dacd7f86e (diff)
downloadrockbox-0324bf59a8810cadf35d67f71f5ee409834ec4ee.tar.gz
rockbox-0324bf59a8810cadf35d67f71f5ee409834ec4ee.zip
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
Diffstat (limited to 'firmware/target/arm/imx233/creative-zen')
-rw-r--r--firmware/target/arm/imx233/creative-zen/button-target.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/creative-zen/button-target.h b/firmware/target/arm/imx233/creative-zen/button-target.h
index 65521d66e4..e9a3ac5ab7 100644
--- a/firmware/target/arm/imx233/creative-zen/button-target.h
+++ b/firmware/target/arm/imx233/creative-zen/button-target.h
@@ -25,11 +25,22 @@
bool button_debug_screen(void);
+/* HOLD button */
#if !defined(CREATIVE_ZENXFISTYLE)
#define HAS_BUTTON_HOLD
#define IMX233_BUTTON_LRADC_HOLD_DET BLH_ADC
#endif
+/* VDDIO value */
+#if defined(CREATIVE_ZENXFISTYLE)
+#define IMX233_BUTTON_LRADC_VDDIO 3660
+#elif defined(CREATIVE_ZEN)
+#define IMX233_BUTTON_LRADC_VDDIO 3480
+#elif defined(CREATIVE_ZENXFI)
+#define IMX233_BUTTON_LRADC_VDDIO 3500
+#endif
+
+/* LRADC channel */
#if defined(CREATIVE_ZENXFISTYLE)
#define IMX233_BUTTON_LRADC_CHANNEL 2
#else