Add the new locking calls to ensure that these are always exclusively accessing the GPIO registers. Fixes a possible race between two threads modifying the same GPIO bank, Signed-off-by: Ben Dooks <ben-linux@fluff.org>