msm6917.dtsi
icn6202@2c {
compatible = "lontium,icn6202";
reg = <0x2c>;
//vcc_i2c-supply = <&pm8937_l5>;
//reset-gpio = <&tlmm 87 0x00>;
//power-gpio = <&tlmm 8 0x00>;
//bl-en-gpio = <&tlmm 22 0x00>;
//panel-en-gpio = <&tlmm 36 0x00>;
};
============
icn6202_drv.c
#define ICN6202_I2C_NAME "lontium,icn6202"
==============
obj-y += icn6202_drv.o
===================
sis_touchscreen@5c {
compatible = "sis,sis_touch";
reg = <0x5c>;
//vcc_i2c-supply = <&pm8937_l5>;
touch-gpio = <&tlmm 65 0x00>;
status = "okay";
};
/*This input device name should be the same to IDC file name.*/
/*"SiS9200-i2c-touchscreen"*/
ts->input_dev->name = "sis_touch";
=================
touch-gpio
#ifndef CONFIG_REG_BY_BOARDINFO
int sis_irq_config(struct sis_ts_data *ts)
{
struct device_node *np;
unsigned long irq_flags;
struct device *dev;
pr_debug("sis_irq_config\n");
dev = &ts->client->dev;
np = dev->of_node;
sis_gpio_irq = of_get_named_gpio_flags(np,
"touch-gpio", 0, (enum of_gpio_flags *)&irq_flags);
pr_info("sis_gpio_irq=%d\n", sis_gpio_irq);
ts->irq = gpio_to_irq(sis_gpio_irq);
if (gpio_request(sis_gpio_irq, "touch-gpio") != 0) {
gpio_free(sis_gpio_irq);
printk(KERN_INFO "sis_irq_config gpio_request error\n");
return -1;
}
return 0;
}
#endif