aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/fm34_we395.h2
-rw-r--r--include/linux/i2c/mxt1664s.h7
-rw-r--r--include/linux/i2c/mxt224_grande.h194
-rw-r--r--include/linux/i2c/mxt224s_grande.h163
-rw-r--r--include/linux/i2c/mxt540e.h4
-rw-r--r--include/linux/i2c/mxt540s.h116
-rw-r--r--include/linux/i2c/si47xx_common.h60
-rw-r--r--include/linux/i2c/touchkey_i2c.h70
8 files changed, 594 insertions, 22 deletions
diff --git a/include/linux/i2c/fm34_we395.h b/include/linux/i2c/fm34_we395.h
index 718209d..25de511 100644
--- a/include/linux/i2c/fm34_we395.h
+++ b/include/linux/i2c/fm34_we395.h
@@ -22,7 +22,7 @@
#ifndef __FEM34_WE395_PDATA_H__
#define __FM34_WE395_PDATA_H__
-#if defined(CONFIG_MACH_C1_KOR_LGT) || defined(CONFIG_MACH_C1VZW)
+#if defined(CONFIG_MACH_C1_KOR_LGT)
int fm34_set_mode(int mode);
#endif
diff --git a/include/linux/i2c/mxt1664s.h b/include/linux/i2c/mxt1664s.h
index e8795af..4211787 100644
--- a/include/linux/i2c/mxt1664s.h
+++ b/include/linux/i2c/mxt1664s.h
@@ -88,6 +88,10 @@ enum { RESERVED_T0 = 0,
RESERVED_T255 = 255,
};
+struct mxt_callbacks {
+ void (*inform_charger)(struct mxt_callbacks *, bool);
+};
+
struct mxt_platform_data {
int max_finger_touches;
int gpio_read_done;
@@ -102,7 +106,10 @@ struct mxt_platform_data {
int max_w;
int (*power_on) (void);
int (*power_off) (void);
+ int (*power_reset) (void);
+ u8 *(*register_cb)(struct mxt_callbacks *);
u8 boot_address;
+ const char *config_version;
};
#endif /* */
diff --git a/include/linux/i2c/mxt224_grande.h b/include/linux/i2c/mxt224_grande.h
new file mode 100644
index 0000000..ffea3f1
--- /dev/null
+++ b/include/linux/i2c/mxt224_grande.h
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2010, Samsung Electronics Co. Ltd. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MXT224_H__
+#define __MXT224_H__
+
+//#define MXT224_DEV_NAME "Atmel MXT224"
+
+#define MXT224_DEV_NAME "qt602240_ts"
+
+
+#define MXT224_THRESHOLD 40
+#define MXT224E_THRESHOLD 50
+#define MXT224_MAX_MT_FINGERS 10
+
+#define MXT_OREINT 10
+#define MXT224_ORIENT_SWAP_NN 1
+#define MXT224_ORIENT_SWAP_XY 7
+
+
+
+#ifdef CONFIG_TOUCHSCREEN_MXT768E
+enum {
+ RESERVED_T0 = 0,
+ RESERVED_T1,
+ DEBUG_DELTAS_T2,
+ DEBUG_REFERENCES_T3,
+ DEBUG_SIGNALS_T4,
+ GEN_MESSAGEPROCESSOR_T5,
+ GEN_COMMANDPROCESSOR_T6,
+ GEN_POWERCONFIG_T7,
+ GEN_ACQUISITIONCONFIG_T8,
+ TOUCH_MULTITOUCHSCREEN_T9,
+ TOUCH_SINGLETOUCHSCREEN_T10,
+ TOUCH_XSLIDER_T11,
+ TOUCH_YSLIDER_T12,
+ TOUCH_XWHEEL_T13,
+ TOUCH_YWHEEL_T14,
+ TOUCH_KEYARRAY_T15,
+ PROCG_SIGNALFILTER_T16,
+ PROCI_LINEARIZATIONTABLE_T17,
+ SPT_COMCONFIG_T18,
+ RESERVED_T19,
+ RESERVED_T20,
+ RESERVED_T21,
+ RESERVED_T22,
+ RESERVED_T23,
+ PROCI_ONETOUCHGESTUREPROCESSOR_T24,
+ SPT_SELFTEST_T25,
+ DEBUG_CTERANGE_T26,
+ PROCI_TWOTOUCHGESTUREPROCESSOR_T27,
+ RESERVED_T28,
+ SPT_GPI_T29,
+ SPT_GATE_T30,
+ TOUCH_KEYSET_T31,
+ TOUCH_XSLIDERSET_T32,
+ RESERVED_T33,
+ GEN_MESSAGEBLOCK_T34,
+ SPT_GENERICDATA_T35,
+ RESERVED_T36,
+ DEBUG_DIAGNOSTIC_T37,
+ SPARE_T38,
+ SPARE_T39,
+ PROCI_GRIPSUPPRESSION_T40,
+ SPARE_T41,
+ PROCI_TOUCHSUPPRESSION_T42,
+ SPT_DIGITIZER_T43,
+ SPARE_T44,
+ SPARE_T45,
+ SPT_CTECONFIG_T46,
+ SPARE_T47,
+ PROCG_NOISESUPPRESSION_T48,
+ SPARE_T49,
+ SPARE_T50,
+ RESERVED_T255 = 255,
+};
+#else
+enum {
+ RESERVED_T0 = 0,
+ RESERVED_T1,
+ DEBUG_DELTAS_T2,
+ DEBUG_REFERENCES_T3,
+ DEBUG_SIGNALS_T4,
+ GEN_MESSAGEPROCESSOR_T5,
+ GEN_COMMANDPROCESSOR_T6,
+ GEN_POWERCONFIG_T7,
+ GEN_ACQUISITIONCONFIG_T8,
+ TOUCH_MULTITOUCHSCREEN_T9,
+ TOUCH_SINGLETOUCHSCREEN_T10,
+ TOUCH_XSLIDER_T11,
+ TOUCH_YSLIDER_T12,
+ TOUCH_XWHEEL_T13,
+ TOUCH_YWHEEL_T14,
+ TOUCH_KEYARRAY_T15,
+ PROCG_SIGNALFILTER_T16,
+ PROCI_LINEARIZATIONTABLE_T17,
+ SPT_COMCONFIG_T18,
+ SPT_GPIOPWM_T19,
+ PROCI_GRIPFACESUPPRESSION_T20,
+ RESERVED_T21,
+ PROCG_NOISESUPPRESSION_T22,
+ TOUCH_PROXIMITY_T23,
+ PROCI_ONETOUCHGESTUREPROCESSOR_T24,
+ SPT_SELFTEST_T25,
+ DEBUG_CTERANGE_T26,
+ PROCI_TWOTOUCHGESTUREPROCESSOR_T27,
+ SPT_CTECONFIG_T28,
+ SPT_GPI_T29,
+ SPT_GATE_T30,
+ TOUCH_KEYSET_T31,
+ TOUCH_XSLIDERSET_T32,
+ RESERVED_T33,
+ GEN_MESSAGEBLOCK_T34,
+ SPT_GENERICDATA_T35,
+ RESERVED_T36,
+ DEBUG_DIAGNOSTIC_T37,
+ SPT_USERDATA_T38,
+ SPARE_T39,
+ PROCI_GRIPSUPPRESSION_T40,
+ SPARE_T41,
+ PROCI_TOUCHSUPPRESSION_T42,
+ SPARE_T43,
+ SPARE_T44,
+ SPARE_T45,
+ SPT_CTECONFIG_T46,
+ PROCI_STYLUS_T47,
+ PROCG_NOISESUPPRESSION_T48,
+ SPARE_T49,
+ SPARE_T50,
+ RESERVED_T255 = 255,
+};
+#endif
+
+struct mxt224_platform_data {
+ int max_finger_touches;
+ const u8 **config;
+ const u8 **config_e;
+ const u8 *t46_ta_cfg;
+ const u8 *t48_ta_cfg;
+ int gpio_read_done;
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int min_z;
+ int max_z;
+ int min_w;
+ int max_w;
+ void (*power_on)(void);
+ void (*power_off)(void);
+ void (*register_cb)(void*);
+ void (*read_ta_status)(void*);
+// void (*orient_barnch)(int orient_swap);/*TSP TA noise 201107251133*/
+};
+
+
+typedef enum
+{
+ QT_PAGE_UP = 0x01,
+ QT_PAGE_DOWN = 0x02,
+ QT_DELTA_MODE = 0x10,
+ QT_REFERENCE_MODE = 0x11,
+ QT_CTE_MODE = 0x31
+}diagnostic_debug_command;
+
+
+//110927 gumi noise
+typedef struct
+{
+ bool median_on_flag;
+ bool mferr_setting;
+ uint8_t mferr_count;
+ uint8_t t46_actvsyncsperx_for_mferr;
+ uint8_t t48_mfinvlddiffthr_for_mferr;
+ uint8_t t48_mferrorthr_for_mferr;
+ uint8_t t48_thr_for_mferr;
+ uint8_t t48_movfilter_for_mferr;
+}__packed t48_median_config_t;
+
+
+
+#endif
diff --git a/include/linux/i2c/mxt224s_grande.h b/include/linux/i2c/mxt224s_grande.h
new file mode 100644
index 0000000..b7d0938
--- /dev/null
+++ b/include/linux/i2c/mxt224s_grande.h
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2010, Samsung Electronics Co. Ltd. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MXT_H__
+#define __MXT_H__
+
+#define MXT224_MAX_MT_FINGERS 10
+#define MXT_DEV_NAME "Atmel MXT224S"
+#define CHECK_ANTITOUCH 1
+
+enum { RESERVED_T0 = 0,
+ RESERVED_T1,
+ DEBUG_DELTAS_T2,
+ DEBUG_REFERENCES_T3,
+ DEBUG_SIGNALS_T4,
+ GEN_MESSAGEPROCESSOR_T5,
+ GEN_COMMANDPROCESSOR_T6,
+ GEN_POWERCONFIG_T7,
+ GEN_ACQUISITIONCONFIG_T8,
+ TOUCH_MULTITOUCHSCREEN_T9,
+ TOUCH_SINGLETOUCHSCREEN_T10,
+ TOUCH_XSLIDER_T11,
+ TOUCH_YSLIDER_T12,
+ TOUCH_XWHEEL_T13,
+ TOUCH_YWHEEL_T14,
+ TOUCH_KEYARRAY_T15,
+ PROCG_SIGNALFILTER_T16,
+ PROCI_LINEARIZATIONTABLE_T17,
+ SPT_COMCONFIG_T18,
+ SPT_GPIOPWM_T19,
+ PROCI_GRIPFACESUPPRESSION_T20,
+ RESERVED_T21,
+ PROCG_NOISESUPPRESSION_T22,
+ TOUCH_PROXIMITY_T23,
+ PROCI_ONETOUCHGESTUREPROCESSOR_T24,
+ SPT_SELFTEST_T25,
+ DEBUG_CTERANGE_T26,
+ PROCI_TWOTOUCHGESTUREPROCESSOR_T27,
+ SPT_CTECONFIG_T28,
+ SPT_GPI_T29,
+ SPT_GATE_T30,
+ TOUCH_KEYSET_T31,
+ TOUCH_XSLIDERSET_T32,
+ RESERVED_T33,
+ GEN_MESSAGEBLOCK_T34,
+ SPT_GENERICDATA_T35,
+ RESERVED_T36,
+ DEBUG_DIAGNOSTIC_T37,
+ SPT_USERDATA_T38,
+ SPARE_T39,
+ PROCI_GRIPSUPPRESSION_T40,
+ SPARE_T41,
+ PROCI_TOUCHSUPPRESSION_T42,
+ SPT_DIGITIZER_T43,
+ MESSAGECOUNT_T44,
+ SPARE_T45,
+ SPT_CTECONFIG_T46,
+ PROCI_STYLUS_T47,
+ PROCG_NOISESUPPRESSION_T48,
+ SPARE_T49,
+ SPARE_T50,
+ SPARE_T51,
+ TOUCH_PROXIMITY_KEY_T52,
+ GEN_DATASOURCE_T53,
+ SPARE_T54,
+ PROCI_ADAPTIVETHRESHOLD_T55,
+ PROCI_SHIELDLESS_T56,
+ PROCI_EXTRATOUCHSCREENDATA_T57,
+ SPARE_T58,
+ SPARE_T59,
+ SPARE_T60,
+ SPT_TIMER_T61,
+ PROCG_NOISESUPPRESSION_T62,
+ RESERVED_T255 = 255,
+};
+struct mxt224s_platform_data {
+ int max_finger_touches;
+ const u8 **config;
+ const u8 **config_e;
+ int gpio_read_done;
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int min_z;
+ int max_z;
+ int min_w;
+ int max_w;
+ u8 chrgtime_batt;
+ u8 chrgtime_charging;
+ u8 atchcalst;
+ u8 atchcalsthr;
+ u8 tchthr_batt;
+ u8 tchthr_charging;
+ u8 tchthr_batt_e;
+ u8 tchthr_charging_e;
+ u8 calcfg_batt_e;
+ u8 calcfg_charging_e;
+ u8 atchcalsthr_e;
+ u8 atchfrccalthr_e;
+ u8 atchfrccalratio_e;
+ u8 idlesyncsperx_batt;
+ u8 idlesyncsperx_charging;
+ u8 actvsyncsperx_batt;
+ u8 actvsyncsperx_charging;
+ u8 idleacqint_batt;
+ u8 idleacqint_charging;
+ u8 actacqint_batt;
+ u8 actacqint_charging;
+ u8 xloclip_batt;
+ u8 xloclip_charging;
+ u8 xhiclip_batt;
+ u8 xhiclip_charging;
+ u8 yloclip_batt;
+ u8 yloclip_charging;
+ u8 yhiclip_batt;
+ u8 yhiclip_charging;
+ u8 xedgectrl_batt;
+ u8 xedgectrl_charging;
+ u8 xedgedist_batt;
+ u8 xedgedist_charging;
+ u8 yedgectrl_batt;
+ u8 yedgectrl_charging;
+ u8 yedgedist_batt;
+ u8 yedgedist_charging;
+ u8 tchhyst_batt;
+ u8 tchhyst_charging;
+#if CHECK_ANTITOUCH
+ u8 check_antitouch;
+ u8 check_timer;
+ u8 check_autocal;
+ u8 check_calgood;
+#endif
+ const u8 *t9_config_batt;
+ const u8 *t9_config_chrg;
+ const u8 *t56_config_batt;
+ const u8 *t56_config_chrg;
+ const u8 *t62_config_batt;
+ const u8 *t62_config_chrg;
+ void (*power_on) (void);
+ void (*power_off) (void);
+ void (*register_cb) (void *);
+ void (*read_ta_status) (void *);
+ const u8 *config_fw_version;
+};
+typedef enum
+ { MXT_PAGE_UP = 0x01, MXT_PAGE_DOWN = 0x02, MXT_DELTA_MODE =
+ 0x10, MXT_REFERENCE_MODE = 0x11, MXT_CTE_MODE = 0x31
+} diagnostic_debug_command;
+
+#endif /* */
diff --git a/include/linux/i2c/mxt540e.h b/include/linux/i2c/mxt540e.h
index 6c34a39..38094c8 100644
--- a/include/linux/i2c/mxt540e.h
+++ b/include/linux/i2c/mxt540e.h
@@ -129,5 +129,7 @@ enum {
int get_tsp_status(void);
extern struct class *sec_class;
-
+#if defined(CONFIG_MACH_T0)
+extern bool is_cable_attached;
+#endif
#endif
diff --git a/include/linux/i2c/mxt540s.h b/include/linux/i2c/mxt540s.h
new file mode 100644
index 0000000..ba687ed
--- /dev/null
+++ b/include/linux/i2c/mxt540s.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2012, Samsung Electronics Co. Ltd. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MXT_H__
+#define __MXT_H__
+
+#define MXT_DEV_NAME "Atmel MXT540S"
+
+#define MXT_540S_SW_RESET_TIME 300 /* msec */
+#define MXT_540S_HW_RESET_TIME 300 /* msec */
+#define MXT_540S_FW_RESET_TIME 500 /* msec */
+
+enum { RESERVED_T0 = 0,
+ RESERVED_T1,
+ DEBUG_DELTAS_T2,
+ DEBUG_REFERENCES_T3,
+ DEBUG_SIGNALS_T4,
+ GEN_MESSAGEPROCESSOR_T5,
+ GEN_COMMANDPROCESSOR_T6,
+ GEN_POWERCONFIG_T7,
+ GEN_ACQUISITIONCONFIG_T8,
+ TOUCH_MULTITOUCHSCREEN_T9,
+ TOUCH_SINGLETOUCHSCREEN_T10,
+ TOUCH_XSLIDER_T11,
+ TOUCH_YSLIDER_T12,
+ TOUCH_XWHEEL_T13,
+ TOUCH_YWHEEL_T14,
+ TOUCH_KEYARRAY_T15,
+ PROCG_SIGNALFILTER_T16,
+ PROCI_LINEARIZATIONTABLE_T17,
+ SPT_COMCONFIG_T18,
+ SPT_GPIOPWM_T19,
+ PROCI_GRIPFACESUPPRESSION_T20,
+ RESERVED_T21,
+ PROCG_NOISESUPPRESSION_T22,
+ TOUCH_PROXIMITY_T23,
+ PROCI_ONETOUCHGESTUREPROCESSOR_T24,
+ SPT_SELFTEST_T25,
+ DEBUG_CTERANGE_T26,
+ PROCI_TWOTOUCHGESTUREPROCESSOR_T27,
+ SPT_CTECONFIG_T28,
+ SPT_GPI_T29,
+ SPT_GATE_T30,
+ TOUCH_KEYSET_T31,
+ TOUCH_XSLIDERSET_T32,
+ RESERVED_T33,
+ GEN_MESSAGEBLOCK_T34,
+ SPT_GENERICDATA_T35,
+ RESERVED_T36,
+ DEBUG_DIAGNOSTIC_T37,
+ SPT_USERDATA_T38,
+ SPARE_T39,
+ PROCI_GRIPSUPPRESSION_T40,
+ SPARE_T41,
+ PROCI_TOUCHSUPPRESSION_T42,
+ SPT_DIGITIZER_T43,
+ SPARE_T44,
+ SPARE_T45,
+ SPT_CTECONFIG_T46,
+ PROCI_STYLUS_T47,
+ PROCG_NOISESUPPRESSION_T48,
+ SPARE_T49,
+ SPARE_T50,
+ SPARE_T51,
+ TOUCH_PROXIMITY_KEY_T52,
+ GEN_DATASOURCE_T53,
+ SPARE_T54,
+ ADAPTIVE_T55,
+ PROCI_SHIELDLESS_T56,
+ PROCI_EXTRATOUCHSCREENDATA_T57,
+ SPARE_T58,
+ SPARE_T59,
+ SPARE_T60,
+ SPT_TIMER_T61,
+ PROCG_NOISESUPPRESSION_T62,
+ PROCI_ACTIVESTYLUS_T63,
+ RESERVED_T255 = 255,
+};
+
+struct mxt_callbacks {
+ void (*inform_charger)(struct mxt_callbacks *, bool);
+};
+
+struct mxt_platform_data {
+ int max_finger_touches;
+ int gpio_read_done;
+ const u8 **config;
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int min_z;
+ int max_z;
+ int min_w;
+ int max_w;
+ int (*power_on) (void);
+ int (*power_off) (void);
+ int (*power_reset) (void);
+ void (*register_cb) (void *);
+ u8 boot_address;
+ const char *firmware_name;
+};
+
+#endif /* */
diff --git a/include/linux/i2c/si47xx_common.h b/include/linux/i2c/si47xx_common.h
new file mode 100644
index 0000000..456e623
--- /dev/null
+++ b/include/linux/i2c/si47xx_common.h
@@ -0,0 +1,60 @@
+/*
+ * Si47xx_common.h -- Si47xx FM Radio driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _COMMON_H
+#define _COMMON_H
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <mach/gpio.h>
+
+#define error(fmt, arg...) printk(KERN_CRIT fmt "\n", ##arg)
+
+#ifdef Si47xx_DEBUG
+#define debug(fmt, arg...) printk(KERN_CRIT "--------" fmt "\n", ##arg)
+#else
+#define debug(fmt, arg...)
+#endif
+
+#define FM_PORT "GPX13"
+
+#define SI47XX_VOLUME_NUM 16
+
+struct si47xx_platform_data {
+ u16 rx_vol[SI47XX_VOLUME_NUM];
+ void (*power) (int on);
+};
+
+struct Si47xx_data {
+ struct si47xx_platform_data *pdata;
+ struct i2c_client *client;
+ struct device *dev;
+};
+
+
+/* VNVS:28-OCT'09 : For testing FM tune and seek operation status */
+#define TEST_FM
+
+/* VNVS:7-JUNE'10 : RDS Interrupt ON Always */
+/* (Enabling interrupt when RDS is enabled) */
+#define RDS_INTERRUPT_ON_ALWAYS
+
+/* VNVS:18-JUN'10 : For testing RDS */
+/* Enable only for debugging RDS */
+/* #define RDS_TESTING */
+#ifdef RDS_TESTING
+#define debug_rds(fmt, arg...) printk(KERN_CRIT "--------" fmt "\n", ##arg)
+#define GROUP_TYPE_2A (2 * 2 + 0)
+#define GROUP_TYPE_2B (2 * 2 + 1)
+#else
+#define debug_rds(fmt, arg...)
+#endif
+
+extern wait_queue_head_t Si47xx_waitq;
+#endif
diff --git a/include/linux/i2c/touchkey_i2c.h b/include/linux/i2c/touchkey_i2c.h
index addd763..71ec0b1 100644
--- a/include/linux/i2c/touchkey_i2c.h
+++ b/include/linux/i2c/touchkey_i2c.h
@@ -29,7 +29,8 @@
|| defined(CONFIG_TARGET_LOCALE_NA)\
|| defined(CONFIG_MACH_M0)\
|| defined(CONFIG_MACH_C1)\
- || defined(CONFIG_MACH_C1VZW)
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_T0)
#define TK_CMD_LED_ON 0x10
#define TK_CMD_LED_OFF 0x20
#else
@@ -50,36 +51,36 @@
#elif defined(CONFIG_MACH_C1_NA_USCC_REV05)
#define TK_FIRMWARE_VER 0x0E
#define TK_MODULE_VER 0x08
-#elif defined(CONFIG_MACH_M0) || defined(CONFIG_MACH_C1VZW)\
- || defined(CONFIG_MACH_C1)
+#elif defined(CONFIG_MACH_M0)\
+ || defined(CONFIG_MACH_C1)\
+ || defined(CONFIG_MACH_M3)
#define TK_FIRMWARE_VER 0x06
#define TK_MODULE_VER 0x05
-#elif defined(CONFIG_MACH_S2PLUS)
-#define TK_FIRMWARE_VER 0x04
-#define TK_MODULE_VER 0x00
+#elif defined(CONFIG_MACH_T0)
+#define TK_FIRMWARE_VER 0x11
+#define TK_MODULE_VER 0x08
#else
#define TK_FIRMWARE_VER 0x04
#define TK_MODULE_VER 0x00
#endif
/* LDO Regulator */
-#if defined(CONFIG_MACH_S2PLUS)
-#define TK_REGULATOR_NAME "3_touch_1.8v"
-#elif defined(CONFIG_MACH_M0)\
+#if defined(CONFIG_MACH_M0)\
|| defined(CONFIG_MACH_C1)\
- || defined(CONFIG_MACH_C1VZW)
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_T0)
#define TK_REGULATOR_NAME "touchkey"
#else
#define TK_REGULATOR_NAME "touch"
#endif
/* LED LDO Type*/
-#if defined(CONFIG_MACH_S2PLUS) \
- || defined(CONFIG_MACH_M0)\
+#if defined(CONFIG_MACH_M0)\
|| defined(CONFIG_MACH_C1_KOR_SKT)\
|| defined(CONFIG_MACH_C1_KOR_KT)\
- || defined(CONFIG_MACH_C1VZW)\
- || defined(CONFIG_MACH_C1)
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_C1)\
+ || defined(CONFIG_MACH_T0)
#define LED_LDO_WITH_EN_PIN
#else
#define LED_LDO_WITH_REGULATOR
@@ -91,13 +92,16 @@
|| defined(CONFIG_MACH_Q1_BD)\
|| defined(CONFIG_MACH_M0)\
|| defined(CONFIG_MACH_C1)\
- || defined(CONFIG_MACH_C1VZW)
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_T0)
#define TK_HAS_AUTOCAL
#endif
/* Generalized SMBus access */
-#if defined(CONFIG_MACH_M0) || defined(CONFIG_MACH_C1VZW)\
- || defined(CONFIG_MACH_C1)
+#if defined(CONFIG_MACH_M0)\
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_C1)\
+ || defined(CONFIG_MACH_T0)
#define TK_USE_GENERAL_SMBUS
#endif
@@ -107,16 +111,42 @@
|| defined(CONFIG_TARGET_LOCALE_NA)\
|| defined(CONFIG_MACH_M0)\
|| defined(CONFIG_MACH_C1)\
- || defined(CONFIG_MACH_C1VZW)
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_T0)
#define TK_HAS_FIRMWARE_UPDATE
#endif
-#if defined(CONFIG_MACH_M0_CHNOPEN) || defined(CONFIG_MACH_M0_HKTW)
+#if defined(CONFIG_TARGET_LOCALE_NAATT)
+#define TK_USE_4KEY_TYPE_ATT
+#elif defined(CONFIG_MACH_LOCALE_NA) \
+ || defined(CONFIG_MACH_U1_NA_SPR) \
+ || defined(CONFIG_MACH_U1_NA_USCC)
+#define TK_USE_4KEY_TYPE_NA
+#elif defined(CONFIG_MACH_M0) \
+ || defined(CONFIG_MACH_C1) \
+ || defined(CONFIG_MACH_M3)\
+ || defined(CONFIG_MACH_T0)
+#define TK_USE_2KEY_TYPE_M0
+#else
+#define TK_USE_2KEY_TYPE_U1
+#endif
+
+#if defined(TK_USE_4KEY_TYPE_ATT)\
+ || defined(TK_USE_4KEY_TYPE_NA)
+#define TK_USE_4KEY
+#elif defined(TK_USE_2KEY_TYPE_M0)\
+ || defined(TK_USE_2KEY_TYPE_U1)
+#define TK_USE_2KEY
+#endif
+
+#if defined(CONFIG_MACH_M0_CHNOPEN)\
+ || defined(CONFIG_MACH_M0_HKTW)
#define TOUCHKEY_FW_UPDATEABLE_HW_REV 10
#elif defined(CONFIG_MACH_M0)
#define TOUCHKEY_FW_UPDATEABLE_HW_REV 11
#elif defined(CONFIG_MACH_C1)
-#if defined(CONFIG_MACH_C1_KOR_SKT) || defined(CONFIG_MACH_C1_KOR_KT)
+#if defined(CONFIG_MACH_C1_KOR_SKT)\
+ || defined(CONFIG_MACH_C1_KOR_KT)
#define TOUCHKEY_FW_UPDATEABLE_HW_REV 8
#elif defined(CONFIG_MACH_C1_KOR_LGT)
#define TOUCHKEY_FW_UPDATEABLE_HW_REV 5