PIXCIR Touchscreen integration

Started by sspillecke, September 19, 2016, 10:36:52 AM

Previous topic - Next topic

sspillecke

I'm trying to integrate an PIXCIR capacitive touchscreen under Android 4.2.2 for an olimexino micro. I've received the driver files from pixcir with a short description. In the /drivers/input/touchscreen folder in the lichee kernel for android, there is already a pixcir driver source file. So I replaced this one with mine and activate the driver in the menuconfig.
I adjusted the pixcir_i2c_ts.h file like this:
#ifdef olimex

    #include <linux/gpio.h>
    #include <mach/gpio.h>

    #define ATTB    GPIOI(15)
    #define get_attb_value(ATTB)    gpio_get_value(ATTB)
    #define RST_PIN        GPIOI(5)
    #define    RESETPIN_CFG    gpio_request(RST_PIN,"")
    #define    RESETPIN_SET0     gpio_direction_output(RST_PIN,0)
    #define    RESETPIN_SET1    gpio_direction_output(RST_PIN,1)

    #endif
    static int attb_read_val(void) {
        return get_attb_value(ATTB);
    }

    static void pixcir_reset(void) {
        RESETPIN_CFG;
        RESETPIN_SET1;
        mdelay(50);
        RESETPIN_SET0;
    }

    static void pixcir_init(void) {
        pixcir_reset();
        mdelay(60);
    }


The pixcir description said to adjust the i2c_baord_info __initdata like this
static struct i2c_board_info i2c_devs0[] __initdata = {
    {
        I2C_BOARD_INFO("pixcir_ts", 0x5c),
        .irq = S3C_EINT(11),
    },
};


But I've no idea where to find this file.

Furthermore I've adjusted the *.fex file with the ctp_paras:
[ctp_para]
ctp_used = 1
ctp_name = "pixcir_ts"
ctp_twi_id = 2
ctp_twi_addr = 0x5c
ctp_screen_max_x = 800
ctp_screen_max_y = 480
ctp_revert_x_flag = 1
ctp_revert_y_flag = 1
ctp_exchange_x_y_flag = 0
ctp_int_port = port:PI15<6><default><default><default>
ctp_wakeup = port:PB13<1><default><default><default>
rst_port = port:PI05<1><default><default><default>


Could anyone give me a clue?