static int ct36x_chip_set_code(unsigned short flash_addr, char *buf)
{
unsigned char cod_chksum;
+ unsigned char *binary_data;
// Flash address
// data length
buf[2] = (char)(flash_addr >> 8);
buf[3] = (char)(flash_addr & 0xFF);
buf[4] = 0x08;
- unsigned char *binary_data;
if(flag_ct36x_model ==365)
binary_data = ct365_binary_data;
static int ct363_init_hw(struct ct36x_data *ts)
{
- int ret = 0;
/*
+ int ret = 0;
ret = gpio_request(ts->rst_io.gpio, "ct363_rst");
if(ret < 0){
dev_err(ts->dev, "Failed to request rst gpio\n");
static void ct363_report(struct ct36x_data *ts)
{
+ int t ,m;
int i, ret = 0;
int sync = 0, x, y;
int len = sizeof(struct ct363_finger_data) * ts->point_num;
return;
}
- int t ,m;
if(ct36x_dbg_level==2)
for(t=0;t< ts->point_num;t++){
ct36x_dbg(ts, "CT363buf[%d]: ", t);
#include <linux/ct36x.h>
-//#include <mach/board.h>
-//#include <mach/gpio.h>
-//#if 1
-//#define ct36x_dbg(ts, format, arg...) \
-// dev_printk(KERN_INFO , ts->dev , format , ## arg)
-//#else
-//#define ct36x_dbg(ts, format, arg...)
-//#endif
int flag_ct36x_model;
int ct36x_dbg_level = 0;
#include "ct36x_priv.h"
#include <linux/of_gpio.h>
+#include <linux/async.h>
#include "core.c"
#include "ct360.c"
static int ct36x_ts_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
+ int orientation[4];
int ret = 0, i;
struct ct36x_data *ts = NULL;
/*struct ct36x_platform_data *pdata = client->dev.platform_data;
//ts->y_max = pdata->y_max;
//ts->rst_io = pdata->rst_io;
//ts->irq_io = pdata->irq_io;
- ts->irq_io.gpio = of_get_named_gpio_flags(np, "touch-gpio", 0, &irq_flags);
+ ts->irq_io.gpio = of_get_named_gpio_flags(np, "touch-gpio", 0, (enum of_gpio_flags *)&irq_flags);
ts->rst_io.gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &rst_flags);
- printk("the irq_flags is %d,rst_flags is %d\n",irq_flags,rst_flags);
- int orientation[4];
+ printk("the irq_flags is %ld,rst_flags is %d\n",irq_flags,rst_flags);
ret = of_property_read_u32_array(np, "orientation",orientation,4);
if (ret < 0)
},
};
-static int __init ct36x_ts_init(void)
+static void __init ct36x_ts_init_async(void *unused, async_cookie_t cookie)
{
#ifndef CONFIG_CT36X_TS //make modules
int ret = 0;
return ret;
}
#endif
- return i2c_add_driver(&ct36x_ts_driver);
+ i2c_add_driver(&ct36x_ts_driver);
+}
+
+static int __init ct36x_ts_init(void)
+{
+ async_schedule(ct36x_ts_init_async, NULL);
+ return 0;
}
static void __exit ct36x_ts_exit(void)