dsti里解析的一个疑问

dts:

lt8912@48 {
    compatible = "qcom,lt8912";
    reg = <0x48>;
    power-gpios = <&tlmm 2 0x0>;
    instance_id = <0>;
    //lt,enable-audio;
    pinctrl-names = "pmx_lt8912_active","pmx_lt8912_suspend";
    pinctrl-0 = <<8912_int_active <8912_rst_active>;
    pinctrl-1 = <<8912_int_suspend <8912_rst_suspend>;
    lt,irq-gpio = <&tlmm 65 0x2002>;        
    lt,rst-gpio = <&tlmm 87 0x2002>; 
}

driver:
    ret = of_get_named_gpio_flags(np, "power-gpios", 0, &pdata->power_gpio);
    if (ret) {
        printk(KERN_ALERT "qyc , power-gpios parsed failed\n");
        goto: end;
    }

--------------
问题1:
        驱动里的名字要与dsti里面一致,不然驱动出现解析不了,在tp驱动里也出现过,驱动里名字未对应dtsi就解析不了。感觉是dtsi节点名字固定了一样,比如vdd改为vcc,即使驱动和dtsi对应上了,kernel里也报错..

问题2:
        既然有reset-gpios = <&tlmm 8 0x0>这种简单写节点方式,为什么有的还要写pinctrl控制io的这种呢(最后都是gpio_direction_input/output来控制,相对来说pinctl在dtsi里面要写的繁琐一些)

&i2c_2 {
     goodix@5d {
         compatible = "goodix,gt9xx_second";
         reg = <0x5d>;
         interrupt-parent = <&tlmm>;
         interrupts = <9 0x2>;
         reset-gpios = <&tlmm 8 0x0>;
         interrupt-gpios = <&tlmm 9 0x2008>;
         power-gpios = <&tlmm 0 0x0>;
         vdd-supply = <&pm8953_l10>;
         vcc_i2c-supply = <&pm8953_l6>;
         goodix,panel-coords = <0 0 719 1405>;
         goodix,display-coords = <0 0 719 1279>;
         goodix,button-map= <139 172 158>;

 

你可能感兴趣的:(dtsi,driver,kernel,问题记录)