Skip to content

Commit

Permalink
New tpd driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperion70 committed Jan 27, 2019
1 parent 9a88cc4 commit 89461d7
Show file tree
Hide file tree
Showing 18 changed files with 87,067 additions and 11,179 deletions.
3,954 changes: 0 additions & 3,954 deletions drivers/input/touchscreen/mediatek/synaptics_dsx/SynaImage.h

This file was deleted.

56 changes: 56 additions & 0 deletions drivers/input/touchscreen/mediatek/synaptics_dsx/cei_touch_log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#ifndef __CEI_TOUCH_LOG__
#define __CEI_TOUCH_LOG__

#define TP_LOG_TAG "synaptics"

#define TP_DYNAMIC_LOG

#define TP_LOG_LEVEL_ERROR 1
#define TP_LOG_LEVEL_WARRING 2
#define TP_LOG_LEVEL_INFO 4
#define TP_LOG_LEVEL_DEBUG 8

#ifdef TP_DYNAMIC_LOG
extern unsigned int tp_dynamic_log_level;

#define tp_dynamic_print(level, fmt, arg...) \
do { \
if (level <= tp_dynamic_log_level) \
printk(fmt, ##arg); \
} while(0)
#else
#define tp_dynamic_print(level, fmt, arg...) \
printk(fmt, ##arg);
#endif /* TP_DYNAMIC_LOG */

#define TP_LOGE(fmt, arg...) \
tp_dynamic_print(TP_LOG_LEVEL_ERROR, \
"[%s][error] %s: "fmt, TP_LOG_TAG, __func__, ##arg)
#define TP_LOGW(fmt, arg...) \
tp_dynamic_print(TP_LOG_LEVEL_WARRING, \
"[%s][warring] %s: "fmt, TP_LOG_TAG, __func__, ##arg)
#define TP_LOGI(fmt, arg...) \
tp_dynamic_print(TP_LOG_LEVEL_INFO, \
"[%s][info] %s: "fmt, TP_LOG_TAG, __func__, ##arg)
#define TP_LOGD(fmt, arg...) \
tp_dynamic_print(TP_LOG_LEVEL_DEBUG, \
"[%s][debug] %s: "fmt, TP_LOG_TAG, __func__, ##arg)

/***** self-test log *****/
#define TP_TEST_LOG_TAG "fts-test"

#define tp_test_print(fmt, arg...) \
do { \
printk(fmt, ##arg); \
} while(0)

#define TP_TEST_LOGE(fmt, arg...) \
tp_test_print("[%s][error] %s: "fmt, TP_TEST_LOG_TAG, __func__, ##arg)
#define TP_TEST_LOGW(fmt, arg...) \
tp_test_print("[%s][warring] %s: "fmt, TP_TEST_LOG_TAG, __func__, ##arg)
#define TP_TEST_LOGI(fmt, arg...) \
tp_test_print("[%s][info] %s: "fmt, TP_TEST_LOG_TAG, __func__, ##arg)
#define TP_TEST_LOGD(fmt, arg...) \
tp_test_print("[%s][debug] %s: "fmt, TP_TEST_LOG_TAG, __func__, ##arg)

#endif /* __CEI_TOUCH_LOG__ */

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions drivers/input/touchscreen/mediatek/synaptics_dsx/synaptics_dsx.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
* @map: pointer to array of button types
*/
struct synaptics_dsx_cap_button_map {
unsigned int nbuttons;
unsigned int *map;
unsigned int nbuttons;
unsigned int *map;
};

/*
Expand All @@ -64,23 +64,23 @@ struct synaptics_dsx_cap_button_map {
* @cap_button_map: pointer to 0d button map
*/
struct synaptics_dsx_platform_data {
bool x_flip;
bool y_flip;
bool swap_axes;
int irq_gpio;
int power_gpio;
int power_on_state;
int reset_gpio;
int reset_on_state;
unsigned long irq_flags;
unsigned int panel_x;
unsigned int panel_y;
unsigned int power_delay_ms;
unsigned int reset_delay_ms;
unsigned int reset_active_ms;
unsigned char *regulator_name;
int (*gpio_config)(int gpio, bool configure, int dir, int state);
struct synaptics_dsx_cap_button_map *cap_button_map;
bool x_flip;
bool y_flip;
bool swap_axes;
int irq_gpio;
int power_gpio;
int power_on_state;
int reset_gpio;
int reset_on_state;
unsigned long irq_flags;
unsigned int panel_x;
unsigned int panel_y;
unsigned int power_delay_ms;
unsigned int reset_delay_ms;
unsigned int reset_active_ms;
unsigned char *regulator_name;
int (*gpio_config)(int gpio, bool configure, int dir, int state);
struct synaptics_dsx_cap_button_map *cap_button_map;
};

#endif
Loading

0 comments on commit 89461d7

Please sign in to comment.