icn6202

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值