gpio-poweroff driver

28 views
Skip to first unread message

XY

unread,
Mar 23, 2021, 7:46:59 PM3/23/21
to linux-sunxi
Hi,

I am using mainline kernel 5.6 on a BPI M2 zero and I compiled the kernel with the gpio-poweroff driver. Did somebody already try to use the gpio-poweroff driver ? On my side nothing seems to work.

I tried to implement this on PA17.

Here are my modifications on the device tree :

/dts-v1/;
 /
 { 

     ...
 
 pinctrl@1c20800 { 
    reg = <0x1c20800 0x400>; 
    interrupts = <0x0 0xb 0x4 0x0 0x11 0x4>; 
    clocks = <0x3 0x36 0x10 0x11 0x0>; 
    clock-names = "apb", "hosc", "losc";
    gpio-controller; #gpio-cells = <0x3>;
    interrupt-controller; 
    #interrupt-cells = <0x3>; 
     compatible = "allwinner,sun8i-h3-pinctrl"; 
     phandle = <0xc>;
     ... 
     poweroff_pins@0 {          /* This line has been added */ 
          pins = "PA17"; /* This line has been added */ 
          function = "gpio_out"; /* This line has been added */ 
           }; /* This line has been added */ 
     };

 ...
 
 gpio_power_off { /* This line has been added */ 
       compatible = "gpio-poweroff"; /* This line has been added */ 
       gpios = <0xc 0x0 0x11 0x1>; /* This line has been added */ 
        ; /* This line has been added */
 };

But nothing happens when I shut down the device .

Any thoughts ?

Thanks
Reply all
Reply to author
Forward
0 new messages