Hello,

I'm using a Beaglebone Black with a custom cape attached to it.
I created a device tree overlay for it (see the attached mycape.dts), which 
is almost working fine, except that I won't receive any events using the C 
poll() function.

When I load the dts all Inputs/Outpus are muxed and exported automatically 
to the sysfs as expected. But only the "edge-file" gives me a none, instead 
of both.
I didn't find any documentation for this. I only found the two options 
"count-rising-edge" and "count-falling-edge" which should enable the 
interrupts for this pin. But so far, it does not work for me...

So is there any way I can tell the device tree that I want to watch for 
both edges?
Trying to set the edge manually after loading the device tree overlay only 
gives me a write error: "Device or resource busy".


If I remove the GPIO Part:

In0 {  //GPIO-1[12]
    gpio-name = "Input0";
    gpio = <&gpio2 12 0x00>;
    input;
    active-low;
    count-rising-edge;
    count-falling-edge;
};Code hier eingeben...

and export & configure the inputs manually, the events are working!
So I think my C-Code should be fine...




I hope anyone can help me with this...
Thank you very much!

With best regards,
Sebastian

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
/dts-v1/;
/plugin/;

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";

    /* identification */    
    board-name = "MY-CAPE";
    part-number = "MY-CAPE";
    version = "00A0";
    
    /* Exclusive Pin use */
    exclusive-use = "P8.07", "P8.12", "gpio_1_12", "gpio_2_2";

        
    /* Pin-Muxing & Configuration */
    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            
            //Inputs
            input_pins: pinmux_input_pins{
                pinctrl-single,pins = <
                    0x030 0x37   // P8_12  => GPIO-1[12]
                >;
            };
            
            //Outputs
            output_pins: pinmux_output_pins{
                pinctrl-single,pins = <
                                        0x090 0x0F   // P8_7   => GPIO-2[2]
                >;
            };
                       
        };
    };
   
        fragmet@1 {
                target = <&ocp>;        //OnChipPeripherals
                __overlay__ {
                        my_input_pins {
                                compatible = "gpio-of-helper"; 
//gpio-of-helper, bone-pinmux-helper
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&input_pins>;

                                In0 {  //GPIO-1[12]
                                        gpio-name = "Input0";
                                        gpio = <&gpio2 12 0x00>;
                                        input;
                                        active-low;
                                        count-rising-edge;
                                        count-falling-edge;
                                };
                        };
                        
                        gsf_output_pins {
                                compatible = "gpio-of-helper";
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&output_pins>;
                                
                                Out0 {  //GPIO-2[2]
                                        gpio-name = "Output0";
                                        gpio = <&gpio3 2 0x00>;
                                        output;
                                        init-low;
                                };
                        };
                };
        };
};

Reply via email to