The GPIO.cleanup() command does not return the pads to the default conditions found at power-up. For the P1 Header, the general pads (17, 27, 22, 10, 9, 11, 18, 23, 24 and 25) have a default pull low. After executing GPIO.cleanup(), they are tri-stated (no pull).
The special ports (ALT0), GPCLK0, CE0 and CE1, are default pull high, but are also tri-stated after the clean-up.
Will it be possible to enhance the clean-up such that the pads will return to their original state? This will be most helpful for less experienced users when they connect hardware to the ports that can get into an unknown or incorrect state because of this unexpected behaviour.
Probably 99% of the users will not generally use TXD and RXD, so these can be left as is.
FYI, sysfs, wiringpi and pigpio do work as expected.
I should probably add that in earlier versions of the kernel the pads did default to no-pull (tri-state). This matched the cleanup() results.
However, On the kernels that started to use the device tree, the default pad pull levels changed, and cleanup() no longer matches the (power-up) defaults.
Last edit: Paul Versteeg 2015-06-19