AnsweredAssumed Answered

gpio-hog and gpio export

Question asked by delauratfrançois on Jul 27, 2016
Latest reply on Jul 28, 2016 by delauratfrançois


Hello

My name is françois I work with imx7d. I want to use a gpio in output. The gpio output is software controlled and is not connected to a button or LED. I know how creat an gpio in user space with export but I want initialize the gpio in device tree with gpio-hog.

If I don't initialize the gpio with  gpio-hog in devicetree I can export the gpio but if  I initialize the gpio with gpio-hog in devicetre i can not export the gpio.

is it normal?

My gpio-hog in my device tree

 

gpio1: gpio@30200000 {

  compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";

  reg = <0x30200000 0x10000>;

  interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, /* GPIO1_INT15_0 */

      <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; /* GPIO1_INT31_16 */

  gpio-controller;

  #gpio-cells = <2>;

  interrupt-controller;

  #interrupt-cells = <2>;

 

 

  gpio102{

                gpio-hog;

                gpios = <2 GPIO_ACTIVE_LOW>;

                output-high;

                line-name = "ResetBluetooth";

                };

  };

 

Thanks,

 

François.

Outcomes