This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM1808 TSC2007 Interface

Other Parts Discussed in Thread: AM1808, TSC2007

Dear Team,

    I am try to porting tsc2007 to AM1808 in a customer board.

i getting the following error while booting.

tsc2007_init[382]
tsc2007_probe[272]
tsc2007 1-0090: i2c io error: -6

details added in board-da850-evm.c

#define DA850_EVM_TSC2007_ADDRESS 0x90

/*
 * TSC 2007 Support
 */
#define TSC2007_GPIO_IRQ_PIN    GPIO_TO_PIN(8, 12)

static int tsc2007_init_irq(void)
{
        int ret = 0;

        ret = gpio_request(TSC2007_GPIO_IRQ_PIN, "tsc2007-irq");
        if (ret < 0) {
                pr_warning("Failed to Set TSC2007 IRQ GPIO: %d\n", ret);
                return ret;
        }

        ret = davinci_cfg_reg(DA850_GPIO8_12);
        if (ret) {
                pr_warning("%s: PinMux setup for GPIO %d failed: %d\n",
                           __func__, TSC2007_GPIO_IRQ_PIN, ret);
                return ret;
        }

        gpio_direction_input(TSC2007_GPIO_IRQ_PIN);

        return ret;
}

static void tsc2007_exit_irq(void)
{
        gpio_free(TSC2007_GPIO_IRQ_PIN);
}

static int tsc2007_get_irq_level(void)
{
        return gpio_get_value(TSC2007_GPIO_IRQ_PIN) ? 0 : 1;
}

struct tsc2007_platform_data tsc2007_pdata = {
        .model = 2007,
        .x_plate_ohms = 180,
        .get_pendown_state = tsc2007_get_irq_level,
        .init_platform_hw = tsc2007_init_irq,
        .exit_platform_hw = tsc2007_exit_irq,
};

static struct i2c_board_info __initdata da850_evm_tsc2007_dev = {
        I2C_BOARD_INFO("tsc2007", DA850_EVM_TSC2007_ADDRESS),
        .platform_data  = &tsc2007_pdata,
};

i2c_register_board_info(1, da850_evm_i2c_devices,
                        ARRAY_SIZE(da850_evm_i2c_devices));

 da850_evm_tsc2007_dev.irq = gpio_to_irq(TSC2007_GPIO_IRQ_PIN),
 i2c_register_board_info(1, &da850_evm_tsc2007_dev, 1);

Please help me resolve to this issue.

Regards

Jithin