(08-05-2017, 10:24 PM)MarkHaysHarris777 Wrote: This is not a bug.
... you have to set the direction to "IN" and then set the ACTIVE_LOW or the input pin will not work the way you expect, even though theoretically the default state of the pins is input !
After setting the direction to IN of course the pin functions normally as an input pin.
Actually, that is a bug... if you export say gpio 69 (pin 33 on the rPi bus), and then try to read the value, it will report 0 regardless of it the pin is being held high or low. If you check the direction, it says it is "in". But if you simply set the direction as 'in' (no toggling out/in, just setting as in) it will read 1/0 correctly if you take it high/low. So the initial state of the sysfs direction is probably not correct... I think the question then is that a DTS error, some other initialisation error, or simply the sysfs not being in with the actual pin state when the GPIO is exported. No need to alter active_low, and nor did changing only it alter the results. Only 're'-setting the direction was needed.
My money is on the DTS... as I think it can also set the inital state of the pins, but I really haven't played in that space, so I'll defer to the DTS experts on that one