什么是 cawake gpio pin 以及如何在设备树中禁用它

What is a cawake gpio pin and how to disable it in device tree

当我的内核 4.2 armv7l(和硬件 OMAP35xSOM-LV​​,一个 LogicPD 板)启动时,我在启动日志中收到如下错误。

[  14.893432] omap_ssi 48058000.ssi-controller: ssi controller 0 initialized (2 ports)!
[   14.959777] omap_ssi_port 4805a000.ssi-port: couldn't get cawake gpio (err=-2)!
[   15.034698] omap_ssi_port: probe of 4805a000.ssi-port failed with error -2
[   15.130096] omap_ssi_port 4805b000.ssi-port: couldn't get cawake gpio (err=-2)!

我可以在其中一个设备树文件 (omap3.dtsi) 中看到这个 ssi 端口控制器被禁用,但是当内核启动时仍然出现这个错误。如何抑制这个错误?我是设备树概念的新手。为了更清楚,omap3.dtsi 中引用讨论中的端口的相关代码如下:

ssi: ssi-controller@48058000 {
    compatible = "ti,omap3-ssi";
    ti,hwmods = "ssi";

    status = "disabled";

    reg = <0x48058000 0x1000>, <0x48059000 0x1000>;
    reg-names = "sys", "gdd";

    interrupts = <71>;
    interrupt-names = "gdd_mpu";

    #address-cells = <1>;
    #size-cells = <1>;
    ranges;

    ssi_port1: ssi-port@4805a000 {
        compatible = "ti,omap3-ssi-port";
        reg = <0x4805a000 0x800>, <0x4805a800 0x800>;
        reg-names = "tx", "rx";
        interrupts = <67>, <68>;
    };

    ssi_port2: ssi-port@4805b000 {
        compatible = "ti,omap3-ssi-port";
        reg = <0x4805b000 0x800>, <0x4805b800 0x800>;
        reg-names = "tx", "rx";
        interrupts = <69>, <70>;
    };
};

可以从 drivers/hsi/controllers/omap_ssi_port.c 中抑制警告。该文档将 cawake gpio 保留为可选组件。由于 cawake gpio 只是一种多路复用形式(而不是实际的硬件引脚),因此在设备树中禁用它没有任何意义(对于至少 omap3 系列)。

cawake_gpio = devm_gpiod_get(&pd->dev, "ti,ssi-cawake", GPIOD_IN);
/*        if (IS_ERR(cawake_gpio)) {
                err = PTR_ERR(cawake_gpio);
                dev_err(&pd->dev, "couldn't get cawake gpio (err=%d)!\n", err);
                goto error;
        }
*/