How to add a linux kernel device nodes for extended gpio chip driver?

1. attention attribute gpio-hog

   GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function. (Gpio-hog to provide an automatic gpio resource request and configured to control the driving mechanism portion of the probe function gpio)
2. Examples
    pca9554:pca9554@20 {
  compatible = "nxp,pca9554";
  reg=<0x20>;
    gpio-controller;
  #gpio-cells=<2>;
  interrupt-controller;
  #interrupt-cells = <2>;
  interrupt-parent = <&gpio3>;
  interrupts = <28 IRQ_TYPE_NONE>;

      P00 {
    GPIO hog;
    gpios = <0 GPIO_ACTIVE_LOW>;
    output-high;
    line-name = "led_normal";
  }
    }
3. How to cite pca9554 node?
  displayport {
        dp.aux_sw_oe = <&pca9554 4 GPIO_ACTIVE_HIGH>
        dp.sbu_sw_sel = <&pca9554 1 GPIO_ACTIVE_HIGH>
    }; 

Guess you like

Origin www.cnblogs.com/dakewei/p/12322476.html