.y_min = 0,
.y_max = 800,
.gpio_reset = GT801_GPIO_RESET,
- .gpio_reset_active_low = 1,
+ .gpio_reset_active_low = 0,
.gpio_pendown = GT801_GPIO_INT,
.pendown_iomux_name = GPIO4D5_CPUTRACECTL_NAME,
.resetpin_iomux_name = NULL,
.ldo = {
{
.enable = 0,
- //TCA6424_P11
- .supply = "wm8994-ldo1",
+ //RK29_PIN5_PA1
+ .supply = NULL,
.init_data = ®ulator_init_data_ldo1,
},
{
.enable = 0,
- .supply = "wm8994-ldo2",
+ .supply = NULL,
.init_data = ®ulator_init_data_ldo2,
}
},
.bus_num = 2,
.flags = 0,
.slave_addr = 0xff,
- .scl_rate = 400*1000,
+ .scl_rate = 200*1000,
.mode = I2C_MODE_IRQ,
.io_init = rk29_i2c2_io_init,
};
#if defined (CONFIG_SND_SOC_WM8994)
{
.type = "wm8994",
- .addr = 0x34,
+ .addr = 0x1a,
.flags = 0,
.platform_data = &wm8994_platdata,
},
#if defined (CONFIG_TOUCHSCREEN_GT801_IIC)
{
.type = "gt801_ts",
- .addr = 0xAA,
+ .addr = 0x55,
.flags = 0,
.irq = RK29_PIN4_PD5,
.platform_data = >801_info,
{
.modalias = "wm8310",
.chip_select = 1,
- .max_speed_hz = 2*1000*1000,
+ .max_speed_hz = 1*1000*1000,
.bus_num = 1,
.irq = RK29_PIN4_PD0,
.platform_data = &wm831x_platdata,
gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
pm_power_off = rk29_pm_power_off;
+// codec
+ gpio_request(RK29_PIN5_PA1, NULL);
+ gpio_direction_output(RK29_PIN5_PA1,GPIO_HIGH);
+ gpio_free(RK29_PIN5_PA1);
+
#ifdef CONFIG_WIFI_CONTROL_FUNC
rk29sdk_wifi_bt_gpio_control_init();
#endif
#define TOUCH_NUMBER 2
#endif
-#define TOUCH_REG_NUM 5 //ÿ×é×ø±êÐèÒªµÄ¼Ä´æÆ÷ÊýĿ
+#define TOUCH_REG_NUM 5 //ÿ�������Ҫ�ļĴ�����Ŀ
const unsigned char GT801_RegData[GT801_REGS_NUM]={
0x19,0x05,0x06,0x28,0x02,0x14,0x14,0x10,0x40,0xB0,0x01,0xE0,0x03,0x4C,0x78,0x9A,0xBC,0xDE,0x65,0x43,0x20,0x11,0x00,0x00,0x00,0x00,0x05,0xCF,0x20,0x0B,0x0D,0x8D,0x32,0x3C,0x1E,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01
static int gt801_write_regs(struct i2c_client *client, u8 reg, u8 const buf[], unsigned short len)
{
int ret;
+ int i = len;
ret = i2c_master_reg8_send(client,reg, buf, len, 200*1000);
if (ret < 0) {
printk("gt801_ts_work_func:i2c_transfer fail =%d\n",ret);
}
else{
x = ((( ((unsigned short)buf[i+ptxh] )<< 8) ) | buf[i+ptxl]);
- y= (((((unsigned short)buf[i+ptyh] )<< 8) )| buf[i+ptyl]);
-
+ y = (((((unsigned short)buf[i+ptyh] )<< 8) )| buf[i+ptyl]);
+ x = 480-x;
+ y = 800-y;
if (ts->swap_xy)
swap(x, y);
if (verify_coord(ts,&x,&y))
- ;//goto out;
+ ;//goto out;
gt801printk("input_report_abs--%d-%d-(%d/%d)\n", i,touch_state_index, x, y);
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, 1); //Finger Size
return err;
}
- gpio_set_value(ts->gpio_reset, ts->gpio_reset_active_low? GPIO_LOW:GPIO_HIGH);
-
err = gpio_direction_output(ts->gpio_reset, ts->gpio_reset_active_low? GPIO_LOW:GPIO_HIGH);
if (err) {
dev_err(&client->dev, "failed to pulldown resetPin GPIO%d,err%d\n",
gpio_free(ts->gpio_reset);
return err;
}
-
- mdelay(100);
-
+ mdelay(100);
gpio_set_value(ts->gpio_reset, ts->gpio_reset_active_low? GPIO_HIGH:GPIO_LOW);
-
mdelay(100);
-
+
return 0;
}
static int __devinit setup_pendown(struct i2c_client *client, struct gt801_ts_data *ts)