#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9
-# Thu Jul 15 09:09:48 2010
+# Thu Jul 15 03:02:03 2010
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
CONFIG_BATTERY_RK2818=y
-# CONFIG_PMIC_LP8725 is not set
+CONFIG_PMIC_LP8725=y
# CONFIG_HWMON is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
#include <mach/gpio.h>
#include <mach/adc.h>
-#if 0
+#if 0
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#define Valuedrift 50
+#ifndef CONFIG_MACH_RK2818PHONE
#define ADEmpty 1000
+#else
+#define ADEmpty 900
+#endif
#define ADInvalid 20
#define ADKEYNUM 10
unsigned int adc_keycode;
}ADC_keyst,*pADC_keyst;
+#ifndef CONFIG_MACH_RK2818PHONE
// adc ---> key
static ADC_keyst gAdcValueTab[] =
{
{899, AD2KEY6},
{ADEmpty,0}
};
+#else
+static ADC_keyst gAdcValueTab[] =
+{
+ {95, AD2KEY1},
+ {192, AD2KEY2},
+ {280, AD2KEY3},
+ {376, AD2KEY4},
+ {467, AD2KEY5},
+ {560, AD2KEY6},
+ {ADEmpty,0}
+};
+#endif
//key code tab
static unsigned char gInitKeyCode[ADKEYNUM] =
//rk28_read_adc(pRk28AdcKey);
adcvalue = gAdcValue[ADKEYCH];
+ DBG("=========== adcvalue=0x%x ===========\n",adcvalue);
+
if((adcvalue > ADEmpty) || (adcvalue < ADInvalid))
{
- if(gLastCode == 0)
- return;
+ if(gLastCode == 0) {
+ return;
+ }
else
{
if(gLastCode == KEYMENU)
}
}
- DBG("adcvalue=0x%x\n",adcvalue);
+ //DBG("adcvalue=0x%x\n",adcvalue);
code=rk28_get_keycode(adcvalue,gAdcValueTab);
if(code)