08-08-2017, 06:20 PM
My point the whole time as been simply that... if you export the pin, and it says that it's state is currently x, then it should damn well be x. not y, or z... x. The Raspberry Pi folks know that is what should be the case, so they made sure it was. Otherwise, the pin should have have a 'indeterminate' state, so that you know it hasn't been set yet.
A separate 'compatibility' mode isn't needed, especially when we are talking about the RPi bus. It either isn't or is. We already know that it isn't, so the focus should then be making it as compatible as possible, and documenting well the areas which it isn't. As far as the default state, it should be an input as the sysfs expects, and should be that as soon as possible. Not getting into a discussion over how soon it should do it, or what happens before then... this is a SBC, not a micro-controller... it's going to be sloppy. I do think for simplicity sake it should be done at boot - so probably in uboot. And I still wonder if the DTS is the root of the problem there... if you read some of the gpio-controller info, it appears that the default states *may* be defined there...
https://www.kernel.org/doc/Documentation...o/gpio.txt
A separate 'compatibility' mode isn't needed, especially when we are talking about the RPi bus. It either isn't or is. We already know that it isn't, so the focus should then be making it as compatible as possible, and documenting well the areas which it isn't. As far as the default state, it should be an input as the sysfs expects, and should be that as soon as possible. Not getting into a discussion over how soon it should do it, or what happens before then... this is a SBC, not a micro-controller... it's going to be sloppy. I do think for simplicity sake it should be done at boot - so probably in uboot. And I still wonder if the DTS is the root of the problem there... if you read some of the gpio-controller info, it appears that the default states *may* be defined there...
https://www.kernel.org/doc/Documentation...o/gpio.txt